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

Cuda MSM #261

Merged
merged 81 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
f0269fa
Add python script that parses benchmark results
belijzajac Nov 30, 2023
cd60f87
integrate sppark msm
ArtiomTr Apr 16, 2024
894dac3
bug fixes
ArtiomTr Apr 16, 2024
8b9c0f1
msm prepare
ArtiomTr Apr 16, 2024
f8692ef
Arkworks initial impl
ArtiomTr Apr 18, 2024
d6dd280
updates
ArtiomTr Apr 28, 2024
480a454
sppark precompute
ArtiomTr Apr 29, 2024
a85502f
added sppark msm preinitialization
ArtiomTr Apr 29, 2024
45b4bd2
bug fixes
ArtiomTr Apr 29, 2024
ce5fbaa
Create arkworks3 backend
ArtiomTr Apr 30, 2024
2d6edcd
make tests pass
ArtiomTr May 9, 2024
a77afb6
integrated sppark msm into arkworks3 backend
ArtiomTr May 9, 2024
f67ba72
bug fix other backends
ArtiomTr May 9, 2024
b6c2968
Add wlc msm
ArtiomTr May 9, 2024
682e2f4
copy wlc implementation
ArtiomTr May 9, 2024
8551540
Bug fixes
ArtiomTr May 9, 2024
4efbb25
Delete vscode settings
ArtiomTr May 9, 2024
2e9561d
Merge branch 'Integrate_sppark_msm' of github.com:ArtiomTr/rust-kzg i…
ArtiomTr May 9, 2024
4ac67aa
Configurable parameter for point count in lincomb benchmark
ArtiomTr May 9, 2024
9d32e0f
Update readme, add GPU acceleration section
ArtiomTr May 16, 2024
54ee5c2
Add arkworks3 backend to pipelines, update CKZG hash
ArtiomTr May 16, 2024
1bba1e1
Fixed tests pipeline
ArtiomTr May 16, 2024
1051881
Fix zkcrypto clippy issues
ArtiomTr May 16, 2024
14ee443
Fix pipeline
ArtiomTr May 16, 2024
70a0d17
Fix arkworks3 clippy issues
ArtiomTr May 16, 2024
dbd6c19
Format files
ArtiomTr May 16, 2024
cbe37c6
Fix arkmsm clippy issues in kzg crate
ArtiomTr May 16, 2024
ac9373d
Fix formatting
ArtiomTr May 16, 2024
d2c2f8e
Fix kzg clippy
ArtiomTr May 16, 2024
e836183
Update patches
ArtiomTr May 16, 2024
86db309
Fix nodejs patch
ArtiomTr May 16, 2024
2e3c215
Update patches for other backends
ArtiomTr May 16, 2024
ba50b4f
Remove unnecessary features
ArtiomTr May 16, 2024
f00efc9
fix clippy issues
ArtiomTr May 16, 2024
7648580
update benchmark script
ArtiomTr May 16, 2024
c2a352a
Merge branch 'benchmark_script' into Integrate_sppark_msm
ArtiomTr May 18, 2024
169ff0a
Fix scripts
ArtiomTr May 26, 2024
5b9f1ac
Fix script
ArtiomTr May 26, 2024
906458c
Bug fixes
ArtiomTr May 26, 2024
6dcb9ac
Fix arkmsm
ArtiomTr May 27, 2024
17e8437
Update graph images
ArtiomTr May 30, 2024
c3d9076
Cuda benchmark script
ArtiomTr May 30, 2024
b199429
Update script
ArtiomTr May 30, 2024
9cf9613
Fix script
ArtiomTr May 30, 2024
9a3eda1
Updated graphs
ArtiomTr May 30, 2024
9f7b3af
Fix BGMW with 2 cores benchmarks
ArtiomTr Jun 3, 2024
0bd2676
Update graphs & data
ArtiomTr Jun 5, 2024
6b013f5
format sources
ArtiomTr Jun 5, 2024
396a01d
Fix benches for arkworks3 wlc
ArtiomTr Jun 5, 2024
dbaa0fa
dbg
ArtiomTr Jun 5, 2024
3e58d9b
fix memory leak
ArtiomTr Jun 5, 2024
b329652
bug fix
ArtiomTr Jun 5, 2024
796c6c5
bug fix 2
ArtiomTr Jun 5, 2024
e1128ec
dbg
ArtiomTr Jun 5, 2024
1c65661
Fix memory leak
ArtiomTr Jun 5, 2024
541c1f5
Fix cuda benchmarking script
ArtiomTr Jun 5, 2024
22351ba
CUDA EIP graphs
ArtiomTr Jun 5, 2024
0c018fb
Update benchmark script
ArtiomTr Jun 5, 2024
aa91df4
Fix CUDA benchmark script
ArtiomTr Jun 5, 2024
3a99121
CUDA MSM graphs
ArtiomTr Jun 6, 2024
eb72803
Avoid unnecessary msm context initialization
ArtiomTr Jun 7, 2024
138718a
Format sources
ArtiomTr Jun 7, 2024
7adda07
Bug fixes
ArtiomTr Jun 7, 2024
55eb114
Bug fix
ArtiomTr Jun 7, 2024
48675b9
Bug fix
ArtiomTr Jun 7, 2024
e712e05
Bug fix
ArtiomTr Jun 7, 2024
8bae7e5
Updated benchmarks
ArtiomTr Jun 16, 2024
2cda6ab
Select optimal BGMW window size for sequential version
ArtiomTr Jun 16, 2024
73e7297
BGMW optimal parallel window test
ArtiomTr Jun 21, 2024
206a0e2
Fix parallel window function
ArtiomTr Jun 23, 2024
348a180
Add constantine_msm into benchmarks script
ArtiomTr Jun 23, 2024
183c7b5
Updated BGMW window size computation
ArtiomTr Jul 4, 2024
02ee434
Updated graphs
ArtiomTr Jul 6, 2024
297aa64
Log stderr in python script
ArtiomTr Jul 6, 2024
708ccea
Update hash
ArtiomTr Jul 6, 2024
6829493
Update to macos latest image
ArtiomTr Jul 6, 2024
a9da8eb
Fix rust patches
ArtiomTr Jul 6, 2024
acd2c04
Add constantine to benchmarking script
ArtiomTr Jul 6, 2024
98077ee
Update setup-nim-action to speed up nim installation
ArtiomTr Jul 6, 2024
634c3b6
Bump nim version
ArtiomTr Jul 6, 2024
dae6f73
Updated benchmarking results
ArtiomTr Jul 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/backend-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: benchmarks
on: [push, pull_request, workflow_dispatch]
env:
C_KZG_4844_GIT_HASH: '5115420ba3f919f5501155ba18633667001b6a07'
C_KZG_4844_GIT_HASH: '1bccee0878ffc80efe8741afdb5793ef9105aa35'

jobs:
benchmarks:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-11]
os: [ubuntu-latest, windows-latest, macos-latest]
# Excluding mcl for now due to they have different project layout
backend: [blst, zkcrypto, arkworks, constantine]
backend: [blst, zkcrypto, arkworks, arkworks3, constantine]
include:
# Setup exec_once_per_backend flag
- os: ubuntu-latest
Expand All @@ -23,6 +23,8 @@ jobs:
support_ckzg: true
- backend: arkworks
support_ckzg: true
- backend: arkworks3
support_ckzg: true
- backend: constantine
support_ckzg: true

Expand All @@ -34,9 +36,9 @@ jobs:
java-version: "11"

- if: matrix.backend == 'constantine'
uses: jiro4989/setup-nim-action@v1
uses: jiro4989/setup-nim-action@v2
with:
nim-version: '1.6.14'
nim-version: '2.0.2'

# Install constantine backend deps
- name: "constantine - install deps"
Expand Down
112 changes: 65 additions & 47 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,91 @@
name: tests
on: [push, pull_request, workflow_dispatch]
env:
C_KZG_4844_GIT_HASH: '5115420ba3f919f5501155ba18633667001b6a07'
C_KZG_4844_GIT_HASH: '1bccee0878ffc80efe8741afdb5793ef9105aa35'

jobs:
tests:
kzg_ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Check kzg clippy for default msm backend
- name: "kzg clippy"
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path kzg/Cargo.toml --all-targets --no-default-features --features=parallel,std,rand -- -D warnings

# Check kzg clippy for BGMW msm backend
- name: "kzg clippy (bgmw)"
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path kzg/Cargo.toml --all-targets --features=parallel,std,rand,bgmw -- -D warnings

# Check kzg clippy for arkmsm backend
- name: "kzg clippy (arkmsm)"
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path kzg/Cargo.toml --all-targets --features=parallel,std,rand,arkmsm -- -D warnings

# Check kzg clippy for sppark backend
- name: "kzg clippy (sppark)"
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path kzg/Cargo.toml --all-targets --features=parallel,std,rand,sppark -- -D warnings

# Check kzg formatting
- name: "kzg format"
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path kzg/Cargo.toml -- --check

# Check kzg-bench clippy
- name: "kzg-bench clippy"
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path kzg-bench/Cargo.toml --all-targets --all-features -- -D warnings

# Check kzg-bench formatting
- name: "kzg-bench format"
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path kzg-bench/Cargo.toml -- --check

backend_ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-11]
os: [ubuntu-latest, windows-latest, macos-latest]
# Excluding mcl for now due to they have different project layout
backend: [blst, zkcrypto, arkworks, constantine]
backend: [blst, zkcrypto, arkworks, arkworks3, constantine]
include:
# Set default clippy flag to all-features
- clippy-flag: --all-features
# Set default clippy flag
- clippy-flag: --features=default,std,rand,parallel
# Setup exec_once_per_backend flag
- os: ubuntu-latest
exec_once_per_backend: true
# Setup exec_once_overall flag
- os: ubuntu-latest
backend: blst
exec_once_overall: true
# Select backends which support wasm & which support ckzg drop-in
- backend: blst
support_wasm: true
support_ckzg: true
# Override all-features flag for blst, due to incompatibility between portable & force-adx
clippy-flag: --features=default,std,rand,parallel
- backend: zkcrypto
support_wasm: true
support_ckzg: true

clippy-flag: --features=default,std,rand,parallel
clippy-flag: --all-features
- backend: arkworks
support_wasm: true
support_ckzg: true
- backend: arkworks3
support_wasm: true
support_ckzg: true
- backend: constantine
# FIXME: Check for wasm support
support_wasm: false
Expand All @@ -48,7 +98,7 @@ jobs:
distribution: "temurin"
java-version: "11"

- uses: jiro4989/setup-nim-action@v1
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.0.2'

Expand All @@ -73,38 +123,6 @@ jobs:
libgmp-dev \
llvm

# Check kzg clippy
- name: "kzg clippy"
if: matrix.exec_once_overall
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path kzg/Cargo.toml --all-targets --all-features -- -D warnings

# Check kzg formatting
- name: "kzg format"
uses: actions-rs/cargo@v1
if: matrix.exec_once_overall
with:
command: fmt
args: --manifest-path kzg/Cargo.toml -- --check

# Check kzg-bench clippy
- name: "kzg-bench clippy"
if: matrix.exec_once_overall
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path kzg-bench/Cargo.toml --all-targets --all-features -- -D warnings

# Check kzg-bench formatting
- name: "kzg-bench format"
uses: actions-rs/cargo@v1
if: matrix.exec_once_overall
with:
command: fmt
args: --manifest-path kzg-bench/Cargo.toml -- --check

# Check backend clippy
- name: "${{ matrix.backend }} clippy"
if: matrix.exec_once_per_backend
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
workflow_dispatch:

env:
C_KZG_4844_GIT_HASH: '5115420ba3f919f5501155ba18633667001b6a07'
C_KZG_4844_GIT_HASH: '1bccee0878ffc80efe8741afdb5793ef9105aa35'

jobs:
release-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend: [blst, zkcrypto, arkworks, constantine]
backend: [blst, zkcrypto, arkworks, arkworks3, constantine]
target: [windows, linux]
include:
# Set target-name for target builds
Expand All @@ -31,9 +31,9 @@ jobs:
- uses: actions/checkout@v2

- if: matrix.backend == 'constantine'
uses: jiro4989/setup-nim-action@v1
uses: jiro4989/setup-nim-action@v2
with:
nim-version: '1.6.14'
nim-version: '2.0.2'

# Install constantine backend deps
- name: "constantine - install deps"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.directory
target
benchmark_script/output
Loading
Loading