Repository navigation
[TIRx][CUDA] Support exact required block dimensions - #20223
Merged
jinhongyii merged 1 commit intoAug 29, 2026
Merged
Conversation
jinhongyii
approved these changes
Aug 29, 2026
tqchen
pushed a commit
that referenced
this pull request
Oct 16, 2026
This adds an exact CUDA launch contract for TIRx kernels that need PTX `.reqntid` rather than advisory launch bounds. - preserve `tirx.required_block_size` through host/device splitting - emit CUDA 13 `__block_size__` with static thread and cluster dimensions - pass the required-block flag through runtime metadata without adding a packed operand - launch with `CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM` and avoid duplicate cluster attributes - reject incompatible launch-bound and max-register controls Validation: - `cmake --build build --parallel` - `python -m pytest -q tests/python/tirx-transform/test_tir_transform_split_host_device.py tests/python/tirx/codegen/test_codegen_cuda.py` (225 passed) - `pre-commit run --files include/tvm/tirx/function.h src/backend/cuda/codegen/codegen_cuda.cc src/backend/cuda/runtime/cuda_module.cc src/runtime/metadata.h src/runtime/thread_storage_scope.h src/tirx/transform/split_host_device.cc tests/python/tirx-transform/test_tir_transform_split_host_device.py tests/python/tirx/codegen/test_codegen_cuda.py` - CUDA 13.2 SM100 runtime launch through a TIRx kernel with generated PTX `.reqntid 128,1,1`
tqchen
pushed a commit
that referenced
this pull request
Oct 18, 2026
This adds an exact CUDA launch contract for TIRx kernels that need PTX `.reqntid` rather than advisory launch bounds. - preserve `tirx.required_block_size` through host/device splitting - emit CUDA 13 `__block_size__` with static thread and cluster dimensions - pass the required-block flag through runtime metadata without adding a packed operand - launch with `CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM` and avoid duplicate cluster attributes - reject incompatible launch-bound and max-register controls Validation: - `cmake --build build --parallel` - `python -m pytest -q tests/python/tirx-transform/test_tir_transform_split_host_device.py tests/python/tirx/codegen/test_codegen_cuda.py` (225 passed) - `pre-commit run --files include/tvm/tirx/function.h src/backend/cuda/codegen/codegen_cuda.cc src/backend/cuda/runtime/cuda_module.cc src/runtime/metadata.h src/runtime/thread_storage_scope.h src/tirx/transform/split_host_device.cc tests/python/tirx-transform/test_tir_transform_split_host_device.py tests/python/tirx/codegen/test_codegen_cuda.py` - CUDA 13.2 SM100 runtime launch through a TIRx kernel with generated PTX `.reqntid 128,1,1`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an exact CUDA launch contract for TIRx kernels that need PTX
.reqntidrather than advisory launch bounds.tirx.required_block_sizethrough host/device splitting__block_size__with static thread and cluster dimensionsCU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIMand avoid duplicate cluster attributesValidation:
cmake --build build --parallelpython -m pytest -q tests/python/tirx-transform/test_tir_transform_split_host_device.py tests/python/tirx/codegen/test_codegen_cuda.py(225 passed)pre-commit run --files include/tvm/tirx/function.h src/backend/cuda/codegen/codegen_cuda.cc src/backend/cuda/runtime/cuda_module.cc src/runtime/metadata.h src/runtime/thread_storage_scope.h src/tirx/transform/split_host_device.cc tests/python/tirx-transform/test_tir_transform_split_host_device.py tests/python/tirx/codegen/test_codegen_cuda.py.reqntid 128,1,1