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

[UnitTest] Use pytest's scope='session' for tvm.testing.parameter #16930

Merged
merged 1 commit into from May 13, 2024

Conversation

Lunderberg
Copy link
Contributor

Prior to this commit, the tvm.testing.parameter utility defined a fixture with the default scope="function". However, this prevents use of these parameters as arguments for other fixtures that are themselves cached using pytest. Since these are parameters, not large values that would be expensive to compute, there is no downside to caching them at the pytest level.

This commit updates the scope of fixtures generated using tvm.testing.parameter to use scope="session" instead of the default scope="function".

@Lunderberg Lunderberg force-pushed the tvm_testing_fixture_at_session_scope branch from 6fa33b6 to 5ef2c8b Compare April 26, 2024 18:55
Prior to this commit, the `tvm.testing.parameter` utility defined a
fixture with the default `scope="function"`.  However, this prevents
use of these parameters as arguments for other fixtures that are
themselves cached using pytest.  Since these are parameters, not large
values that would be expensive to compute, there is no downside to
caching them at the pytest level.

This commit updates the scope of fixtures generated using
`tvm.testing.parameter` to use `scope="session"` instead of the
default `scope="function"`.
@Lunderberg Lunderberg force-pushed the tvm_testing_fixture_at_session_scope branch from 5ef2c8b to 46a0483 Compare May 9, 2024 15:18
@masahi masahi merged commit 1d4b9ea into apache:main May 13, 2024
19 checks passed
@Lunderberg Lunderberg deleted the tvm_testing_fixture_at_session_scope branch May 13, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants