[https://nvbugs/6595612][fix] Use CuTe DSL string rounding modes in VSA - #17592
[https://nvbugs/6595612][fix] Use CuTe DSL string rounding modes in VSA#17592JiaxuanBai wants to merge 1 commit into
Conversation
CuTe DSL 4.4 and later expect string literals for rounding mode arguments in the public cute.arch wrappers. Using nvvm.RoundingModeKind makes the VSA module fail to import with newer nvidia-cutlass-dsl releases because that private enum is no longer exported. Replace the RN and RM enum values with "rn" and "rm". This preserves the existing rounding behavior while using the supported wrapper API. Test: python3 -m py_compile tensorrt_llm/_torch/visual_gen/cute_dsl_kernels/blackwell/video_sparse_attention/ptx.py Signed-off-by: Jiaxuan Bai <jbai@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThe change replaces NVVM rounding-mode enum constants with string values in two packed FP32 operations: round-nearest subtraction and round-down addition. ChangesRounding mode argument updates
Estimated code review effort: 1 (Trivial) | ~2 minutes Mergeability Score: ⚪ Minimal · up to This localized change preserves existing rounding behavior while restoring compatibility with newer CuTe DSL releases; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Dev Engineer Review
"rn"and"rm"string literals tocute.arch.py_compileandgit diff --checkpassed.QA Engineer Review
No test changes.
Description
The Video Sparse Attention CuTe DSL kernel passes
nvvm.RoundingModeKindvalues to publiccute.archwrappers. CuTe DSL 4.4.0 and later require string literals for these arguments, and newer generated NVVM bindings no longer exportRoundingModeKind. This causes TensorRT-LLM import and test collection to fail with recentnvidia-cutlass-dslreleases.Replace
RoundingModeKind.RNandRoundingModeKind.RMwith the supported"rn"and"rm"literals. This preserves the existing rounding behavior. It does not change the public API, numerical behavior, performance, dependencies, ownership, documentation, or architecture.Test Coverage
python3 -m py_compile tensorrt_llm/_torch/visual_gen/cute_dsl_kernels/blackwell/video_sparse_attention/ptx.py— passed.git diff --check— passed.tests/unittest/_torch/visual_gen/test_attention_cute_dsl_vsa.py::test_cute_kernel_matches_dense_at_full_topk. This was not run locally because the host does not have pytest or a compatible CUDA GPU.PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.