-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add support for half #137
Add support for half #137
Conversation
Hi, are there any updates on this PR? The last time I was working with |
In this PR all functions that need to be adapted in pytorch-scatter has been fixed. Remaining functions are all pytorch built-in functions. I'll try to make pull request to pytorch and as long as those functions are adapted for half precision, this PR should work. |
Cool! Please keep me updated:) |
I created a PR in pytorch. Actually I found that the tests only fail using CPU. When using CUDA, those functions missing in CPU are already implemented. |
@cmpute, is this PR basically ready to merge? I'm very excited for this functionality to be incorporated! Let me know if there are any remaining jobs I can help with. |
I created a PR in pytorch, but it still need some time to be merged. I just need to write some test for that PR. After it's merged I think we're done~ |
Can you link to the PR? |
I guess Github already links it here under your last comment? pytorch/pytorch#39788 |
I tried this with Pytorch 1.8.1 and it works fine. Does this mean fp16 is fully supported by from torch_scatter import scatter_add
import torch
a = torch.randn((5, 7), dtype=torch.half).cuda()
index = torch.randint(0, 10, (5,)).cuda()
print(scatter_add(a, index=index, dim=0)) |
Should be only supported for |
Thank you very much. I fixed the remaining PyTorch compatibility issues and everything should work now. |
Hi, I wonder if there are any example codes we can refer for amp training. Thanks a lot. |
Hi, thanks for this update- I'm having trouble using half precision with
|
Should fix #126.
I didn't test it yet since my model has other bugs using half precision...