mbs-octoml commented on code in PR #11173:
URL: https://github.com/apache/tvm/pull/11173#discussion_r865029670
##########
src/relay/backend/te_compiler.cc:
##########
@@ -952,25 +919,24 @@ backend::FunctionInfo UpdateMainWorkspaceSize(const
IRModule& mod, tec::TargetMa
Map<Target, Function> relay_primfuncs;
// Initialize all target workspaces to zero
- for (const auto& kv : targets) {
- auto tgt = kv.second;
- workspace_sizes.Set(tgt, 0);
+ for (const auto& target : config->primitive_targets) {
+ workspace_sizes.Set(target, 0);
}
for (const auto& dev_and_size : device_workspace) {
- auto tgt = tec::GetTargetFromInteger(dev_and_size.first, targets);
- workspace_sizes.Set(tgt, dev_and_size.second);
- relay_primfuncs.Set(tgt, func);
+ Target target = config->FindPrimitiveTargetOrFail(dev_and_size.first);
Review Comment:
(@Mousius is continuing to chip away at the 3-way disconnect between
"Compiler" targets (strings), Targets and device types as the carrier of target
information.)
--
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]