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

ZIR-238: Add CUDA support to keccak #76

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .github/actions/cuda/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: CUDA toolkit setup
description: Configure environment for CUDA toolkit

runs:
using: composite
steps:
- run: echo "/usr/local/cuda/bin" >> $GITHUB_PATH
shell: bash
54 changes: 34 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

workflow_dispatch:

Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
- run: cargo sort --workspace --check
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"
- run: python license-check.py

bazel:
Expand All @@ -60,32 +60,41 @@ jobs:
run: bazelisk test //... $CONFIG

test:
runs-on: [self-hosted, prod, "${{ matrix.os }}", cpu]
runs-on: [self-hosted, prod, "${{ matrix.os }}", "${{ matrix.arch }}", "${{ matrix.device }}"]
strategy:
fail-fast: false
matrix:
os: [Linux, macOS]
include:
- os: Linux
arch: X64
feature: default
device: cpu
- os: Linux
arch: X64
feature: cuda
device: nvidia_rtx_a5000
- os: macOS
arch: ARM64
feature: default
device: apple_m2_pro
env:
RUST_BACKTRACE: full
FEATURE: ${{ matrix.feature }}
RISC0_BUILD_LOCKED: 1
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v3
with:
lfs: true
- run: git lfs pull
- if: matrix.feature == 'cuda'
uses: ./.github/actions/cuda
- uses: risc0/risc0/.github/actions/rustup@4ab1f0bba1b0515819221bebc59f95aad0a6a3a9
- uses: risc0/risc0/.github/actions/sccache@1a373c71585766e4f6985b96c48389daaf69d528
- uses: risc0/cargo-install@b9307573043522ab0d3e3be64a51763b765b52a4
with:
crate: cargo-binstall
version: "1.4"
locked: false
- run: cargo binstall -y --force cargo-risczero
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: cargo risczero install
- run: cargo test
- run: cargo test --tests -- --ignored
key: ${{ matrix.os }}-${{ matrix.feature }}
- run: |
curl -L https://risczero.com/install | bash
echo "$HOME/.risc0/bin" >> $GITHUB_PATH
shell: bash
- run: rzup install rust
- run: cargo test --locked -F $FEATURE
- run: cargo check --benches
- run: cargo check --manifest-path zirgen/bootstrap/Cargo.toml
- run: sccache --show-stats
Expand All @@ -99,7 +108,12 @@ jobs:
- uses: actions/checkout@v3
- uses: risc0/risc0/.github/actions/rustup@4ab1f0bba1b0515819221bebc59f95aad0a6a3a9
- uses: risc0/risc0/.github/actions/sccache@1a373c71585766e4f6985b96c48389daaf69d528
- run: cargo doc --no-deps --exclude=bigint-test-methods --workspace
- run: |
curl -L https://risczero.com/install | bash
echo "$HOME/.risc0/bin" >> $GITHUB_PATH
shell: bash
- run: rzup install rust
- run: cargo doc --no-deps --workspace
- run: sccache --show-stats

# see: https://github.com/orgs/community/discussions/26822
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
.DS_Store
.idea/
bazel-*
Cargo.lock
dist/
rust-project.json
target/
Expand Down
Loading
Loading