zhiics commented on a change in pull request #4644: Relay op strategy
URL: https://github.com/apache/incubator-tvm/pull/4644#discussion_r379866260
 
 

 ##########
 File path: python/tvm/relay/memory_alloc.py
 ##########
 @@ -28,8 +28,8 @@
 
 
 def is_primitive(call):
-    return hasattr(call.op, 'attrs') and hasattr(call.op.attrs, 'Primitive') 
and \
-        int(call.op.attrs.Primitive) == 1
+    return hasattr(call, 'op') and hasattr(call.op, 'attrs') and \
 
 Review comment:
   Can we reuse `is_primitive` defined in `Function`? something like `return 
hasattr(call, 'op') and isinstance(call.op, expr.Function) and 
call.op.is_primitive()`? 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to