Skip to content

Commit 426a1d3

Browse files
authored
Merge branch 'main' into dev/fix-build-bug
2 parents bc40db5 + 6a6dcda commit 426a1d3

File tree

30 files changed

+90
-77
lines changed

30 files changed

+90
-77
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/checkout@v2
3434

3535
- name: Install CUDA
36-
uses: Jimver/[email protected].4
36+
uses: Jimver/[email protected].21
3737
id: cuda-toolkit
3838
with:
3939
cuda: '11.2.2'
@@ -74,4 +74,4 @@ jobs:
7474
- name: Check documentation
7575
env:
7676
RUSTDOCFLAGS: -Dwarnings
77-
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix" --exclude "path_tracer" --exclude "denoiser" --exclude "add" --exclude "ex*"
77+
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix" --exclude "path_tracer" --exclude "denoiser" --exclude "add" --exclude "ex*"

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
[workspace]
2+
3+
resolver = "2"
4+
25
members = [
36
"crates/*",
47
"crates/optix/examples/ex*",

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ Other projects related to using Rust on the GPU:
8282
- 2020: [rlsl](https://github.com/MaikKlein/rlsl) Experimental Rust -> SPIR-V compiler (predecessor to rust-gpu)
8383
- 2020: [rust-gpu](https://github.com/Rust-GPU/rust-gpu) `rustc` compiler backend to compile Rust to SPIR-V for use in shaders, similar mechanism as our project.
8484

85+
## Usage
86+
```bash
87+
## setup your environment like:
88+
### export OPTIX_ROOT=/opt/NVIDIA-OptiX-SDK-9.0.0-linux64-x86_64
89+
### export OPTIX_ROOT_DIR=/opt/NVIDIA-OptiX-SDK-9.0.0-linux64-x86_64
90+
91+
## build proj
92+
cargo build
93+
```
94+
8595
## License
8696

8797
Licensed under either of

crates/blastoff/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ authors = ["Riccardo D'Ambrosio <[email protected]>"]
66
repository = "https://github.com/Rust-GPU/Rust-CUDA"
77

88
[dependencies]
9-
bitflags = "1.3.2"
9+
bitflags = "2.8"
1010
cublas_sys = { version = "0.1", path = "../cublas_sys" }
1111
cust = { version = "0.3", path = "../cust", features = ["impl_num_complex"] }
12-
num-complex = "0.4.0"
13-
half = { version = "1.8.0", optional = true }
12+
num-complex = "0.4.6"
13+
half = { version = "2.4.1", optional = true }
1414

1515
[package.metadata.docs.rs]
1616
rustdoc-args = ["--html-in-header", "katex-header.html", "--cfg", "docsrs"]

crates/cuda_builder/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ readme = "../../README.md"
1111
[dependencies]
1212
rustc_codegen_nvvm = { version = "0.3", path = "../rustc_codegen_nvvm" }
1313
nvvm = { path = "../nvvm", version = "0.1" }
14-
serde = { version = "1.0.130", features = ["derive"] }
15-
serde_json = "1.0.68"
14+
serde = { version = "1.0.217", features = ["derive"] }
15+
serde_json = "1.0.138"
1616
find_cuda_helper = { version = "0.2", path = "../find_cuda_helper" }

crates/cuda_std/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ repository = "https://github.com/Rust-GPU/Rust-CUDA"
88
readme = "../../README.md"
99

1010
[dependencies]
11-
vek = { version = "0.15.1", default-features = false, features = ["libm"] }
11+
vek = { version = "0.17.1", default-features = false, features = ["libm"] }
1212
cuda_std_macros = { version = "0.2", path = "../cuda_std_macros" }
13-
half = "1.7.1"
14-
bitflags = "1.3.2"
15-
paste = "1.0.5"
13+
half = "2.4.1"
14+
bitflags = "2.8"
15+
paste = "1.0.15"

crates/cuda_std/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ pub mod prelude {
7676
};
7777
}
7878

79-
#[cfg(any(target_arch = "nvptx", target_arch = "nvptx64"))]
79+
#[cfg(target_arch = "nvptx64")]
8080
#[alloc_error_handler]
8181
fn alloc_handler(layout: core::alloc::Layout) -> ! {
8282
core::panic!("Memory allocation of {} bytes failed", layout.size());
8383
}
8484

8585
// FIXME(RDambrosio016): For some very odd reason, this function causes an InvalidAddress error when called,
8686
// despite it having no reason for doing that. It needs more debugging to see what is causing it exactly. For now we just trap.
87-
#[cfg(any(target_arch = "nvptx", target_arch = "nvptx64"))]
87+
#[cfg(target_arch = "nvptx64")]
8888
#[panic_handler]
8989
fn panic(_info: &core::panic::PanicInfo) -> ! {
9090
// use crate::prelude::*;

crates/cuda_std_macros/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ readme = "../../README.md"
1111
proc-macro = true
1212

1313
[dependencies]
14-
quote = "1.0.9"
15-
syn = { version = "1.0.75", features = ["full"] }
16-
proc-macro2 = "1"
14+
quote = "1.0.38"
15+
syn = { version = "2.0.96", features = ["full"] }
16+
proc-macro2 = "1.0.93"

crates/cuda_std_macros/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn kernel(input: proc_macro::TokenStream, item: proc_macro::TokenStream) ->
2727
let mut item = parse_macro_input!(item as ItemFn);
2828
let no_mangle = parse_quote!(#[no_mangle]);
2929
item.attrs.push(no_mangle);
30-
let internal = parse_quote!(#[cfg_attr(any(target_arch="nvptx", target_arch="nvptx64"), nvvm_internal(kernel(#input)))]);
30+
let internal = parse_quote!(#[cfg_attr(target_arch="nvptx64", nvvm_internal(kernel(#input)))]);
3131
item.attrs.push(internal);
3232

3333
// used to guarantee some things about how params are passed in the codegen.
@@ -156,7 +156,7 @@ pub fn gpu_only(_attr: proc_macro::TokenStream, item: proc_macro::TokenStream) -
156156

157157
let mut cloned_attrs = attrs.clone();
158158
cloned_attrs.retain(|a| {
159-
!a.path
159+
!a.path()
160160
.get_ident()
161161
.map(|x| *x == "nvvm_internal")
162162
.unwrap_or_default()
@@ -170,13 +170,13 @@ pub fn gpu_only(_attr: proc_macro::TokenStream, item: proc_macro::TokenStream) -
170170
};
171171

172172
let output = quote::quote! {
173-
#[cfg(not(any(target_arch="nvptx", target_arch="nvptx64")))]
173+
#[cfg(not(target_arch="nvptx64"))]
174174
#[allow(unused_variables)]
175175
#(#cloned_attrs)* #vis #sig_cpu {
176176
unimplemented!(concat!("`", stringify!(#fn_name), "` can only be used on the GPU with rustc_codegen_nvvm"))
177177
}
178178

179-
#[cfg(any(target_arch="nvptx", target_arch="nvptx64"))]
179+
#[cfg(target_arch="nvptx64")]
180180
#(#attrs)* #vis #sig {
181181
#block
182182
}
@@ -199,7 +199,7 @@ pub fn externally_visible(
199199
let mut func = syn::parse_macro_input!(item as syn::ItemFn);
200200

201201
assert!(
202-
func.attrs.iter().any(|a| a.path.is_ident("no_mangle")),
202+
func.attrs.iter().any(|a| a.path().is_ident("no_mangle")),
203203
"#[externally_visible] function should also be #[no_mangle]"
204204
);
205205

crates/cudnn/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ name = "cudnn"
55
version = "0.1.0"
66

77
[dependencies]
8-
bitflags = "1.3.2"
8+
bitflags = "2.8"
99
cust = {version = "0.3.2", path = "../cust"}

0 commit comments

Comments
 (0)