Skip to content

[Backend Tester] Add FACTO operator test skeleton #11953

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 8 commits into from
Jul 8, 2025

Conversation

GregoryComer
Copy link
Member

@GregoryComer GregoryComer commented Jun 25, 2025

Add initial skeleton for running Facto operator tests. This is only set up for XNNPACK in this commit (other delegates are later in the stack). It also relies on a manual install of Facto. I'm currently intentionally not running this in CI, due to a combination of finding a number of crashes and due to a high volume of tests. This will be addressed further up the stack. Instructions for running the tests locally are included at the top of test_facto.py.

[ghstack-poisoned]
@GregoryComer
Copy link
Member Author

GregoryComer commented Jun 25, 2025

Stack from ghstack (oldest at bottom):

Copy link

pytorch-bot bot commented Jun 25, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure, 67 Pending

As of commit 32e7033 with merge base 91c9ffa (image):

NEW FAILURE - The following job has failed:

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

GregoryComer added a commit that referenced this pull request Jun 25, 2025
ghstack-source-id: a082c5e
ghstack-comment-id: 3003288787
Pull-Request: #11953
@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 Jun 25, 2025
@GregoryComer GregoryComer added the release notes: none Do not include this in the release notes label Jun 25, 2025
[ghstack-poisoned]
GregoryComer added a commit that referenced this pull request Jun 25, 2025
ghstack-source-id: 101d2b7
ghstack-comment-id: 3003288787
Pull-Request: #11953
[ghstack-poisoned]
GregoryComer added a commit that referenced this pull request Jun 25, 2025
ghstack-source-id: 7298522
ghstack-comment-id: 3003288787
Pull-Request: #11953
[ghstack-poisoned]
GregoryComer added a commit that referenced this pull request Jun 25, 2025
ghstack-source-id: 0f0e18f
ghstack-comment-id: 3003288787
Pull-Request: #11953
@GregoryComer GregoryComer marked this pull request as ready for review June 25, 2025 06:18
@mergennachin
Copy link
Contributor

Is this gonna be part of unit test in pull job? How long does it take?

Thoughts on making it part of trunk job?

@mergennachin
Copy link
Contributor

I'm currently intentionally not running this in CI

If so, can you explicitly say "--ignore" inside pytest.ini file?

@GregoryComer
Copy link
Member Author

Is this gonna be part of unit test in pull job? How long does it take?

Thoughts on making it part of trunk job?

I'm hoping to evaluate this once I get the full test suite landed (big stack at #11894), foundational PRs are currently being reviewed. I'm intending to hopefully run the P0 delegate tests at least on periodic, if not more frequently. We can also look at trimming down the full test suite depending on execution time and CI cost.

Though FYI some delegates (QNN and Vulkan) aren't fully set up for pybindings in OSS yet (it's on the roadmap).

I'll get back to you on this in the next two weeks once the test suite is landed.

Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

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

Looks good. Its a good start. Let's include other delegates first before expanding on the "input set"

return self.op(*(args + self.fixed_args), **(kwargs | self.fixed_kwargs))


class ConvModel(OpModel):
Copy link
Contributor

Choose a reason for hiding this comment

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

do we not have specs for Conv? i.e. why do we need this wrapper?

if isinstance(posargs[0], torch.Tensor):
# Temporary for getting around XNN crashes
if posargs[0].dtype not in {torch.float32, torch.float16}:
print("SKIPPING NON FLOAT CASE")
Copy link
Contributor

Choose a reason for hiding this comment

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

I will be curious to see how FACTO and quantization will work together but I guess you have some ideas?

@GregoryComer GregoryComer mentioned this pull request Jul 8, 2025
[ghstack-poisoned]
GregoryComer added a commit that referenced this pull request Jul 8, 2025
ghstack-source-id: 917aa11
ghstack-comment-id: 3003288787
Pull-Request: #11953
[ghstack-poisoned]
GregoryComer added a commit that referenced this pull request Jul 8, 2025
ghstack-source-id: b6f7a10
ghstack-comment-id: 3003288787
Pull-Request: #11953
[ghstack-poisoned]
GregoryComer added a commit that referenced this pull request Jul 8, 2025
ghstack-source-id: 9d5cad2
ghstack-comment-id: 3003288787
Pull-Request: #11953
[ghstack-poisoned]
GregoryComer added a commit that referenced this pull request Jul 8, 2025
ghstack-source-id: 28dea82
ghstack-comment-id: 3003288787
Pull-Request: #11953
@GregoryComer GregoryComer merged commit 264ac90 into main Jul 8, 2025
92 of 96 checks passed
@GregoryComer GregoryComer deleted the gh/GregoryComer/64/head branch July 8, 2025 17:04
Tanish2101 pushed a commit to Tanish2101/executorch that referenced this pull request Jul 9, 2025
Add initial skeleton for running Facto operator tests. This is only set
up for XNNPACK in this commit (other delegates are later in the stack).
It also relies on a manual install of Facto. I'm currently intentionally
not running this in CI, due to a combination of finding a number of
crashes and due to a high volume of tests. This will be addressed
further up the stack. Instructions for running the tests locally are
included at the top of test_facto.py.
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. release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants