Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions tests/integration/defs/perf/test_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ def import_allowed_perf_config():
PerfMetricType.OUTPUT_TOKEN_TIME:
re.compile(r"Average time-per-output-token \[TPOT\] \(ms\):\s+([\d\.]+)"),
PerfMetricType.KV_CACHE_SIZE:
re.compile(r".*Allocated ([\d\.]+) GiB for max tokens in paged KV cache.*"),
re.compile(r".*(?:Allocated ([\d\.]+) GiB for max tokens in paged KV cache|"
r"Final KV cache size after resize: ([\d\.]+) GiB).*"),
}
DISAGG_SERVER_METRICS_LOG_QUERIES = {
PerfMetricType.DISAGG_SERVER_E2EL:
Expand Down Expand Up @@ -1608,9 +1609,17 @@ def get_perf_result(self, outputs: Dict[int, str]) -> float:
for line in outputs[cmd_idx].split("\n")
]
print_info(outputs[cmd_idx].split("\n"))
metric_values = [
float(match.group(1)) for match in regex_matches if match
]
metric_values = []
for match in regex_matches:
if match:
# Handle multiple capture groups - use the first non-None group
value = None
for i in range(1, len(match.groups()) + 1):
if match.group(i) is not None:
value = match.group(i)
break
if value is not None:
metric_values.append(float(value))

if len(metric_values) == 0:
if self._build_script == "trtllm-build" and metric.metric_type == PerfMetricType.ENGINE_SIZE:
Expand Down