Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on IRModule mutation detector in tests by default #11551

Closed
4 tasks
areusch opened this issue Jun 2, 2022 · 2 comments
Closed
4 tasks

Turn on IRModule mutation detector in tests by default #11551

areusch opened this issue Jun 2, 2022 · 2 comments
Labels
dev:ci type:rfc-tracking RFC progress tracking. Ref: https://github.com/apache/tvm-rfcs

Comments

@areusch
Copy link
Contributor

areusch commented Jun 2, 2022

In #11372, @gigiblender created a utility that detects if an IRModule modifies any of the visitable attributes of an IRModule in-place. This issue tracks implementing that utility as the default in all Python tests. Here are the steps:

  • Determine what kind of switch we should use for this. In the original PR, a switch was created using PassContext. We should find a way to modify the value of the switch for all tests via a pytest fixture.
  • Add such pytest fixture to the codebase and determine which tests are failing, if any.
  • Turn on the fixture for tests that aren't currently failing, and list the tests which need to be fixed here.
  • Fix remaining tests as a community.

@mikepapadim is going to take a look at this.

@areusch areusch added the type:rfc-tracking RFC progress tracking. Ref: https://github.com/apache/tvm-rfcs label Jun 2, 2022
@mikepapadim
Copy link
Contributor

I 've been looking into fixtures and #11498. If we don't want to expose the switch on the python side, one way might be to keep the switch into PassContext and expose an env variable to enable it. Then, we could use a session scoped
fixture to enable it.

@areusch
Copy link
Contributor Author

areusch commented Jun 10, 2022

i was thinking to do something kind of like this but rather put the variable in tvm.testing as a global var rather than environment var, and use mock.patch in a pytest fixture to set it. what do you think about that?

@areusch areusch added the needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it label Oct 19, 2022
@hpanda-naut hpanda-naut added dev:ci and removed needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it labels Nov 16, 2022
@tqchen tqchen closed this as completed Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:ci type:rfc-tracking RFC progress tracking. Ref: https://github.com/apache/tvm-rfcs
Projects
None yet
Development

No branches or pull requests

4 participants