Skip to content
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

Add basic ambiguity check in the tests #9371

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

digantdesai
Copy link
Contributor

Summary

This is also an example of how to use the new dim_order APIs to detect
ambiguity when coming from PyTorch Tensor to ExecuTorch.

Test plan

python -m unittest exir.tests.test_memory_format_ops_pass.TestMemoryFormatOpsPass

This is also an example of how to use the new dim_order APIs to detect
ambiguity when coming from PyTorch Tensor to ExecuTorch.
Copy link

pytorch-bot bot commented Mar 18, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 2adbeb0 with merge base a05c4da (image):

NEW FAILURE - The following job has failed:

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

@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 Mar 18, 2025
),
check_unambiguous_dim_order=True,
)
except AmbiguousDimOrderError as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

the test right now can be passed when
a. AmbiguousDimOrderError raised, or
b. no error occurs.

b is not what we expected.
I would like to add an assertion in the bottom of try section,

Suggested change
except AmbiguousDimOrderError as e:
assert False, "This test should be failed"
except AmbiguousDimOrderError as e:

for node in gm.graph.nodes:
if node.op == "call_function":
tensor = node.meta["val"]
if not isinstance(tensor, torch.Tensor):
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe here we need also take care of tensor list?

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.

3 participants