Skip to content

Commit 26978b2

Browse files
committed
[SYCL][Fusion] Catch empty standard arguments
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
1 parent 4506db6 commit 26978b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sycl/source/detail/jit_compiler.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,10 @@ static ParamIterator preProcessArguments(
457457
// which will go out-of-scope before we execute the fused kernel. Therefore,
458458
// we need to copy the argument to a permant location and update the
459459
// argument.
460-
Arg->Arg.MPtr = storePlainArgRaw(ArgStorage, Arg->Arg.MPtr, Arg->Arg.MSize);
460+
if (Arg->Arg.MPtr) {
461+
Arg->Arg.MPtr =
462+
storePlainArgRaw(ArgStorage, Arg->Arg.MPtr, Arg->Arg.MSize);
463+
}
461464
// Standard layout arguments do not participate in identical argument
462465
// detection, but we still add it to the list here. As the SYCL runtime can
463466
// only check the raw bytes for identical content, but is unaware of the
@@ -474,6 +477,7 @@ static ParamIterator preProcessArguments(
474477
::jit_compiler::Parameter{Arg->KernelIndex, Arg->ArgIndex},
475478
Arg->Arg.MPtr, Arg->Arg.MSize);
476479
return ++Arg;
480+
477481
}
478482
// First check if there's already another parameter with identical
479483
// value.

0 commit comments

Comments
 (0)