Skip to content

[ET][Testing] Build test_backend_compiler_lib when testing is on #9953

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

Merged
merged 6 commits into from
Apr 16, 2025

Conversation

mcr229
Copy link
Contributor

@mcr229 mcr229 commented Apr 8, 2025

Adding test_backend_compiler_lib to pybinds when tests are on. This allows us to run some more backend tests in the OSS build. There were a couple of other test files that weren't able to be enabled:

    --ignore=exir/backend/test/test_backends.py
    --ignore=exir/backend/test/test_backends_lifted.py
    --ignore=exir/backend/test/test_partitioner.py

This was because they were doing some torch.ops.load_library("buck_path") or there was another backend ExecutorBackend that was required. I'll limit the changes of this PR to just be enablement of the BackendWithCompilerLibDemo backend.

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 8, 2025
Copy link

pytorch-bot bot commented Apr 8, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9953

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit da17865 with merge base ae2d822 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
@mcr229 mcr229 requested a review from tarun292 as a code owner April 8, 2025 01:08
mcr229 added 2 commits April 9, 2025 12:56
[ghstack-poisoned]
[ghstack-poisoned]
@@ -109,11 +107,7 @@ def forward(self, x):
torch.allclose(model_outputs[0], expected_res, atol=1e-03, rtol=1e-03)
)

@given(
unlift=st.booleans(), # verify both lifted and unlifted graph
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason we don't test lifted vs unlifted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these variables aren't actually being used, I'm not sure why it's not being tested, but it wasn't being tested to begin with, and pytest complains about that, so i'm just cleaning up here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh hmm, how did you find out they are not tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unlift variable isn't used in the test body. pytest complains about that and says given is useless if that's the case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah looks like it was deleted in #3169

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I understand now, it was used when exported program decided to lift all the params. It's not needed now params are all lifted anyway

[ghstack-poisoned]
Copy link
Contributor

@cccclai cccclai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

[ghstack-poisoned]
@mcr229 mcr229 requested a review from Gasoonjia as a code owner April 16, 2025 01:12
@Gasoonjia
Copy link
Contributor

Looks CI passes! Thanks for sharing me the issue!

@mcr229 mcr229 merged commit 3147f06 into main Apr 16, 2025
88 checks passed
@mcr229 mcr229 deleted the gh/mcr229/23/head branch April 16, 2025 16:11
keyprocedure pushed a commit to keyprocedure/executorch that referenced this pull request Apr 21, 2025
…orch#9953)

Adding test_backend_compiler_lib to pybinds when tests are on. This
allows us to run some more backend tests in the OSS build. There were a
couple of other test files that weren't able to be enabled:
```
    --ignore=exir/backend/test/test_backends.py
    --ignore=exir/backend/test/test_backends_lifted.py
    --ignore=exir/backend/test/test_partitioner.py
```

This was because they were doing some
torch.ops.load_library("buck_path") or there was another backend
ExecutorBackend that was required. I'll limit the changes of this PR to
just be enablement of the BackendWithCompilerLibDemo backend.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants