array-api-compat
array-api-compat copied to clipboard
Provide a temporary implementation for `array_api.compat.torch.unique_all` instead of raising `NotImplementedError`
The first snippet provided in this comment https://github.com/pytorch/pytorch/issues/36748#issuecomment-1474368922 might help smooth support for torch in Array API consuming libraries such as scikit-learn without them having to maintain their own hacks while waiting upstream PyTorch to address https://github.com/pytorch/pytorch/issues/70920.
This sounds reasonable. Based on the code comments, the workarounds there didn't work because they used non-deterministic scatter. But if those workarounds you referenced don't have that issue, we can implement them.