Skip to content

Add tests for cross attention #7609

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 1 commit into from
Jan 11, 2025
Merged

Add tests for cross attention #7609

merged 1 commit into from
Jan 11, 2025

Conversation

jackzhxng
Copy link
Contributor

@jackzhxng jackzhxng commented Jan 10, 2025

Summary

Add tests for the true branch of the torch.cond, for testing the behavior of y = None, when the encoder cache is populated and no additional encoder inputs are coming in.

Note: torch.export where the same tensor is used for multiple args in the example inputs, e.g. (self.x, self.x) results in a weird graph where the two parameters seem to be treated as the same node. As a basic example, when I would pass in something like ep.module()(torch.zeros(10), torch.ones(10)), when tracing through the interpreter, for ops where I am expecting the arg to be the first parameter, torch.zeros(10), it takes the second parameter, torch.ones(10). @angelayi is this expected behavior?

Test plan

Added tests

Copy link

pytorch-bot bot commented Jan 10, 2025

🔗 Helpful Links

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

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

⏳ No Failures, 1 Pending

As of commit 57f7414 with merge base 73f50df (image):
💚 Looks good so far! There are no failures yet. 💚

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 Jan 10, 2025
@jackzhxng jackzhxng merged commit b8cea10 into main Jan 11, 2025
44 of 46 checks passed
@jackzhxng jackzhxng deleted the jz/add-cond-tests branch January 11, 2025 00:21
YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
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