Pytest Refactor - Passes#21003
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21003
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 76d8597 with merge base 0f02e85 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
@claude review |
|
Claude finished @psiddh's task in 5m 36s —— View job PR Review: Pytest Refactor - Passes
Reviewed the pass simplifications and the new pytest-based pass-testing framework. Overall this is a clean, well-structured refactor — the fixture plumbing ( Correctness / robustness1. if re.search(r"any\.(dim|default)", str(node.target)):
if node.target in {torch.ops.aten.special_expm1.default, torch.ops.aten.expm1.default}:Recommend the same set-membership approach here ( 2. return_indices = (
any(user.args[1] == 1 for user in node.users)
if len(node.meta["val"]) > 1
else False
)The new user-traversal approach (detecting whether the indices output is actually consumed) is a real improvement over trusting Also note the changed Nits3. Stale comments in
The assertions themselves are correct (they only count 4. Dead assertion in edge_passes = PassPipeline._slice_to_target(...)
assert edge_passes is not None, f"{target_pass.__name__} not found in edge passes"
5. Questions
Nice work overall — the test framework is a solid foundation and the per-pass pattern coverage (backend enumeration, quantized vs fp16, subtests for op variants) is thorough. |
Summary
Pytest Framework enabling test for passes.
Sample script:
pytest backends/qualcomm/tests/rework/passes/test.pyTest plan
Passing all pytest test and legacy CI test
Author: @haowhsu-quic , @winskuo-quic