diff options
| m--------- | external/slang-rhi | 0 | ||||
| -rw-r--r-- | source/compiler-core/slang-nvrtc-compiler.cpp | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/external/slang-rhi b/external/slang-rhi -Subproject 19bc575bc193e92210649d6d84ac202b199b29a +Subproject d1f2718165d0d540c8fc1eacf20b9edd2d6faac diff --git a/source/compiler-core/slang-nvrtc-compiler.cpp b/source/compiler-core/slang-nvrtc-compiler.cpp index f39dc2fbf..0042ad708 100644 --- a/source/compiler-core/slang-nvrtc-compiler.cpp +++ b/source/compiler-core/slang-nvrtc-compiler.cpp @@ -943,6 +943,9 @@ SlangResult NVRTCDownstreamCompiler::compile( CommandLine cmdLine; + // --dopt option is only available in CUDA 11.7 and later + bool hasDoptOption = m_desc.version >= SemanticVersion(11, 7); + switch (options.debugInfoType) { case DebugInfoType::None: @@ -952,12 +955,20 @@ SlangResult NVRTCDownstreamCompiler::compile( default: { cmdLine.addArg("--device-debug"); + if (hasDoptOption) + { + cmdLine.addArg("--dopt=on"); + } break; } case DebugInfoType::Maximal: { cmdLine.addArg("--device-debug"); cmdLine.addArg("--generate-line-info"); + if (hasDoptOption) + { + cmdLine.addArg("--dopt=on"); + } break; } } |
