-
Notifications
You must be signed in to change notification settings - Fork 224
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
fix reset_search_direction!
failure when training with GPU
#1034
Conversation
Hi @pkofod, could you please take a look at this pull request at your convenience? |
Thank you, yes it seems strange to require Matrix at that point when it was not required when initializing the types. I would request that you add a test of this bugfix. Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #1034 +/- ##
==========================================
- Coverage 85.40% 85.36% -0.04%
==========================================
Files 43 43
Lines 3199 3198 -1
==========================================
- Hits 2732 2730 -2
- Misses 467 468 +1
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Hi @pkofod, this bug only occurs when optimizing with the |
Thanks |
This isn't fully generic so it breaks a lot downstream. Can it be reverted or fixed to allow generic arrays? |
I suppose it’s irrelevant given SciML/NeuralPDE.jl#751 (comment) ? |
I think the original “gpu compatability” was made by a sciml contributor, but apparently a test that tested the sciml relevant code was not added. |
It's not irrelevant, the downstream fix there was done by upper bounding Optim in Optimization.jl |
What works for componentarrays? |
@wei3li could you try master / 1.7.8 when it's tagged on your GPU problem? This should have used the internal functions we use initially to set the invH-matrices :) ( |
When training with GPU, sometimes the following error will occur, causing function
optimize
failure.This is because the code is trying to broadcast between memory and GPU. The constructor
Matrix
will build a matrix in computer memory, however, in the case of training with GPU,state.invH
is aCuArray
, which is in GPU.