summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-04-05 11:19:00 -0700
committerGitHub <noreply@github.com>2023-04-05 11:19:00 -0700
commitdc45802707b6e3f1a3eedc8e8a5583102b2d8a0d (patch)
tree5a80788d03767b71797de09070d6a932c9a20775 /source
parent5d0fe48c01e84f2f6247145ea92da9a63ce03734 (diff)
Fix linking issue in slangpy + no mask param for kernels. (#2778)
* Fix linking issue in slangpy + no mask param for kernels. * add cuda header changes * fix * More correct change of active mask insertion. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir-synthesize-active-mask.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/slang/slang-ir-synthesize-active-mask.cpp b/source/slang/slang-ir-synthesize-active-mask.cpp
index 39adb7e81..1237a48c2 100644
--- a/source/slang/slang-ir-synthesize-active-mask.cpp
+++ b/source/slang/slang-ir-synthesize-active-mask.cpp
@@ -270,6 +270,11 @@ struct SynthesizeActiveMaskForModuleContext
void markAndModifyFuncsIndirectlyUsingActiveMask(IRFunc* callee)
{
+ // This transform does not apply to host or kernel callees.
+ if (callee->findDecoration<IRCudaHostDecoration>() ||
+ callee->findDecoration<IRCudaKernelDecoration>())
+ return;
+
// In order to detect functions that indirectly use the active
// mask through `callee`, we need to identify call sites.
//
@@ -699,7 +704,8 @@ struct SynthesizeActiveMaskForFunctionContext
// The easy case is ordinary functions (ones that aren't entry
// points).
//
- if( !m_func->findDecoration<IREntryPointDecoration>() )
+ if (!m_func->findDecoration<IREntryPointDecoration>() &&
+ !m_func->findDecoration<IRCudaKernelDecoration>())
{
// We simplyu need to add a new parameter to the entry block
// (which holds the parameters for the function itself).