Closed blueridanus closed 9 months ago
https://github.com/tinygrad/tinygrad/pull/2686 merged, ready for review 🖖
@arogozhnikov Is it possible to merge this?
I wish you folks implemented array api instead - and got einops
/sklearn
support for free.
E.g. in eindex
I won't spend my time implementing backends for different frameworks - that's too much hassle
@arogozhnikov We are interested in being array API compatible. Totally understand not writing special backend code
Is there a good compliance test for this? How far off are we?
@geohot Array API comes with a test suite to verify compatibility https://data-apis.org/array-api/2022.12/verification_test_suite.html
to see how far you off, start with this additional method in Tensor
:
def __array_namespace__(self, api_version: Optional[str] = None) -> Any:
return Tensor # tensor class, as it seems to contain most of relevant methods.
I expect that due to divergence it would be easier to have another namespace like tinygrad.array_api
with corresponding methods.
In a perfect world __array_namespace__
would return tinygrad
itself, but I see tinygrad keeps minimal exports in root namespace.
Might want to wait a bit on: https://github.com/tinygrad/tinygrad/pull/2686Done.