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


##########
src/relay/backend/aot_executor_codegen.cc:
##########
@@ -1328,17 +1333,11 @@ class AOTExecutorCodegenModule : public 
runtime::ModuleNode {
   runtime::NDArray get_param_by_name(String key) {
     auto it = this->output_.params.find(key);
     CHECK(it != this->output_.params.end()) << "no such parameter " << key;
-    return (*it).second.second;
+    return (*it).second;

Review Comment:
   The params (constants) map was capturing both the ndarray and the internal 
id, but the id was never used. So I removed the id. This means the constants 
map is always string -> ndarray so the "const_name_to_ndarray" attribute can be 
used consistently irrespective of executor. It also means there's no need for 
the extra projection.



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