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

 ##########
 File path: python/tvm/relay/expr.py
 ##########
 @@ -277,6 +277,12 @@ def set_params(self, params):
 
         return _expr.FunctionSetParams(self, params)
 
+    def is_primitive(self):
+        return int(self.get_attribute("Primitive")) == 1
 
 Review comment:
   Move this as a auxiliary function instead of member for now. Because member 
function need to be relatively stable, and we might have new attributes later.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to