From dc45802707b6e3f1a3eedc8e8a5583102b2d8a0d Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 5 Apr 2023 11:19:00 -0700 Subject: 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 --- source/slang/slang-ir-synthesize-active-mask.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source') 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() || + callee->findDecoration()) + 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() ) + if (!m_func->findDecoration() && + !m_func->findDecoration()) { // We simplyu need to add a new parameter to the entry block // (which holds the parameters for the function itself). -- cgit v1.2.3