Skip to content

Commit

Permalink
Clone kernel call instead of recreating it
Browse files Browse the repository at this point in the history
  • Loading branch information
kchristin22 committed Nov 9, 2024
1 parent b00cd15 commit b851139
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Differentiator/ReverseModeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2303,6 +2303,9 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context,
m_ExternalSource->ActBeforeFinalizingVisitCallExpr(
CE, OverloadedDerivedFn, DerivedCallArgs, CallArgDx, asGrad);

if (isa<CUDAKernelCallExpr>(CE))
return StmtDiff(Clone(CE));

Expr* call = nullptr;

QualType returnType = FD->getReturnType();
Expand Down

0 comments on commit b851139

Please sign in to comment.