Skip to content

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

2 participants