Skip to content
Open
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 @@ -79,7 +79,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*" --exclude "sha2*"
run: cargo build --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*" --exclude "sha2*" --exclude "i128*"

# Don't currently test because many tests rely on the system having a CUDA GPU
# - name: Test
Expand All @@ -88,7 +88,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 "sha2*" --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 "i128*"--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 @@ -16,6 +16,8 @@ members = [
"examples/cuda/path_tracer/kernels",
"examples/cuda/sha2_crates_io",
"examples/cuda/sha2_crates_io/kernels",
"examples/cuda/i128_demo",
"examples/cuda/i128_demo/kernels",

"examples/optix/*",
"tests/compiletests",
Expand Down
Binary file modified crates/rustc_codegen_nvvm/libintrinsics.bc
Binary file not shown.
107 changes: 0 additions & 107 deletions crates/rustc_codegen_nvvm/libintrinsics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -239,113 +239,6 @@ start:
}
declare {i16, i1} @llvm.umul.with.overflow.i16(i16, i16) #0

; This is a bit weird, we need to use functions defined in rust crates (compiler_builtins)
; as intrinsics in the codegen, but we can't directly use their name, otherwise we will have
; really odd and incorrect behavior in the crate theyre defined in. So we need to make a wrapper for them that is opaque
; to the codegen, which is what this is doing.

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

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

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

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

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

define {<2 x i64>, i1} @__nvvm_u128_mulo(<2 x i64>, <2 x i64>) #0 {
start:
%2 = call {<2 x i64>, i1} @__rust_u128_mulo(<2 x i64> %0, <2 x i64> %1)
ret {<2 x i64>, i1} %2
}
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