tlopex opened a new pull request, #19803:
URL: https://github.com/apache/tvm/pull/19803

   This pr phases out the custom `tvm.testing.parameters()` helper in favor of 
native `@pytest.mark.parametrize`. `parameters()` itself is left in place for 
now and removed in a follow-up, together with updating the framework self-test 
(`tests/python/testing/test_tvm_testing_features.py`) that exercises it.
   
   Migration rules
   - A group consumed only by test functions becomes `@pytest.mark.parametrize`.
   - Single-name groups are unwrapped from 1-tuples to bare values.
   - A group shared by multiple tests uses a module-level named list; a test 
that uses only a subset of a group's names is parametrized only on the names in 
its signature.
   - `@pytest.mark.parametrize` is stacked above the existing, unrelated 
`@tvm.testing.parametrize_targets(...)`, which is kept as-is.
   
   Per-file pytest collection case counts are unchanged, except the two 
intentional changes below.
   
   Behavior changes (intentional)
   - tests/python/relax/test_training_optimizer_numeric.py: the names `lr` and 
`weight_decay` were rebound across three `parameters()` groups, so `test_sgd` 
and `test_momentum_sgd` silently used the *adam* group's `lr`/`weight_decay` 
(and `test_momentum_sgd` cross-producted with it: 2/6/2 = 10 cases). Native 
parametrize gives each test its own co-located group: 2/3/2 = 7 cases. This 
fixes that latent rebinding bug; the case count drops 10 -> 7 and 
`test_momentum_sgd` now exercises its own `weight_decay` values.
   - tests/python/target/test_arm_target.py: its `parameters()` group was 
orphaned (no test consumed those names) — removed the dead definition.
   
   Note: for tests that also use `@tvm.testing.parametrize_targets`, the 
generated test ids reorder the target (e.g. `test_unary[abs-True-llvm]` -> 
`test_unary[llvm-abs-True]`); values and case counts are unchanged.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to