-
Notifications
You must be signed in to change notification settings - Fork 484
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
base: main
Are you sure you want to change the base?
Conversation
This is also an example of how to use the new dim_order APIs to detect ambiguity when coming from PyTorch Tensor to ExecuTorch.
🔗 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 FailureAs of commit 2adbeb0 with merge base a05c4da ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
), | ||
check_unambiguous_dim_order=True, | ||
) | ||
except AmbiguousDimOrderError as e: |
There was a problem hiding this comment.
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,
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): |
There was a problem hiding this comment.
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?
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