Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: cargo build --all-features -p cust_raw

- name: Build
run: cargo build --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*"
run: cargo build --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*" --exclude "sha2*"

# Don't currently test because many tests rely on the system having a CUDA GPU
# - name: Test
Expand All @@ -86,7 +86,7 @@ jobs:
- name: Check documentation
env:
RUSTDOCFLAGS: -Dwarnings
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*" --exclude "cust_raw"
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*" --exclude "sha2*" --exclude "cust_raw"
# Disabled due to dll issues, someone with Windows knowledge needed
# - name: Compiletest
# run: cargo run -p compiletests --release --no-default-features -- --target-arch compute_61,compute_70,compute_90
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ members = [
"examples/cuda/gemm/kernels",
"examples/cuda/path_tracer",
"examples/cuda/path_tracer/kernels",
"examples/cuda/sha2_crates_io",
"examples/cuda/sha2_crates_io/kernels",

"examples/optix/*",
"tests/compiletests",
Expand Down
4 changes: 2 additions & 2 deletions crates/optix-sys/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {

println!("cargo::rerun-if-changed=build");
for e in sdk.related_optix_envs() {
println!("cargo::rerun-if-env-changed={}", e);
println!("cargo::rerun-if-env-changed={e}");
}
// Emit metadata for the build script.
println!("cargo::metadata=root={}", sdk.optix_root().display());
Expand All @@ -36,7 +36,7 @@ fn main() {
let metadata_optix_include = env::join_paths(sdk.optix_include_paths())
.map(|s| s.to_string_lossy().to_string())
.expect("Failed to build metadata for include.");
println!("cargo::metadata=include_dir={}", metadata_optix_include);
println!("cargo::metadata=include_dir={metadata_optix_include}");

// Generate optix bindings.
create_optix_bindings(&sdk, &cuda_include_paths);
Expand Down
2 changes: 1 addition & 1 deletion crates/optix-sys/build/optix_sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl OptiXSdk {
.ok_or("Cannot find OPTIX_VERSION from OptiX header file.")?;
let version = version
.parse::<u32>()
.map_err(|_| format!("Cannot parse OPTIX_VERSION as u32: '{}'", version))?;
.map_err(|_| format!("Cannot parse OPTIX_VERSION as u32: '{version}'"))?;
Ok(version)
}
}
Binary file modified crates/rustc_codegen_nvvm/libintrinsics.bc
Binary file not shown.
60 changes: 60 additions & 0 deletions crates/rustc_codegen_nvvm/libintrinsics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,66 @@ start:
}
declare {<2 x i64>, i1} @__rust_u128_mulo(<2 x i64>, <2 x i64>) #0

; Division operations from compiler-builtins
define <2 x i64> @__nvvm_divti3(<2 x i64>, <2 x i64>) #0 {
start:
%2 = call <2 x i64> @__divti3(<2 x i64> %0, <2 x i64> %1)
ret <2 x i64> %2
}
declare <2 x i64> @__divti3(<2 x i64>, <2 x i64>) #0

define <2 x i64> @__nvvm_udivti3(<2 x i64>, <2 x i64>) #0 {
start:
%2 = call <2 x i64> @__udivti3(<2 x i64> %0, <2 x i64> %1)
ret <2 x i64> %2
}
declare <2 x i64> @__udivti3(<2 x i64>, <2 x i64>) #0

; Remainder operations from compiler-builtins
define <2 x i64> @__nvvm_modti3(<2 x i64>, <2 x i64>) #0 {
start:
%2 = call <2 x i64> @__modti3(<2 x i64> %0, <2 x i64> %1)
ret <2 x i64> %2
}
declare <2 x i64> @__modti3(<2 x i64>, <2 x i64>) #0

define <2 x i64> @__nvvm_umodti3(<2 x i64>, <2 x i64>) #0 {
start:
%2 = call <2 x i64> @__umodti3(<2 x i64> %0, <2 x i64> %1)
ret <2 x i64> %2
}
declare <2 x i64> @__umodti3(<2 x i64>, <2 x i64>) #0

; Multiplication from compiler-builtins
define <2 x i64> @__nvvm_multi3(<2 x i64>, <2 x i64>) #0 {
start:
%2 = call <2 x i64> @__multi3(<2 x i64> %0, <2 x i64> %1)
ret <2 x i64> %2
}
declare <2 x i64> @__multi3(<2 x i64>, <2 x i64>) #0

; Shift operations from compiler-builtins
define <2 x i64> @__nvvm_ashlti3(<2 x i64>, i32) #0 {
start:
%2 = call <2 x i64> @__ashlti3(<2 x i64> %0, i32 %1)
ret <2 x i64> %2
}
declare <2 x i64> @__ashlti3(<2 x i64>, i32) #0

define <2 x i64> @__nvvm_ashrti3(<2 x i64>, i32) #0 {
start:
%2 = call <2 x i64> @__ashrti3(<2 x i64> %0, i32 %1)
ret <2 x i64> %2
}
declare <2 x i64> @__ashrti3(<2 x i64>, i32) #0

define <2 x i64> @__nvvm_lshrti3(<2 x i64>, i32) #0 {
start:
%2 = call <2 x i64> @__lshrti3(<2 x i64> %0, i32 %1)
ret <2 x i64> %2
}
declare <2 x i64> @__lshrti3(<2 x i64>, i32) #0

; Required because we need to explicitly generate { i32, i1 } for the following intrinsics
; except rustc will not generate them (it will make { i32, i8 }) which libnvvm rejects.

Expand Down
Loading
Loading