summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-06-14 05:37:30 -0700
committerGitHub <noreply@github.com>2025-06-14 05:37:30 -0700
commitbb03daf205285f1e02e489f85cd17800bbe09a22 (patch)
tree8490f9ed436f5d7e6a8cc3c49ab90f1bffaa37ba
parent6e570b589f61d126fec6062b4ebdce232cd32810 (diff)
Bump the min shader model version for CUDA 12.8+ (#7415)
-rw-r--r--source/compiler-core/slang-nvrtc-compiler.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/compiler-core/slang-nvrtc-compiler.cpp b/source/compiler-core/slang-nvrtc-compiler.cpp
index 0811a072f..162e91353 100644
--- a/source/compiler-core/slang-nvrtc-compiler.cpp
+++ b/source/compiler-core/slang-nvrtc-compiler.cpp
@@ -1051,10 +1051,18 @@ SlangResult NVRTCDownstreamCompiler::compile(
SemanticVersion version(3);
// Newer releases of NVRTC only support newer CUDA architectures.
- if (m_desc.version.m_major >= 12)
+ if (m_desc.version.m_major > 12 ||
+ (m_desc.version.m_major == 12 && m_desc.version.m_minor >= 8))
{
- // NVRTC in CUDA 12 only supports `compute_50` and up
- // (with everything before `compute_52` being deprecated).
+ // NVRTC 12.8+ warns about architectures prior to compute_75 being deprecated
+ // The exact warning message is:
+ // nvrtc 12.8: nvrtc: warning : Architectures prior to '<compute/sm>_75' are
+ // deprecated and may be removed in a future release
+ version = SemanticVersion(7, 5);
+ }
+ else if (m_desc.version.m_major == 12)
+ {
+ // NVRTC 12.0 supports `compute_50` and up
version = SemanticVersion(5, 0);
}
else if (m_desc.version.m_major == 11)