areusch opened a new issue, #11372: URL: https://github.com/apache/tvm/issues/11372
Background: In TVM, the IRModule data structure is intended to be immutable. This is a property which unfortunately can't be enforced by a C++ language construct such as `const` because it is perceived to be too big of a hammer for that problem (I think one of the core challenges is that due to pointers, it's too difficult to propagate `const` through generic data structures such as `Map`). Instead, we have to enforce this through convention of not implementing functions on IR data structures which may mutate them. We are pretty good about this but unfortunately definitely not perfect. We could use a backstop here to provide us a guarantee, in test, that a pass doesn't mutate an IRModule but instead creates a copy wherever state is changed. This task captures writing that test utility. -- 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]
