Skip to content

Commit

Permalink
perf: the dynamic Dory commitment computation should have a GPU imple…
Browse files Browse the repository at this point in the history
…mentation (spaceandtimelabs#247)

# Rationale for this change
The Blitzar project implemented a `vlen_msm` function that is optimized
for the dynamic Dory structure. This PR creates the
`dynamic_dory_commitment_helper_gpu` module when using the blitzar
feature flag. Helper functions are added that create the input needed
for Blitzar's vlen_msm function.

This work is the final piece of a PR that was split up:
spaceandtimelabs#231.

# What changes are included in this PR?
- The GPU implementation of the dynamic Dory commitment computation is
implemented.
- `#[allow(dead_code)]` tags are removed from the
`dynamic_dory_structure` module.
- `pack_scalars::min_as_f` is made public - this will likely need
refactored in a follow up PR when the `compute_dynamic_T_vec_prime` is
ported to the GPU.

# Are these changes tested?
Yes
  • Loading branch information
JayWhite2357 authored Oct 17, 2024
2 parents e98d9fc + b20abad commit 6feddb8
Show file tree
Hide file tree
Showing 7 changed files with 498 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,36 @@ fn we_can_compute_an_empty_dory_commitment() {
assert_eq!(res[0].0, GT::zero());
let res = compute_dory_commitments(&[CommittableColumn::BigInt(&[0; 0])], 20, &setup);
assert_eq!(res[0].0, GT::zero());
let res = compute_dory_commitments(
&[
CommittableColumn::BigInt(&[0; 0]),
CommittableColumn::BigInt(&[0; 0]),
],
0,
&setup,
);
assert_eq!(res[0].0, GT::zero());
assert_eq!(res[1].0, GT::zero());
let res = compute_dory_commitments(
&[
CommittableColumn::BigInt(&[0; 0]),
CommittableColumn::BigInt(&[0; 0]),
],
5,
&setup,
);
assert_eq!(res[0].0, GT::zero());
assert_eq!(res[1].0, GT::zero());
let res = compute_dory_commitments(
&[
CommittableColumn::BigInt(&[0; 0]),
CommittableColumn::BigInt(&[0; 0]),
],
20,
&setup,
);
assert_eq!(res[0].0, GT::zero());
assert_eq!(res[1].0, GT::zero());
}

#[test]
Expand Down
Loading

0 comments on commit 6feddb8

Please sign in to comment.