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

Test failure if we use torch 2.5 #133

Open
liu-jc opened this issue Oct 24, 2024 · 0 comments
Open

Test failure if we use torch 2.5 #133

liu-jc opened this issue Oct 24, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@liu-jc
Copy link
Contributor

liu-jc commented Oct 24, 2024

Is your feature request related to a problem? Please describe.
If we don't require torch version < 2.5, the build test will fail, particularly test/module/test_attention.py::test_all_masked:

def test_all_masked(

Describe the solution you'd like
The reason might be that torch 2.5 updates the function nn.functional.scaled_dot_product_attention (see here https://github.com/pytorch/pytorch/releases/tag/v2.5.0)
It mentions:

Before this PR, fully masked rows in the attn_mask passed to nn.functional.scaled_dot_product_attention would yield NANs in the output, after this PR, fully masked rows yield 0s.

I think later maybe we would like to change the test function to assert all 0s.
But I am not sure if we have special usage for torch.nan in output (like if we change to 0s for fully masked rows, it will break the pipeline)
@chenghaoliu89 @cuthalionn Any comments/suggestions?

@liu-jc liu-jc self-assigned this Nov 27, 2024
@liu-jc liu-jc added the bug Something isn't working label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant