Skip to content

Commit 97ff3f8

Browse files
committed
undo scope_asm change
1 parent c2e374d commit 97ff3f8

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

crates/cuda_builder/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ impl CudaBuilder {
368368
println!("cargo:warning=Build completed successfully, PTX file generated at: {}", path.display());
369369

370370
// run ptxas on it to validate
371-
// example: ptxas -v -arch=sm_120 /home/brandon/vanity-miner-rs/target/release/build/gpu_runner-34ef728ec383c50f/out/kernels.ptx -o /tmp/temp.cubin
372371
let ptxas_output = Command::new("ptxas")
373372
.arg("-v")
374373
.arg(format!("-arch={}", self.arch.to_string()))

crates/cuda_std/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ cuda_std_macros = { version = "0.2", path = "../cuda_std_macros" }
1313
half = "2.4.1"
1414
bitflags = "2.8"
1515
paste = "1.0.15"
16+
17+
[features]
18+
default = ["nvvm-v7"]
19+
nvvm-v7 = []
20+
nvvm-v19 = []

crates/cuda_std/src/atomic/intrinsics.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ macro_rules! load {
6868
#[allow(clippy::missing_safety_doc)]
6969
#[doc = concat!("Performs a ", stringify!($ordering), " atomic load at the ", stringify!($scope), " level with a width of ", stringify!($width), " bits")]
7070
pub unsafe fn [<atomic_load_ $ordering _ $width _ $scope>](ptr: *const [<u $width>]) -> [<u $width>] {
71+
// TODO: llvm-v19 needs $scope_asm instead of $scope
7172
let mut out;
7273
asm!(
73-
concat!("ld.", stringify!($ordering), load_scope!($ordering, $scope_asm), ".", stringify!([<u $width>]), " {}, [{}];"),
74+
concat!("ld.", stringify!($ordering), load_scope!($ordering, $scope), ".", stringify!([<u $width>]), " {}, [{}];"),
7475
out([<reg $width>]) out,
7576
in(reg64) ptr
7677
);
@@ -115,8 +116,9 @@ macro_rules! store {
115116
#[allow(clippy::missing_safety_doc)]
116117
#[doc = concat!("Performs a ", stringify!($ordering), " atomic store at the ", stringify!($scope), " level with a width of ", stringify!($width), " bits")]
117118
pub unsafe fn [<atomic_store_ $ordering _ $width _ $scope>](ptr: *mut [<u $width>], val: [<u $width>]) {
119+
// TODO: llvm-v19 needs $scope_asm instead of $scope
118120
asm!(
119-
concat!("st.", stringify!($ordering), load_scope!($ordering, $scope_asm), ".", stringify!([<u $width>]), " [{}], {};"),
121+
concat!("st.", stringify!($ordering), load_scope!($ordering, $scope), ".", stringify!([<u $width>]), " [{}], {};"),
120122
in(reg64) ptr,
121123
in([<reg $width>]) val,
122124
);

0 commit comments

Comments
 (0)