junrushao1994 commented on a change in pull request #6720:
URL: https://github.com/apache/incubator-tvm/pull/6720#discussion_r510435523



##########
File path: src/relay/transforms/fold_constant.cc
##########
@@ -151,9 +151,12 @@ class ConstantFolder : public MixedModeMutator {
     }
 
     // We should think about potentially constant evaluation over these ops 
too.
-    if (call->op == invoke_tvm_op_ || call->op == shape_func_op_ || call->op 
== alloc_tensor_op_ ||
-        call->op == alloc_storage_op_ || call->op == device_copy_op_) {
-      return GetRef<Call>(call);
+    static auto fnoncomputational = 
Op::GetAttrMap<TNonComputational>("TNonComputational");
+    if (auto call_node = call->op.as<OpNode>()) {

Review comment:
       Let’s be more specific about the type although they are the same
   ```suggestion
       if (const auto* call_node = call->op.as<OpNode>()) {
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to