fix(mir-importer): dispatch sync_threads via its canonical thread:: path#360
Open
haixuanTao wants to merge 1 commit into
Open
fix(mir-importer): dispatch sync_threads via its canonical thread:: path#360haixuanTao wants to merge 1 commit into
haixuanTao wants to merge 1 commit into
Conversation
Every sreg accessor arm matches both the crate-root re-export path and the
canonical module path ("cuda_device::threadIdx_x" |
"cuda_device::thread::threadIdx_x"), but the barrier arm only matched
"cuda_device::sync_threads". A call that resolves through the canonical
`cuda_device::thread::sync_threads` path (e.g. from a dependency crate
calling the API by full path) missed intrinsic dispatch and fell through to
a plain function call against a symbol no definition provides, failing
module verification with "Symbol cuda_device__thread__sync_threads not
found". Add the missing alias, matching the sreg arms.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: haixuantao <tao.xavier@1ms.ai>
This was referenced Jul 9, 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
Every sreg accessor arm in
try_dispatch_intrinsicmatches both the crate-root re-export path and the canonical module path ("cuda_device::threadIdx_x" | "cuda_device::thread::threadIdx_x"), but the barrier arm only matches"cuda_device::sync_threads". A call that resolves through the canonicalcuda_device::thread::sync_threadspath — e.g. a dependency crate calling the API by full path — misses intrinsic dispatch and falls through to a plain function call against a symbol no definition provides, failing module verification with "Symbol cuda_device__thread__sync_threads not found". (Found while porting a multi-crate shader codebase whose support crate callscuda_device::thread::sync_threads()directly; mentioned in #359.)Changes
"cuda_device::thread::sync_threads"alias to the barrier dispatch arm, matching the sreg arms' pattern.cuda_devicemodule tree:sync_threadswas the only function with a root-path arm but no canonical-path alias.Testing
cargo test -p mir-importer— all green.Downstream validation: a support crate calling
cuda_device::thread::sync_threads()by full path fails module verification without this change and compiles + runs correctly (barrier lowers tobar.sync) with it.cargo testpassesNew example — not applicable (one-line dispatch alias)
Checklist
git commit -s)🤖 Generated with Claude Code