diff options
| author | Yong He <yonghe@outlook.com> | 2023-03-17 15:57:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-17 15:57:22 -0700 |
| commit | 7f11f883d0781952f002b3aa3222a3aa0040f18a (patch) | |
| tree | 08eaf10fef39211fbc3f124679bfe8a35775a5a7 /source/slang/slang-options.cpp | |
| parent | 4b55bf6d75bdeed087728505a1c9b43d3a99af8d (diff) | |
Add support for emitting cuda kernel and host functions. (#2712)
* Add support for emitting cuda kernel and host functions.
* Update test.
* Fix cuda preamble emit.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index f6932b9e0..714e2c99d 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -2189,10 +2189,12 @@ struct OptionsParser } // If we don't have any raw outputs but do have a raw target, - // and output type is callable, add an empty' rawOutput. + // add an empty' rawOutput for certain targets where the expected behavior is obvious. if (rawOutputs.getCount() == 0 && rawTargets.getCount() == 1 && - ArtifactDescUtil::makeDescForCompileTarget(asExternal(rawTargets[0].format)).kind == ArtifactKind::HostCallable) + (rawTargets[0].format == CodeGenTarget::HostCPPSource || + rawTargets[0].format == CodeGenTarget::CUDASource || + ArtifactDescUtil::makeDescForCompileTarget(asExternal(rawTargets[0].format)).kind == ArtifactKind::HostCallable)) { RawOutput rawOutput; rawOutput.impliedFormat = rawTargets[0].format; |
