-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make CUDA optional dependency #20
Conversation
@pelesh PNNL GitHub supports MacOS and Windows runners. Can we add that for ReSolve in GitHub actions? Additionally, now ReSolve supports building on Linux w/ Spack in GitHub actions, so we should add a pipeline and testing for those builds without CUDA. |
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 thought about it for some time and there was probably an easier solution to make all lin alg operatios (in VectorHandler and MatrixHandler) run with various backends, but it would had been a CMake nightmare and not necessarily backward compatible. I think the stuff in this PR is pretty good. I had some minor comments. Also, why IndexPlusValue changed its name?
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.
With better docs will come enlightenment. LGTM
EDIT: We should make issues for:
- Future work
- Known bugs
- CI/CD additions
Will that mean we have to setup a mirror to a PNNL github given this under ORNL? |
I think so. |
Mirror from ORNL GitHub to PNNL GitLab should be sufficient without PNNL GitHub in between |
This PR reduces internal dependencies on CUDA SDK libraries. Classes
MatrixHandler
andVectorHandler
are refactored to allow CPU-only or CUDA implementation of matrix and vector operations to be selected at runtime. With these changes:The build configuration allows for multiple hardware backends to coexist. In theory, we should be able to add HIP backend and build it at the same time as CUDA backend. If no GPU backend is built, a dummy device backend needs to be built instead (see
CpuMemory.hpp
).Known issues not addressed in this PR:
matvec
function implemented inMatrixHandlerCuda
class corrupts matrix descriptor object.