mbs-octoml commented on code in PR #11619:
URL: https://github.com/apache/tvm/pull/11619#discussion_r892704837
##########
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:
Actually, since I've just paged all this in let me spend some quality time
and comment the whole file.
--
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]