Match benchmark-axis scoping to NVBench CLI

When any --benchmark filter is present, keep comparison limited to the
explicitly selected benchmarks. Leading --axis filters are still replayed onto
each selected benchmark, matching native NVBench option parsing, but they no
longer cause unrelated benchmarks to be compared.

E.g., `-a A=2 -b bench1` now compares only bench1,
`-a A=2 -b bench1 -b bench2` applies A=2 to both selected benchmarks

Update tests for global axis filters with benchmark scopes and document the
selection behavior.
This commit is contained in:
Oleksandr Pavlyk
2026-06-28 07:10:38 -05:00
parent f4aff067c7
commit 2e0f635b6c
3 changed files with 65 additions and 4 deletions

View File

@@ -2285,8 +2285,6 @@ def axis_filter_groups_for_benchmark(benchmark_name, filter_plan):
filter_plan.global_axis_filters + scope.axis_filters
for scope in matching_scopes
]
if filter_plan.global_axis_filters:
return [filter_plan.global_axis_filters]
return []