Skip to content

Commit 4681e8d

Browse files
authored
Merge pull request #1084 from succinctlabs/tamir/sp1-gpu
feat: integrate `sp1-gpu`
2 parents 154f7f6 + 7f96849 commit 4681e8d

File tree

309 files changed

+81184
-839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+81184
-839
lines changed

.github/actions/setup/action.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ inputs:
1818
description: "Optional toolchain to override"
1919
required: false
2020
default: null
21+
setup_gpu:
22+
description: "Whether to setup GPU environment (CUDA, CMake, etc.)"
23+
required: false
24+
default: 'false'
2125
runs:
2226
using: "composite"
2327
steps:
@@ -84,6 +88,16 @@ runs:
8488
~/.rustup/
8589
key: sp1-rust-${{ runner.arch }}-${{ runner.os }}
8690

91+
- name: Install rustup if not present
92+
shell: bash
93+
run: |
94+
if ! command -v rustup &> /dev/null; then
95+
echo "rustup not found. Installing..."
96+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
97+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
98+
export PATH="$HOME/.cargo/bin:$PATH"
99+
fi
100+
87101
- name: Run sccache-cache only on non-release runs
88102
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
89103
uses: mozilla-actions/[email protected]
@@ -128,6 +142,40 @@ runs:
128142
echo "pkg-config and libssl-dev are already installed."
129143
fi
130144
145+
- name: Install GPU dependencies
146+
if: inputs.setup_gpu == 'true'
147+
shell: bash
148+
run: |
149+
sudo apt-get update
150+
sudo apt-get install -y libclang-dev unzip
151+
152+
- name: Install CMake 3.31 (for CUDA C++20 support)
153+
if: inputs.setup_gpu == 'true'
154+
shell: bash
155+
run: |
156+
CMAKE_VERSION=3.31.4
157+
if ! cmake --version 2>/dev/null | grep -q "$CMAKE_VERSION"; then
158+
echo "Installing CMake $CMAKE_VERSION..."
159+
wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh
160+
chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh
161+
sudo ./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/usr/local
162+
rm cmake-${CMAKE_VERSION}-linux-x86_64.sh
163+
fi
164+
cmake --version
165+
166+
- name: Set up CUDA environment
167+
if: inputs.setup_gpu == 'true'
168+
shell: bash
169+
run: |
170+
echo "CUDA_HOME=/usr/local/cuda-12.6" >> $GITHUB_ENV
171+
echo "LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
172+
echo "/usr/local/cuda-12.6/bin" >> $GITHUB_PATH
173+
174+
- name: Confirm CUDA installation
175+
if: inputs.setup_gpu == 'true'
176+
shell: bash
177+
run: which nvcc
178+
131179
- name: Install Protoc
132180
uses: arduino/setup-protoc@v3
133181
with:

.github/workflows/docker-publish-cuslop.yml

Lines changed: 0 additions & 113 deletions
This file was deleted.

0 commit comments

Comments
 (0)