array-api-compat icon indicating copy to clipboard operation
array-api-compat copied to clipboard

Provide a temporary implementation for `array_api.compat.torch.unique_all` instead of raising `NotImplementedError`

Open ogrisel opened this issue 1 year ago • 1 comments

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.

ogrisel avatar May 07 '24 13:05 ogrisel

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.

asmeurer avatar May 07 '24 16:05 asmeurer