Skip to content

Commit 400f816

Browse files
authored
Small Compatibility Fix for CUDA 12.8. (#165)
The latest version of CUDA ships libnvvm with version 2.0, which fails the check for an appropriate version number. This commit fixes this so that 2.0 correctly passes the minimum version number check.
1 parent 1083480 commit 400f816

File tree

1 file changed

+1
-1
lines changed
  • crates/rustc_codegen_nvvm/src

1 file changed

+1
-1
lines changed

Diff for: crates/rustc_codegen_nvvm/src/nvvm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub fn codegen_bitcode_modules(
6363
// make sure the nvvm version is high enough so users don't get confusing compilation errors.
6464
let (major, minor) = nvvm::ir_version();
6565

66-
if minor < 6 || major < 1 {
66+
if major <= 1 && minor < 6 {
6767
sess.dcx()
6868
.fatal("rustc_codegen_nvvm requires at least libnvvm 1.6 (CUDA 11.2)");
6969
}

0 commit comments

Comments
 (0)