From d98e3f3281378c134d643cc3dd28ba3ca031a349 Mon Sep 17 00:00:00 2001 From: Simon Kallweit <64953474+skallweitNV@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:05:51 +0100 Subject: 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 --- source/compiler-core/slang-nvrtc-compiler.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source') 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; } } -- cgit v1.2.3