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

[Backend Support] tinygrad #20793

Closed
DavidLandup0 opened this issue Jan 22, 2025 · 2 comments
Closed

[Backend Support] tinygrad #20793

DavidLandup0 opened this issue Jan 22, 2025 · 2 comments
Assignees
Labels
type:feature The user is asking for a new feature.

Comments

@DavidLandup0
Copy link
Contributor

DavidLandup0 commented Jan 22, 2025

Thoughts on supporting tinygrad as a backend?
GitHub: https://github.com/tinygrad/tinygrad

Some of the reasons would include:

  • Highly torch-like, so implementing the backend wouldn't be difficult syntactically
  • Simple to add accelerators and supports accelerators such as WebGPU, AMD, etc. which aren't common. It isn't as CUDA/cuBLAS-dependent as PyTorch or TensorFlow. This could help bring accelerated DL and inference to a higher number of users with consumer grade hardware and web apps.
  • Lightweight with minimal dependencies

Some of the difficulties would potentially include:

  • Fewer core ops meaning some common ops in torch, numpy, jax and tensorflow would need a bit of extra implementation to add
  • Adding another supported backend inherently increases the maintenance cost of the library

If approved, I'm volunteering to implement this.

@sonali-kumari1 sonali-kumari1 added type:feature The user is asking for a new feature. keras-team-review-pending Pending review by a Keras team member. labels Jan 22, 2025
@SamanehSaadat
Copy link
Member

@fchollet I was wondering what you think about this. Do you think we should support tinygrad backend in Keras?

@SamanehSaadat SamanehSaadat removed the keras-team-review-pending Pending review by a Keras team member. label Jan 23, 2025
@fchollet
Copy link
Collaborator

The question has come up before. The answer is, we're open to adding it in the future, but not today. Adding a new backend depends on:

  • Popularity of the backend package
  • Willingness of contributors to help ship the new backend
  • Support/approval from the backend package authors

Our next backend target is still MLX. We can add tinygrad at some point in the future, but it will depend on making progress on the points above.

MLX enjoys a level of popularity comparable to Keras-Hub: https://pypistats.org/packages/mlx
Tinygrad is not very popular yet: https://pypistats.org/packages/tinygrad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature The user is asking for a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants