Skip to content

Commit

Permalink
fix: properly use GPU if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptonemo committed Oct 26, 2021
1 parent a42a933 commit f8b6533
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage-proofs-porep/src/stacked/vanilla/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,9 @@ impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> StackedDrg<'a, Tr
start: usize,
end: usize,
) -> Result<TreeRElementData<Tree>> {
if SETTINGS.use_gpu_tree_builder {
if SETTINGS.use_gpu_tree_builder
&& TypeId::of::<Tree::Hasher>() == TypeId::of::<PoseidonHasher>()
{
use fr32::bytes_into_fr;

let mut layer_bytes = vec![0u8; (end - start) * std::mem::size_of::<Fr>()];
Expand Down

0 comments on commit f8b6533

Please sign in to comment.