Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tinygrad support #297

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Conversation

blueridanus
Copy link
Contributor

No description provided.

@blueridanus blueridanus force-pushed the backend/tinygrad branch 2 times, most recently from bc07359 to b916f7f Compare December 7, 2023 08:12
@blueridanus blueridanus marked this pull request as ready for review December 7, 2023 08:13
@blueridanus
Copy link
Contributor Author

blueridanus commented Dec 9, 2023

Might want to wait a bit on: tinygrad/tinygrad#2686 Done.

@blueridanus
Copy link
Contributor Author

tinygrad/tinygrad#2686 merged, ready for review 🖖

@kroggen
Copy link

kroggen commented Jan 2, 2024

@arogozhnikov Is it possible to merge this?

@arogozhnikov arogozhnikov merged commit bb6ce2c into arogozhnikov:master Jan 3, 2024
4 checks passed
@arogozhnikov
Copy link
Owner

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

@geohot
Copy link

geohot commented Jan 4, 2024

@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?

@arogozhnikov
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants