Mousius commented on a change in pull request #9395:
URL: https://github.com/apache/tvm/pull/9395#discussion_r746812054
##########
File path: src/relay/backend/aot_executor_codegen.cc
##########
@@ -637,6 +681,7 @@ class AOTExecutorCodegen : public MixedModeVisitor {
main_signature_.push_back(tir::Var("output", DataType::Handle()));
}
+ CollectDeviceVariables(lowered_mod->GetAttr<Map<GlobalVar,
String>>("device_contexts").value());
Review comment:
Sorry @mbs-octoml, I feel like I'm justified in just one more hack for
this :crying_cat_face:
Unfortunately we also need to rectify the `kCompiler` vs `Target` mix at the
same time as this current implementation uses what I'm calling a hybrid
`Target` (a registered `Target` which is still using most of the BYOC
infrastructure). The eventual aim is to get rid of `kCompiler` and move fully
to `Target` so that the above annotations end up on all `Function`s of
relevance and then get rid of this.
Internally to the TECompiler, the representation of the BYOC function gets
changed to a `GlobalVar` after the name gets uniquified, and the annotation
gets removed, so until everything gets persisted naturally all the way down I
can't get to it sensibly without this :crying_cat_face:
Or I could re-use some way of getting to the TE Compiler internal cache if
you'd like? :smiling_imp:
--
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]