-
Notifications
You must be signed in to change notification settings - Fork 3
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 GPU's gradient!
#74
Conversation
Works on GPU too. |
I will test the last commit on a GPU tomorrow. edit: It works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am good with this but should we have a unit test for it (When GPU available the unit test run, Still not sure if GPU is supported on unit test ? )
training_minibatch_iterator = create_minibatch(xtrn, ytrn, size_minibatch) | ||
test_minibatch_iterator = create_minibatch(xtst, ytst, size_minibatch) | ||
current_training_minibatch = rand(training_minibatch_iterator) | ||
current_test_minibatch = rand(test_minibatch_iterator) | ||
|
||
nested_array = build_nested_array_from_vec(chain_ANN, x0) | ||
layers_g = similar(params(chain_ANN)) # create a Vector of layer variables | ||
layers_g = similar.(params(chain_ANN)) # create a Vector of layer variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is param here lower case and in the other src/KnetNLPModels_methods.jl it is Param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I am not sure is how to test on GPUin unit test as of now, so I wanted to double check if it is possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is param here lower case and in the other src/KnetNLPModels_methods.jl it is Param
params
is a method and not the type.
The method return a type Param
if needed.
One thing I am not sure is how to test on GPUin unit test as of now, so I wanted to double check if it is possible
I pull on the GPU the branch I want to test, and I run manually the tests on the GPU.
Which is nice with KnetNLPModels.jl is that the code works for both CPU and GPU, so i just run ] test
once julia in loaded on Atlas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the test run both GPU and CPU then
If you want to test on GPU, you must have access to GPU, this is achieved by the job buildkite/knetnlpmodels-dot-jl. |
Can we open a bug here and put it conditional on knet.jl update? |
And I think you mentioned this buildkite/knetnlpmodels-dot-jl fails, |
I don't understand what you mean. I prefer keeping buildkite/knetnlpmodels-dot-jl even if it fails, because Dominique had to ask for us to get access to GPU from buildkite's community. |
Sorry for confusion Sure if we already expect it to fail and have it in the github issue then I am okay with it I will pass approve it then, just don''t forget the issue |
No description provided.