feat: add debug to StarkEngineV2
#384
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust and CUDA signatures match | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["**"] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| gpu-signatures-match: | |
| runs-on: | |
| - runs-on=${{ github.run_id }}/runner=test-gpu-nvidia | |
| steps: | |
| - uses: runs-on/action@v2 | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| env: | |
| RUSTUP_PERMIT_COPY_RENAME: "1" | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: taiki-e/install-action@nextest | |
| - name: Verify GPU setup | |
| run: | | |
| nvidia-smi | |
| nvidia-smi -L | |
| nvcc --version | |
| - name: Install prerequisites | |
| working-directory: . | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cbindgen python3-venv | |
| python3 -m venv .venv | |
| source .venv/bin/activate | |
| pip install pyelftools | |
| - name: Run the matcher (cuda-backend) | |
| working-directory: crates/cuda-backend | |
| run: | | |
| source ../../.venv/bin/activate | |
| echo "Running cbindgen" | |
| cbindgen -c ../../scripts/cbindgen.toml . -o rust_abi.hpp | |
| echo "Running gen_stub.py" | |
| python3 ../../scripts/gen_stub.py rust_abi.hpp > rust_stub.cpp | |
| echo "Running g++" | |
| g++ -DCB_TEST -O0 -g -c -fno-eliminate-unused-debug-types rust_stub.cpp -o rust_stub.o | |
| echo "Running cargo build" | |
| CUDA_DEBUG=1 cargo build | |
| RUST_EXE_PATH="../../target/debug/build" | |
| RUST_OUTPUT=$(ls -t $RUST_EXE_PATH | grep backend | head -n 1) | |
| echo "The freshest is $RUST_OUTPUT" | |
| RUST_OUTPUT_PATH="$RUST_EXE_PATH/$RUST_OUTPUT/out" | |
| echo "Running abi_cmp.py" | |
| LOGLEVEL=warning python3 ../../scripts/abi_cmp.py rust_stub.o $RUST_OUTPUT_PATH |