[triton][beta] Fix smem_budget query for offline compilation#1104
Open
Sibylau wants to merge 2 commits intofacebookexperimental:mainfrom
Open
[triton][beta] Fix smem_budget query for offline compilation#1104Sibylau wants to merge 2 commits intofacebookexperimental:mainfrom
Sibylau wants to merge 2 commits intofacebookexperimental:mainfrom
Conversation
Summary: D95898963 added `smem_budget` as a parameter to `add_hopper_warpspec`, querying it via `rt_driver.active.utils.get_device_properties()`. This requires a live GPU driver, but Triton CC compiles kernels on RE (remote execution) where no GPU is available, causing `RuntimeError: 0 active drivers`. In addition to D96671173, this diff tries querying the GPU driver first and falls back to a static lookup table when no driver is available. The fallback values are `CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN` per the CUDA Programming Guide. Reviewed By: njriasan Differential Revision: D97003359
Contributor
Contributor
meta-codesync bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
Summary: D95898963 added `smem_budget` as a parameter to `add_hopper_warpspec`, querying it via `rt_driver.active.utils.get_device_properties()`. This requires a live GPU driver, but Triton CC compiles kernels on RE (remote execution) where no GPU is available, causing `RuntimeError: 0 active drivers`. In addition to D96671173, this diff tries querying the GPU driver first and falls back to a static lookup table when no driver is available. The fallback values are `CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN` per the CUDA Programming Guide. Differential Revision: D97003359 Pulled By: Sibylau fbshipit-source-id: a53c72998dafadf58e9919ee7cfb2983a57a4904
njriasan
approved these changes
Mar 18, 2026
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.
Summary:
D95898963 added
smem_budgetas a parameter toadd_hopper_warpspec, querying it viart_driver.active.utils.get_device_properties(). This requires a live GPU driver, but Triton CC compiles kernels on RE (remote execution) where no GPU is available, causingRuntimeError: 0 active drivers.In addition to D96671173, this diff tries querying the GPU driver first and falls back to a static lookup table when no driver is available. The fallback values are
CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTINper the CUDA Programming Guide.Reviewed By: njriasan
Differential Revision: D97003359