data-apis / array-api-strict

Strict implementation of the Python array API (previously numpy.array_api)
http://data-apis.org/array-api-strict/
Other
9 stars 4 forks source link

Make one of the devices have a lower maximum float precision #64

Open betatim opened 4 weeks ago

betatim commented 4 weeks ago

As a follow up to #56: it would be useful to make one of the "devices" have a lower maximum float precision than the rest. To mirror what, for example, PyTorch's MPS device does (this is the "Apple silicon" GPU in modern MacBooks).

I think having a "lower maximum precision" device would be the last piece we'd need in scikit-learn to be able to find all "user errors" when writing array API code. This way people writing array API code don't need to have a GPU available to find and debug the errors you get when using a device that isn't a CPU.

What do people think?

cc @ogrisel

asmeurer commented 4 weeks ago

My thinking is that the default set of devices should cover the important use-cases (including this), but you should also be able to manually set what devices are active using the flags API.

asmeurer commented 4 weeks ago

This is related to https://github.com/data-apis/array-api-strict/issues/38