Skip to content

Commit

Permalink
Merge pull request #261 from ArtiomTr/Integrate_sppark_msm
Browse files Browse the repository at this point in the history
Cuda MSM
  • Loading branch information
sauliusgrigaitis committed Jul 9, 2024
2 parents 1c9f443 + dae6f73 commit e4830f1
Show file tree
Hide file tree
Showing 192 changed files with 39,995 additions and 880 deletions.
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

0 comments on commit e4830f1

Please sign in to comment.