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

Fix datatype issue with Sparse Attention softmax #363

Merged
merged 3 commits into from
Sep 10, 2020
Merged

Conversation

jeffra
Copy link
Collaborator

@jeffra jeffra commented Sep 4, 2020

Fixes a dataype issue with softmax where the number of blocks being sent to the Triton kernel source was a torch.Tensor but should have been a python integer. On some environments (e.g., conda) this resulted in triton not knowing how to serialize the input (and crashing in our tests). Once switching to the correct datatype that triton expects this seems to have solved the issue.

In the future it would be great if we can add python type hints across DeepSpeed to help with these types of issues. https://docs.python.org/3/library/typing.html

Fixes a dataype issue with softmax where the number of blocks being sent to the Triton kernel source was a torch.Tensor but should have been a python integer. On some environments (e.g., conda) this resulted in triton not knowing how to serialize the input (and crashing in our tests). Once switching to the correct datatype that triton expects this seems to have solved the issue.
@jeffra jeffra merged commit dca0b78 into master Sep 10, 2020
@jeffra jeffra deleted the jeffra-patch-3 branch September 10, 2020 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants