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

Improved GPU Support #119

Open
nic-barbara opened this issue Aug 14, 2023 · 2 comments
Open

Improved GPU Support #119

nic-barbara opened this issue Aug 14, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@nic-barbara
Copy link
Member

nic-barbara commented Aug 14, 2023

Improve the speed of RENs and LBDNs evaluated on the GPU. At the moment, there is basic support allowing the the models to be trained/evaluated on the GPU, but much of the code has been optimised for the CPU.

@nic-barbara nic-barbara added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 14, 2023
@nic-barbara
Copy link
Member Author

nic-barbara commented Aug 14, 2023

One particular area for improvement is the backwards pass of _N_lip and _N_gen in the case ny > nu. For some reason, there must be scalar operations happening under the hood when we write A / B instead of A * inv(B), which CUDA.jl is not a fan of. Investigate this further. This behaviour was first identified in 567f801.

Examples of where it is a problem:

  • In norm_cayley when calculating B_T for DenseLBDN
  • In _N_lip and _N_gen when calculating N for D22 term in LipschitzRENParams and GeneralRENParams

@nic-barbara
Copy link
Member Author

nic-barbara commented Aug 16, 2023

The above #119 (comment) has been solved in d5bfd02, and was caused by adding the identity operator I to a CUDA array before back-propagating through A / (I + B).

@nic-barbara nic-barbara removed the documentation Improvements or additions to documentation label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant