mbs-octoml commented on code in PR #11619:
URL: https://github.com/apache/tvm/pull/11619#discussion_r892704432


##########
src/relay/backend/te_compiler.cc:
##########
@@ -697,43 +725,51 @@ class LowerTensorExprMutator : public 
DeviceAwareExprMutator {
   }
 
   Expr DeviceAwareVisitExpr_(const CallNode* call_node) override {
-    // We can see five forms of calls:
-    //  1. A 'normal' Relay call to a Function with the "primitive" attribute. 
We will need
-    //     to lower that to a global PrimFunc and rewrite the call to:
+    // We can see six forms of calls:
+    //  1. A 'normal' Relay call to a Function with the "Primitive" attribute 
and not "Compiler"
+    //     attribute. We will need to lower that to a global PrimFunc and 
rewrite the call to:
     //       call_lowered(@new_global, (arg1, ..., argn), <attributes>)
-    //     However there are a few special forms which are excluded from this 
treatment, see
-    //     below.
-    //  2. A 'normal' Relay call to a Function with the "compiler" attribute. 
We will need
-    //     to invoke the appropriate BYOC toolchain function to yield a 
runtime module and
-    //     rewrite the call to the same form as above.
-    //  3. A 'normal' Relay call to a PrimFunc which has already been supplied 
via a global
-    //     definition. We rewrite to use the call_lowered form, but otherwise 
nothing else
+    //     If needed, the call needs to be cross-linked with any dynamic shape 
functions.

Review Comment:
   I expanded the comment. It just means attaching attributes so that we can 
handle the dynamic shape when converting to DPS in memory_alloc.cc



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to