From e8c644a745241eeb9b1c9c69b39700a064b9b189 Mon Sep 17 00:00:00 2001 From: Lily Orth-Smith Date: Wed, 3 Nov 2021 12:14:34 -0700 Subject: [PATCH] fix problem --- src/relay/backend/te_compiler.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/relay/backend/te_compiler.cc b/src/relay/backend/te_compiler.cc index 3b5d01d7bc73a..ee8962d559327 100644 --- a/src/relay/backend/te_compiler.cc +++ b/src/relay/backend/te_compiler.cc @@ -584,8 +584,9 @@ class LowerTensorExprMutator : public DeviceAwareExprMutator { } Expr DeviceAwareVisitExpr_(const CallNode* call_node) override { - ICHECK(call_node->op != CallLoweredOp()) - << "Found a call_lowered op: can't lower a function that is already lowered."; + // Passes before lowering might insert a call_lowered to call a function that has already + // been lowered. Therefore we might see call_lowered ops here, but we don't need to do anything + // because ResolveToPrimitive returns null for all calls where the call_node->op is an OpNode Call call = GetRef(call_node); // Look for (indirect) calls to primitives. BaseFunc prim_func = ResolveToPrimitive(call_node->op);