Skip to content

Separately version the CUDA compiler #2801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 7, 2025
Merged

Separately version the CUDA compiler #2801

merged 5 commits into from
Jul 7, 2025

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Jun 26, 2025

ptxas and friends are now (unconditionally) provided by CUDA_Compiler_jll, sourced from either CUDA 11.8 or 12.9 depending on which driver is used. This makes sure we're using the latest compiler, which fixes bugs (especially 11.4 and 11.5 had plenty of them) and ensures we can target recent devices and PTX ISAs regardless of the runtime selected by the user.

This should also facilitate using NVVM instead of NVPTX, which doesn't support targeting older PTX ISAs.

Copy link
Contributor

github-actions bot commented Jun 26, 2025

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/compatibility.jl b/src/compatibility.jl
index 4ffcbce33..addba40b5 100644
--- a/src/compatibility.jl
+++ b/src/compatibility.jl
@@ -56,8 +56,8 @@ const cuda_cap_db = Dict(
     v"8.7"   => between(v"11.4", highest),
     v"8.9"   => between(v"11.8", highest),
     v"9.0"   => between(v"11.8", highest),
-    v"12.0"  => between(v"12.8", highest),
-    v"12.1"  => between(v"12.9", highest),
+    v"12.0" => between(v"12.8", highest),
+    v"12.1" => between(v"12.9", highest),
 )
 
 function cuda_cap_support(ver::VersionNumber)
@@ -293,7 +293,7 @@ function llvm_compat(version=LLVM.version())
     return (cap=cap_support, ptx=ptx_support)
 end
 
-function cuda_compat(driver=driver_version(), compiler=compiler_version())
+function cuda_compat(driver = driver_version(), compiler = compiler_version())
     # devices have to be supported by both the compiler and the driver
     driver_cap_support = cuda_cap_support(driver)
     compiler_cap_support = cuda_cap_support(compiler)

@maleadt maleadt force-pushed the tb/cuda_compiler branch from 7548592 to f07f7e0 Compare July 7, 2025 09:29
@maleadt maleadt merged commit e561e7a into master Jul 7, 2025
1 of 3 checks passed
@maleadt maleadt deleted the tb/cuda_compiler branch July 7, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant