d-smirnov commented on a change in pull request #8509:
URL: https://github.com/apache/tvm/pull/8509#discussion_r786981732
##########
File path: include/tvm/ir/module.h
##########
@@ -349,6 +350,9 @@ class IRModuleNode : public Object {
*/
std::unordered_set<String> import_set_;
friend class IRModule;
+
+ public:
+ void ExtractPrimFuncConstants(tir::PrimFunc func);
Review comment:
Typically PrimFunc are copied in between different IR modules. However
`functions` field in IRModule is public which makes extraction of data from
PrimFunc to surrounding module quite risky and discipline demanding. It would
be better not to store constants outside of PrimFunc at all, or, alternatively
to have a global storage for constants available from compilation context.
--
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]