Conversation
Noted in #759 (comment), GPU is completely untested in ForwardDiff.jl, so this sets up the buildkite pipeline. I setup the backend and all, and just took a few tests from #760 to seed it. The point of this isn't really to be a comprehensive set of GPU tests but rather to update this repo to have the standard tools the other repos have so GPU doesn't regress again/more.
devmotion
left a comment
There was a problem hiding this comment.
I think these changes are not worth it for these simple tests. The use of JLArrays as in #760 seems much simpler and better suitable for these tests; the main purpose of JLArrays is to perform such simple tests involving GPU arrays. This is also the same GPU test setup that e.g. ChainRules currently uses.
I think using CUDA should only be used in the tests if sufficient testing can't be performed with JLArrays anymore. At this point, I think the setup of the Zygote tests would be preferable if possible - unconditionally load and depend on CUDA in the tests, without messing with the test environment of the Pkg manager, and then skip GPU tests with CUDA unless CUDA.has_cuda().
|
JLArrays tends to give a lot of false positives because they don't act the same as most GPU arrays, for example the mapreduce behavior can be pretty different along with some of the constructors. It's not necessarily a sufficient test to tell you that CuArrays will actually work. It does work in this case because all of the main problem cases are not hit (from what I can see by eye), but it's not really a correct test for if you want to check for no regressions in CuArrays. |
Noted in #759 (comment), GPU is completely untested in ForwardDiff.jl, so this sets up the buildkite pipeline. I setup the backend and all, and just took a few tests from #760 to seed it. The point of this isn't really to be a comprehensive set of GPU tests but rather to update this repo to have the standard tools the other repos have so GPU doesn't regress again/more.