-
Notifications
You must be signed in to change notification settings - Fork 28
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 Enhancements for GPU/TPU Support #144
Backend Enhancements for GPU/TPU Support #144
Conversation
Really good progress @Sampreet, to summarise my last post in the issue thread and reegarding the changes awaiting decision (subject to me misunderstanding there)
|
Thanks a lot, @piperfw! I have added a "DEVELOPMENT.md" page which contains a section on the current backend development as discussed. In addition to this, I have added a small comment on "CONTRIBUTING.md" so that contributions to features under active development (which are not on the "main" branch) can be maintained via "DEVELOPMENT.md". You may take a look and suggest changes on the same. I have also added a comment on #142 mentioning a smoother implementation of the experimental features for backend switching. Once an approach is finalized, I shall update the "api.rst" file ("modules.rst" doesn't have any backend-related section). Kindly let me know if any tutorial/example would also be required for the current implementation too. |
I'm going to create a new "jax" branch now (if non-jax development is required we can change it), and I think we can complete the PR request to there once we've finalised the dynamical switching and you've had a chance to update I've created a new Edit: I changed the branch name to |
I realise |
Thanks a lot for the feedback, @piperfw. The changes you have made also look good. I have implemented the suggestions (with a few additional changes to |
- Also update citation in this tutorial
- update dev branch name
1813d8b
to
cb5a93a
Compare
That's merged @Sampreet, congratulations! I checked over your last changes and the use of the environment variable to set the backend. All worked nicely, and the example is helpful. I added a small note on using this variable in I think we should add the docs page to the main branch (and then update readthedocs) for visibility of the support. Would you like to do this as PR for authorship or shall I go ahead? (just copy I'll also discuss with Gerald when he's next available about whether we want to merge this into main in the near future, because you have written in a flexible way so as to not interfere with the numpy backend this seems possible. Really good work and thank you; you have been very efficient at making changes and responding to feedback which makes a maintainer's role so much easier. |
[Also |
Hi @piperfw, thanks a lot for the final changes and your positive feedback on the work. Likewise, it has been a pleasure implementing the changes through the wonderful discussions with you and Gerald. Sure, I would be happy to make a PR adding |
Summary
This PR aims to include experimental features for GPU/TPU support using a dynamical numerical backend and addresses issues #128, #140, and #142 following the detailed discussion with @piperfw and @gefux over #142 and email.
Note: The JAX-backend tests are still very slow since no explicit JAX-related imports or primitives are utilized for speedup.
Pull Request Check List
tox -e py36
(to runpytest
) the code tests.tox -e style
(to runpylint
) the code style tests./docs/pages/modules.rst
has been updated./docs/pages/api.rst
has been updated.Notable Changes
oqupy.config
andoqupy.backends.numerical_backend
.oqupy.util.create_delta
with support for vectorization.reshape
and vectorization signatures.Changes Awaiting Decision
Thank you.