ITADN

Invalid PTX generation for atomic load/store: incorrect scope suffix

#354OpenSnehal-Reddy 创建于 2026-02-08
S
Snehal-Reddycommented
First off, thanks for all the effort put into `rust-cuda` and `cuda_std`. I've been working with the atomic intrinsics and noticed a small issue in how the PTX assembly is generated for `load` and `store` operations within `crates/cuda_std/src/atomic/intrinsics.rs`. **The Issue**: The `load_scope!` macro currently uses the Rust-level identifier (`$scope`) instead of the assembly-level identifier (`$scope_asm`) when generating the instruction string. For example, when generating a relaxed load at the device level: - **Current Output:** `ld.relaxed.device.u32 ...` (uses `$scope`: "device") - **Expected Output:** `ld.relaxed.gpu.u32 ...` (should use `$scope_asm`: "gpu") It looks like the other macros in the file (like `atomic_fetch_op_2_reg`) are already correctly using `$scope_asm`.
0 条评论