Skip to content

Fix datatype issue with Sparse Attention softmax#363

Merged
jeffra merged 3 commits into
masterfrom
jeffra-patch-3
Sep 10, 2020
Merged

Fix datatype issue with Sparse Attention softmax#363
jeffra merged 3 commits into
masterfrom
jeffra-patch-3

Conversation

@jeffra

@jeffra jeffra commented Sep 4, 2020

Copy link
Copy Markdown
Collaborator

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