Add unit tests to consolidate selective build APIs - #23176
TejasweeSulekh wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23176
Note: Links to docs will display an error until the docs builds have been completed. ⏳ 1 Pending, 1 Unrelated FailureAs of commit 7ba7fd5 with merge base 96c621d ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
cc @JacobSzwejbka for core runtime |
|
Hey team, It looks like the CI is failing across the board during the initial environment setup phase. Specifically, install_requirements.py is failing to fetch torchao==0.18.0.dev20260729 (No matching distribution found). My unit tests haven't been executed yet. Let me know once the dependencies are fixed on main and I will gladly rebase this branch |
Hi @TejasweeSulekh, we've just fixed the dependency issue. Please do rebase and give me a ping. I'll trigger CI tests again |
8665234 to
1555af7
Compare
|
Hey @nil-is-all, I rebased the repo with the latest commit. From my end the following are working well: ## Basically the test being added here
pytest codegen/tools/test/test_gen_oplist.py
## Testing the cxx side
bash ./test/run_oss_cpp_tests.shBut this test is failing for some reason and I can't really be sure that this is because of the changes made in this PR. ## Testing EXIR side of the library
pytest exir/tests/ Where the error indicates: RuntimeError: Missing out variants: {'quantized_decomposed::dequantize_per_tensor', 'quantized_decomposed::add'...}Should I wait for this error to be fixed or is the current state of the PR acceptable? |
Thanks for the ping. I'll run the tests on my end and keep you posted on the error. |
1555af7 to
7ba7fd5
Compare
|
Hey @nil-is-all, sorry, but there was lintrunner formatting issue. I fixed it and updated the PR. Whenever convenient can you please start the CI tests? |
Summary
This PR officially resolves the selective build API consolidation requested in the original issue.
The CMake and Python logic (
gen_oplist.py) already support parsing--root_opsand--model_file_pathsimultaneously, naturally merging the resulting operator sets. However, this behavior was previously untested, leaving it vulnerable to regression. This PR adds the missing unit testtest_gen_op_list_with_model_and_root_opsto officially lock in and prove this behavior.Fixes #11921
Testing Plan
Manually verified that the new unit test correctly mocks the operator lists and asserts the merged set without throwing a mutual exclusivity error.
cc @larryliu0820 @GregoryComer @nil-is-all