From d6f4780e8a608fa37597116d5b0ac5c80034c2aa Mon Sep 17 00:00:00 2001 From: Simon Kallweit <64953474+skallweitNV@users.noreply.github.com> Date: Mon, 14 Apr 2025 21:10:15 +0200 Subject: try to find cuda headers in /usr/include (#6800) Co-authored-by: Simon Kallweit Co-authored-by: Yong He --- source/compiler-core/slang-nvrtc-compiler.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/compiler-core') diff --git a/source/compiler-core/slang-nvrtc-compiler.cpp b/source/compiler-core/slang-nvrtc-compiler.cpp index 0042ad708..0811a072f 100644 --- a/source/compiler-core/slang-nvrtc-compiler.cpp +++ b/source/compiler-core/slang-nvrtc-compiler.cpp @@ -705,6 +705,19 @@ SlangResult NVRTCDownstreamCompiler::_findCUDAIncludePath(String& outPath) } } +#if SLANG_LINUX_FAMILY + // Try /usr/include + { + String includePath = "/usr/include"; + + if (File::exists(Path::combine(includePath, g_fp16HeaderName))) + { + outPath = includePath; + return SLANG_OK; + } + } +#endif + return SLANG_E_NOT_FOUND; } -- cgit v1.2.3