-
Notifications
You must be signed in to change notification settings - Fork 27.7k
torch.unique not support for torch.jit.script #37986
Copy link
Copy link
Closed
Labels
oncall: jitAdd this issue/PR to JIT oncall triage queueAdd this issue/PR to JIT oncall triage queuesmallWe think this is a small issue to fix. Consider knocking off high priority small issuesWe think this is a small issue to fix. Consider knocking off high priority small issuestriage reviewtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Metadata
Metadata
Assignees
Labels
oncall: jitAdd this issue/PR to JIT oncall triage queueAdd this issue/PR to JIT oncall triage queuesmallWe think this is a small issue to fix. Consider knocking off high priority small issuesWe think this is a small issue to fix. Consider knocking off high priority small issuestriage reviewtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
🚀 Feature
Add
torch.uniquesupport totorch.jit.scriptso that it is possible to jit-script graph pooling in using pytorch geometric.This was mentioned back in #12206.
@suo
Motivation
I am writing models using pytorch_geometric that I would like to jit-script. I have started by making automatic GNN model synthesis that makes jittable convolution operations, but we also need to do graph pooling to have the full range of functionality. This latter bit requires
torch.uniquein python to be jit-scriptable.Pitch
I would like:
to not result in:
but rather a working jit function!
Alternatives
Writing everything in C++ for torch_geometric, which is a significant time burden for developers, where this could be fixed easily and centrally.
Additional context
This is supporting an effort here:
pyg-team/pytorch_geometric#1191
to make pytorch_geometric easily jittable without major rewrites or changes of user code.
cc @suo