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

Enhancement: Utilize array-api-compat for enp Backend #669

Open
chicham opened this issue Nov 20, 2024 · 2 comments
Open

Enhancement: Utilize array-api-compat for enp Backend #669

chicham opened this issue Nov 20, 2024 · 2 comments

Comments

@chicham
Copy link
Contributor

chicham commented Nov 20, 2024

Currently, enp implements custom code to support JAX, PyTorch, and TensorFlow.

The array-api-compat library provides a uniform API for numerical computation across multiple frameworks. By leveraging this library, we could potentially:

  • Eliminate the need for custom code handling framework-specific functionalities.
  • Simplify updates and bug fixes by relying on a standardized API.
  • Ensure uniform behavior across different frameworks.

I propose exploring the feasibility of integrating array-api-compat as a backend for enp. This might involve refactoring existing code to utilize the library's API. Popular libraries like scikit-learn (https://labs.quansight.org/blog/array-api-support-scikit-learn) and SciPy (https://labs.quansight.org/blog/scipy-array-api) have already successfully implemented this API.

Integrating array-api-compat would not only streamline the codebase but also broaden the number of frameworks compatible with enp. I'm happy to discuss this further and potentially contribute to the implementation if the maintainers agree this is a worthwhile enhancement. Please share your thoughts and suggestions on this proposal.

@Conchylicultor
Copy link
Member

Nice! This sounds promising.

At the moment I do not have a lot of time for this, but it's definitely something I'll look in the future.

One concern though is that I did not see TensorFlow in the list of supported APIs.

@chicham
Copy link
Contributor Author

chicham commented Nov 22, 2024

I can set aside some time to create a draft in the coming weeks. About TensorFlow, I'm not quite sure why array-api-compat doesn't fully support it yet.

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

No branches or pull requests

2 participants