From 61708610f529294e3be8179577abe0e9327f7af4 Mon Sep 17 00:00:00 2001 From: Mingrui Zhang <33411325+erizmr@users.noreply.github.com> Date: Thu, 23 Feb 2023 17:15:04 +0800 Subject: [PATCH] [autodiff] Handle return statement (#7389) Issue: #7378 ### Brief Summary --- taichi/transforms/auto_diff.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/taichi/transforms/auto_diff.cpp b/taichi/transforms/auto_diff.cpp index 8424e721f63ff..679132c3fb181 100644 --- a/taichi/transforms/auto_diff.cpp +++ b/taichi/transforms/auto_diff.cpp @@ -635,6 +635,10 @@ class ADTransform : public IRVisitor { // do nothing } + void visit(ReturnStmt *stmt) override { + // do nothing + } + void visit(WhileControlStmt *stmt) override { TI_NOT_IMPLEMENTED }