-
Notifications
You must be signed in to change notification settings - Fork 315
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: properly implement and document cuda feature #1507
Conversation
When the library is built with both CUDA and OpenCL support, you can choose which one to use at run time. Use the environment variable: | ||
|
||
``` | ||
FIL_PROOFS_GPU_FRAMEWORK=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.
Setting this value on master currently appears to do nothing -- opencl is used in all cases for me unless I specify --features cuda
on the command line
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.
Yes, it's part of this PR.
|
||
`FIL_PROOFS_CUDA_NVCC_ARGS="--fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75"` | ||
|
||
Note that this environment variable is forwarded to underlying dependencies, which might not be automatically be rebuilt. If you change this variable, best is to start from a clean build. |
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.
Following cargo clean
, running FIL_PROOFS_GPU_FRAMEWORK=opencl cargo test --release --all --features cuda,opencl -- --nocapture --ignored
used cuda. Is this expected?
UPDATE: setting BELLMAN_GPU_FRAMEWORK=opencl
and NEPTUNE_GPU_FRAMEWORK=opencl
does run opencl if added to the above
It's possible to compile rust-fil-proofs to make it run on CUDA instead of OpenCL. This change also includes the introduction of two new environment variables. One to control, whether OpenCL or CUDA should be used. The other to tweak `nvcc` options.
Rebased and tested locally -- this works for me. I'll approve if CI is happy. |
@vmx please delete the branch when you're ready |
It's possible to compile rust-fil-proofs to make it run on CUDA instead
of OpenCL. This change also includes the introduction of two new environment
variables. One to control, whether OpenCL or CUDA should be used. The other
to tweak
nvcc
options.