Repository navigation
Description
System Info
- CPU architecture: N/A (code inspection issue)
- GPU: NVIDIA GB10 / DGX Spark (SM121); also implicitly affects RTX PRO 6000 (SM120, already on the allowlist)
- TensorRT-LLM branch:
main(verified at 2026-06-26) - OS: N/A
- Additional information:
- Identified by inspecting the
enable_cuda_coreallowlists. - No specific hardware run required to observe the inconsistency.
- Identified by inspecting the
Who can help?
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
While reviewing FP8 linear fast-path gating, I noticed that the cuda_scaled_mm low-batch fast path is gated by a hard-coded SM-capability allowlist that includes SM89 and SM120 but excludes SM121. The same allowlist appears in two places and the comment in linear.py confirms SM120 was added intentionally — SM121 looks unintentional rather than deliberate.
Relevant code:
tensorrt_llm/_torch/modules/linear.py:3261-3267 (inside class Linear):
self.enable_cuda_core = False
if torch.cuda.is_available():
capability = torch.cuda.get_device_capability(
torch.device('cuda:0'))
# enable cuda core for sm89 and sm120
self.enable_cuda_core = (capability[0] == 8 and capability[1] == 9) \
or (capability[0] == 12 and capability[1] == 0)Consumed at linear.py:667:
if module.enable_cuda_core and qinput.shape[0] <= 8:
output = torch.ops.trtllm.cuda_scaled_mm(...)tensorrt_llm/_torch/auto_deploy/custom_ops/quantization/quant.py:109-114 (inside _trtllm_fp8_prequant_linear_core):
enable_cuda_core = False
if torch.cuda.is_available():
capability = torch.cuda.get_device_capability(0)
enable_cuda_core = capability == (8, 9) or capability == (12, 0)
if x.shape[0] <= 8 and enable_cuda_core:
output = torch.ops.trtllm.cuda_scaled_mm(...)On a DGX Spark GB10 (torch.cuda.get_device_capability() == (12, 1)), both flags resolve to False, so the cuda_scaled_mm path is unreachable for M ≤ 8 (decode-time) and the generic scaled-mm path is taken instead. No log or warning is emitted.
I could not find any code, comments, tests, or commit history indicating that SM121 is intentionally excluded from this fast path. The accompanying comment in linear.py (# enable cuda core for sm89 and sm120) reads as a list of supported architectures rather than a deliberate exclusion of SM121.
Expected behavior
| Hardware | enable_cuda_core |
|---|---|
| SM89 (Ada) | True |
| SM120 (RTX PRO 6000 Blackwell) | True |
| SM121 (GB10 / DGX Spark) | True |
Both linear.py and quant.py extend their allowlists to (8, 9), (12, 0), and (12, 1).
actual behavior
enable_cuda_core is False on SM121 in both files. FP8 linear at M ≤ 8 silently falls back to the generic scaled-mm path.
additional notes
- A one-line fix is to extend both allowlists to include
(12, 1):tensorrt_llm/_torch/modules/linear.py:3266-3267→
self.enable_cuda_core = capability in ((8, 9), (12, 0), (12, 1))tensorrt_llm/_torch/auto_deploy/custom_ops/quantization/quant.py:112→ same form
- A small follow-up refactor could centralize the allowlist into a shared constant so the two sites cannot drift again. Not required to unblock SM121.
- Out of scope here: both sites query device 0 at init time (
torch.device("cuda:0")/get_device_capability(0)) rather than the device the tensors will actually live on. This is a pre-existing issue that already affects SM89 and SM120; fixing it cleanly requires moving the check to dispatch time. - PR [#15673][fix] Enable CUDA core fast path for SM89/SM120/SM121 #12705 implements the one-line fix above.
Before submitting a new issue...
- Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
Activity
[#15673][fix] Enable CUDA core fast path for SM89/SM120/SM121 (#12705)
Merge branch 'main' of https://github.com/NVIDIA/TensorRT-LLM into ha…
Merge branch 'main' of https://github.com/NVIDIA/TensorRT-LLM into ha…