"git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "870290df345873492d88f70b942893cd3b5deb87"
Unverified Commit dca0b784 authored by Jeff Rasley's avatar Jeff Rasley Committed by GitHub
Browse files

Fix datatype issue with sparse attention softmax (#363)



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.
Co-authored-by: default avatarShaden Smith <Shaden.Smith@microsoft.com>
parent 093f09ff
...@@ -234,7 +234,7 @@ class Softmax: ...@@ -234,7 +234,7 @@ class Softmax:
bench: optional: set if you want to do benchmarking bench: optional: set if you want to do benchmarking
""" """
self.num_blocks = layout.sum() self.num_blocks = layout.sum().item()
self.spdims = layout.shape self.spdims = layout.shape
self.layout = layout self.layout = layout
self.block = block self.block = block
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment