diff options
| author | Simon Kallweit <64953474+skallweitNV@users.noreply.github.com> | 2025-01-14 19:05:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-14 10:05:51 -0800 |
| commit | d98e3f3281378c134d643cc3dd28ba3ca031a349 (patch) | |
| tree | 4e46dd21ff48ace39a8d198b3b35dee1f294eae8 | |
| parent | 11575d21934caef511147b279c7495df3efa0ba3 (diff) | |
update slang-rhi + fix nvrtc options (#6080)
* update slang-rhi
* pass --dopt=on to nvrtc when enabling debug information
* fix leaks in slang-rhi
* update slang-rhi
* only use --dopt when available
---------
Co-authored-by: Yong He <yonghe@outlook.com>
| 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; } } |
