Skip to content
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: use GPU tree builder only for Poseidon hashes #1515

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

vmx
Copy link
Contributor

@vmx vmx commented Oct 5, 2021

The GPU tree builder (Neptune) only supports Poseidon hashes. Switch
to the CPU tree builder if other hash algorithms are used (which isn't
the case in Filecoin at the moment).

Closes #1512.

cryptonemo
cryptonemo previously approved these changes Oct 5, 2021
dignifiedquire
dignifiedquire previously approved these changes Oct 5, 2021
Base automatically changed from ci-gpu-tree to master October 5, 2021 18:28
The GPU tree builder (Neptune) only supports Poseidon hashes. Switch
to the CPU tree builder if other hash algorithms are used (which isn't
the case in Filecoin at the moment).

Closes #1512.
@vmx vmx dismissed stale reviews from dignifiedquire and cryptonemo via 0ebe6b7 October 5, 2021 18:31
@vmx
Copy link
Contributor Author

vmx commented Oct 5, 2021

Sorry for the hassle, I thought the merging is smoother. Please re-approve and I'll merge once the CI is green.

@vmx vmx merged commit 0daa536 into master Oct 5, 2021
@vmx vmx deleted the tree-builder-fix-type-id branch October 5, 2021 19:25
vmx added a commit that referenced this pull request Oct 6, 2021
The current code expected that if the GPU-based tree building is enabled,
that there also is a working GPU available. When it is not, it panics.
This commit adds a fallback to CPU in case selecting a working GPU fails.

It can be verified by running

    FIL_PROOFS_USE_GPU_TREE_BUILDER=1 cargo test --test stacked_vanilla test_stacked_porep_prove_verify

if the machine has no working Nvidia or AMD GPU.

Fixes #1515.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure on stacked_vanilla_test_stacked_porep_prove_verify
3 participants