From 96658944a9a909de9414d61cfb85ac83ca420e08 Mon Sep 17 00:00:00 2001 From: Mingrui Date: Thu, 23 Dec 2021 20:33:36 +0800 Subject: [PATCH 1/2] [autodiff] Provide stmt type for autodiff related verifier --- taichi/analysis/verify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taichi/analysis/verify.cpp b/taichi/analysis/verify.cpp index 4ab15f01e0581..04ab1741ce19e 100644 --- a/taichi/analysis/verify.cpp +++ b/taichi/analysis/verify.cpp @@ -54,7 +54,7 @@ class IRVerifier : public BasicStmtVisitor { " If it doesn't help, please report this bug by opening an issue at" " https://github.com/taichi-dev/taichi to help us improve." " Thanks in advance!", - stmt->id, op->id); + stmt->type(), op->type()); } visible_stmts_.back().insert(stmt); } From 287ed4442796fc7a204179e8f749e3d4e2de67db Mon Sep 17 00:00:00 2001 From: Mingrui Date: Thu, 23 Dec 2021 22:16:35 +0800 Subject: [PATCH 2/2] [autodiff] Provide stme name and id for assert info --- taichi/analysis/verify.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taichi/analysis/verify.cpp b/taichi/analysis/verify.cpp index 04ab1741ce19e..cd76cb8e30316 100644 --- a/taichi/analysis/verify.cpp +++ b/taichi/analysis/verify.cpp @@ -47,14 +47,14 @@ class IRVerifier : public BasicStmtVisitor { } TI_ASSERT_INFO( found, - "IR broken: stmt {} cannot have operand {}." + "IR broken: stmt {} {} cannot have operand {} {}." " If you are using autodiff, please check" " https://docs.taichi.graphics/lang/articles/advanced/" "differentiable_programming#kernel-simplicity-rule" " If it doesn't help, please report this bug by opening an issue at" " https://github.com/taichi-dev/taichi to help us improve." " Thanks in advance!", - stmt->type(), op->type()); + stmt->type(), stmt->id, op->type(), op->id); } visible_stmts_.back().insert(stmt); }