Skip to content

Conversation

@xingyunjohn1
Copy link
Contributor

… addition, fix device assignment for newly created variables in method

Fix an example: Resolve broadcasting error in attn_bias and attn_mask addition, fix device assignment for newly created variables in method。

… addition, fix device assignment for newly created variables in method
@pytorch-bot
Copy link

pytorch-bot bot commented Jul 6, 2024

🔗 Helpful Links

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

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

✅ No Failures

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

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 6, 2024

CLA Not Signed

  • ❌ login: @Chen-YiHan / The commit (b13f5ec). This user is authorized, but they must confirm their affiliation with their company. Start the authorization process by clicking here, click "Corporate", select the appropriate company from the list, then confirm your affiliation on the page that appears. For further assistance with EasyCLA, please submit a support request ticket.

@xingyunjohn1
Copy link
Contributor Author

I finished CLA Authorization now.

@xingyunjohn1
Copy link
Contributor Author

I have use a wrong account. Close. I will retry later.

pytorchmergebot pushed a commit that referenced this pull request Jul 19, 2024
#130209)

… addition, fix device assignment for newly created variables in method

Fix an example: Resolve broadcasting error in attn_bias and attn_mask addition, fix device assignment for newly created variables in method

1. `attn_bias += attn_mask` would cause a broadcasting error. Because the shape of `attn_bias` is (L, S), the shape of the output would be expected as (L, S) too. When the shape of input is (N, num_heads, L, S), a broadcasting should be triggered. Then, the shape of the output would be (N, num_heads, L, S), which is unexpected.
2. `attn_bias` is a newly created variables in method, which is not assigned device.

**This is my retry of #130200 .** I used a wrong account in that pr.

Co-authored-by: mikaylagawarecki <[email protected]>
Pull Request resolved: #130209
Approved by: https://github.com/mikaylagawarecki
DiweiSun pushed a commit to DiweiSun/pytorch that referenced this pull request Jul 22, 2024
pytorch#130209)

… addition, fix device assignment for newly created variables in method

Fix an example: Resolve broadcasting error in attn_bias and attn_mask addition, fix device assignment for newly created variables in method

1. `attn_bias += attn_mask` would cause a broadcasting error. Because the shape of `attn_bias` is (L, S), the shape of the output would be expected as (L, S) too. When the shape of input is (N, num_heads, L, S), a broadcasting should be triggered. Then, the shape of the output would be (N, num_heads, L, S), which is unexpected.
2. `attn_bias` is a newly created variables in method, which is not assigned device.

**This is my retry of pytorch#130200 .** I used a wrong account in that pr.

Co-authored-by: mikaylagawarecki <[email protected]>
Pull Request resolved: pytorch#130209
Approved by: https://github.com/mikaylagawarecki
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Jul 25, 2024
pytorch#130209)

… addition, fix device assignment for newly created variables in method

Fix an example: Resolve broadcasting error in attn_bias and attn_mask addition, fix device assignment for newly created variables in method

1. `attn_bias += attn_mask` would cause a broadcasting error. Because the shape of `attn_bias` is (L, S), the shape of the output would be expected as (L, S) too. When the shape of input is (N, num_heads, L, S), a broadcasting should be triggered. Then, the shape of the output would be (N, num_heads, L, S), which is unexpected.
2. `attn_bias` is a newly created variables in method, which is not assigned device.

**This is my retry of pytorch#130200 .** I used a wrong account in that pr.

Co-authored-by: mikaylagawarecki <[email protected]>
Pull Request resolved: pytorch#130209
Approved by: https://github.com/mikaylagawarecki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants