Skip to content

Commit e822184

Browse files
authored
[None][feat] add waive by sm version (#8928)
Signed-off-by: Xin He (SW-GPU) <[email protected]>
1 parent 1c8c771 commit e822184

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

tests/integration/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ The following subfolder contains test definitions for Tensorrt LLM.
1717
└── waives.txt # Test waive list
1818
~~~
1919

20+
## Test Waives
21+
22+
The `waives.txt` file supports skipping tests based on:
23+
- **Platform name**: e.g., `full:RTX/`, `full:DGX-A100-40GB/`, `full:GH200/`
24+
- **SM version**: e.g., `full:sm90/`, `full:sm89/`, `full:sm100/`
25+
26+
SM version mapping:
27+
- `sm89` = Ada (e.g., RTX 4090, L40S)
28+
- `sm90` = Hopper (e.g., H100, H200)
29+
- `sm100` = Blackwell (e.g., B100, B200)
30+
- `sm103` = Blackwell-Ultra (e.g., B300, GB300)
31+
2032
- To run perf tests, you also need to first build the cpp benchmark by calling `build_wheel.py` with `--benchmarks` flag.
2133

2234
## Run perf tests

tests/integration/defs/test_list_parser.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,22 @@ def parse_test_name(s):
102102
if s.startswith("full:"):
103103
s = s.lstrip("full:")
104104
if test_prefix:
105-
if test_prefix.split('-')[0] in s:
105+
# Check for SM version pattern (e.g., sm90, sm89, sm100)
106+
sm_match = re.match(r'sm(\d+)/', s)
107+
if sm_match:
108+
sm_version = int(sm_match.group(1))
109+
# Get current SM version
110+
try:
111+
from .conftest import get_sm_version
112+
current_sm = get_sm_version()
113+
# If SM versions match, replace with test_prefix
114+
if sm_version == current_sm:
115+
s = s.replace(f'sm{sm_version}',
116+
test_prefix.split('-')[0])
117+
except Exception:
118+
# If can't get SM version, skip SM-based filtering
119+
pass
120+
elif test_prefix.split('-')[0] in s:
106121
s = s.replace(test_prefix.split('-')[0], test_prefix)
107122
return s
108123
elif test_prefix:

tests/integration/defs/triton_server/test_list_parser.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,22 @@ def parse_test_name(s):
103103
if s.startswith("full:"):
104104
s = s.lstrip("full:")
105105
if test_prefix:
106-
if test_prefix.split('-')[0] in s:
106+
# Check for SM version pattern (e.g., sm90, sm89, sm100)
107+
sm_match = re.match(r'sm(\d+)/', s)
108+
if sm_match:
109+
sm_version = int(sm_match.group(1))
110+
# Get current SM version
111+
try:
112+
from ..conftest import get_sm_version
113+
current_sm = get_sm_version()
114+
# If SM versions match, replace with test_prefix
115+
if sm_version == current_sm:
116+
s = s.replace(f'sm{sm_version}',
117+
test_prefix.split('-')[0])
118+
except Exception:
119+
# If can't get SM version, skip SM-based filtering
120+
pass
121+
elif test_prefix.split('-')[0] in s:
107122
s = s.replace(test_prefix.split('-')[0], test_prefix)
108123
return s
109124
elif test_prefix:

0 commit comments

Comments
 (0)