Closed treigerm closed 3 years ago
Thanks for the PR Tim!
Testing. What is the best way to test GPU code? Does GitHub support running automated tests on GPUs?
There is https://github.com/JuliaGPU/buildkite from JuliaGPU but I've never tried it. I don't either know if this approach is free as it requires GPU machines? It would be great if you can take a look and let me know what's required to have this set up.
Is there a way to check in the test suite whether the current machine is CUDA enabled?
CUDA.functional()
(https://github.com/JuliaGPU/CUDA.jl/blob/master/src/initialization.jl#L9-L23)?
There is https://github.com/JuliaGPU/buildkite from JuliaGPU but I've never tried it. I don't either know if this approach is free as it requires GPU machines? It would be great if you can take a look and let me know what's required to have this set up.
I will look into it!
I added a very basic test which just checks whether the code runs without errors. Also I made a check so that the GPU tests are only run if a GPU is available.
The README at https://github.com/JuliaGPU/buildkite mentions that the JuliaGPU organization is able to provide some infrastructure to run GPU tests. I will write a message on the GPU Slack channel to ask whether we could access to it.
Is there anything that would speak against merging this already, i.e. are there things that need to still be done? I can add a section to the README explaining how to use AHMC with CUDA if that's helpful.
Is there anything that would speak against merging this already, i.e. are there things that need to still be done?
No. It's not proceeded only because this PR is current as a "Draft" so I thought you are still working on it :D
I can add a section to the README explaining how to use AHMC with CUDA if that's helpful.
Maybe a very simple one is enough for now.
No. It's not proceeded only because this PR is current as a "Draft" so I thought you are still working on it :D Ah I see that makes sense :D.
I will add a very short paragraph to the README and then make it a proper PR.
Can you change to to Ready for reivew once you're done? There is also some merge conflicts for Project.toml need to solve.
Will do so!
I'm not sure whether the test failure is related to this PR. The fact that it only happens for one of the CI runs might be an indication that it's a stochastic thing.
After retrigerring, all tests pass. I'm merging this PR now. Thanks for the contribution.
This PR is mostly based on code @xukai92 wrote and this is an initial draft to merge those changes into AHMC. I have done some local sanity checks that it runs without problems. In the future we might want to look into making this implementation more generic so it works for not just CUDA but also other hardware.
TODOs