-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for other integer types by MessagePassing #5087
Comments
This is mostly due to how PyTorch works, e.g., |
Since Pytorch 1.8.0, |
Oh, my bad. I just tested with |
I can take a look at this: as a first attempt I'll try to relax the check for |
Sounds good. Thanks! We also added support to make use of |
Hi @howardjp, I've tried and it breaks at I also tried to use Finally, I also implemented |
Thanks for digging into this. It looks like we need to wait for PyTorch team to catch up, sorry :( |
See #5281 for a proposal to relax the type assertion in the message passing interface. This patch effectively lets the execution backend decide which integer types to support when executing the aggregation step. That said, with the default CPU backend the error message changes to:
|
pytorch/pytorch#51323 seems fixed now, but not other nasty things like pytorch/pytorch#56975 or pytorch/pytorch#61819 ... |
Could I add |
馃悰 Describe the bug
Why does PyG enforces
edge_index
to be of type long? Certain graphs can work properly withint16
such as molecules, which will rarely surpass the 32767, unless batch sizes larger than 1000 are used. They have an average of 20 atoms. Instead, we could simply ensure that there are no negative numbers (which happen when the edge index overflows), or that the maximum of a specific datatype is not reached.Also, some hardwares do not support
long
, such as TPU and IPU, which are limited toint32
.pytorch_geometric/torch_geometric/nn/conv/message_passing.py
Line 183 in 412ae53
Environment
conda
,pip
, source): Anytorch-scatter
): AnyThe text was updated successfully, but these errors were encountered: