diff options
| author | Simon Kallweit <64953474+skallweitNV@users.noreply.github.com> | 2025-04-14 21:10:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-14 12:10:15 -0700 |
| commit | d6f4780e8a608fa37597116d5b0ac5c80034c2aa (patch) | |
| tree | 296fe01a3625b840bfcf1d3f454eb68005e4d1df /source/compiler-core/slang-nvrtc-compiler.cpp | |
| parent | 387deedac3b61dd133fb529dc941483bc021f386 (diff) | |
try to find cuda headers in /usr/include (#6800)
Co-authored-by: Simon Kallweit <simon.kallweit@gmail.com>
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/compiler-core/slang-nvrtc-compiler.cpp')
| -rw-r--r-- | source/compiler-core/slang-nvrtc-compiler.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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; } |
