From 831879c95e222b01f805fea0fb6b662f87b1db8d 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 973773c2eb3bc..e0722a3ccbe5e 100644 --- a/src/relay/backend/te_compiler.cc +++ b/src/relay/backend/te_compiler.cc @@ -593,8 +593,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);