From 8b5794a966b4ccf9c1563ade2763cc64861e34c4 Mon Sep 17 00:00:00 2001 From: Trevor Lovell Date: Thu, 28 May 2026 00:37:23 +0000 Subject: [PATCH 1/4] feat: bump CUDA to 12.8 Recent requirements to use ubuntu24.04 in kubernetes deployments of blitzar dependents have made it difficult or impossible to use CUDA 12.6. Nvidia does not provide an ubuntu24.04 driver image that is compatible with the current blitzar. Using CUDA 12.8 should resolve the issue. --- README.md | 4 ++-- nix/cuda.nix | 6 +++--- rust/blitzar-sys/README.md | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 994783e8..eeec0869 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ - CUDA + CUDA

@@ -166,7 +166,7 @@ See the [example](./example) folder for some examples. Prerequisites: * `x86_64` Linux instance. * Nix with flake support (check out [The Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer)). -* Nvidia GPU capable of running CUDA 12.6 code. +* Nvidia GPU capable of running CUDA 12.8 code. From your terminal, run the following command in the root of the source directory to set up a build environment. diff --git a/nix/cuda.nix b/nix/cuda.nix index 00636290..beacc1a3 100644 --- a/nix/cuda.nix +++ b/nix/cuda.nix @@ -6,9 +6,9 @@ with pkgs; pkgs.stdenvNoCC.mkDerivation { name = "cudatoolkit"; - src = fetchurl { - url = "https://developer.download.nvidia.com/compute/cuda/12.6.1/local_installers/cuda_12.6.1_560.35.03_linux.run"; - sha256 = "179fx44j0f6fm4m8afx5vhivv3ywyv7mv7shb7r2b5ji8drcxb3k"; + src = fetchurl { + url = "https://developer.download.nvidia.com/compute/cuda/12.8.1/local_installers/cuda_12.8.1_570.124.06_linux.run"; + sha256 = "15wpl4k2yl14i84kgglysdg0wbf99y8k3x1r541qsqdpyp56p3r2"; }; patches = [ # patch host_defines.h to work with libc++ diff --git a/rust/blitzar-sys/README.md b/rust/blitzar-sys/README.md index 70a3490b..66fa8992 100644 --- a/rust/blitzar-sys/README.md +++ b/rust/blitzar-sys/README.md @@ -45,7 +45,7 @@ - CUDA + CUDA From 380f594adb15d9cee2eea41b12993621a501934a Mon Sep 17 00:00:00 2001 From: Trevor Lovell Date: Fri, 29 May 2026 18:36:32 +0000 Subject: [PATCH 2/4] ci: switch to nvidia runner for gpu dependent jobs The current runner for the gpu jobs is self-hosted and has gone unmaintained for some time. Now, github provides some larger runners with GPUs that we can use instead for easier maintenance. This PR attempts to use them. --- .github/workflows/release.yml | 2 +- .github/workflows/test-check-lint.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef196b1a..bf3fbbe3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: release: name: Build Publish Library - Linux-x86_64 - runs-on: public-blitzar-T4-gpu-vm + runs-on: nvidia-nc4as-t4 timeout-minutes: 600 needs: [test-check-lint] environment: deploy #!! DO NOT CHANGE THIS LINE !! # diff --git a/.github/workflows/test-check-lint.yml b/.github/workflows/test-check-lint.yml index 0ef069c1..b63fea50 100644 --- a/.github/workflows/test-check-lint.yml +++ b/.github/workflows/test-check-lint.yml @@ -14,7 +14,7 @@ concurrency: jobs: format-code: name: Check code - runs-on: public-blitzar-T4-gpu-vm + runs-on: nvidia-nc4as-t4 timeout-minutes: 600 steps: - name: Checkout code @@ -25,7 +25,7 @@ jobs: test-cpp: name: C++ code - runs-on: public-blitzar-T4-gpu-vm + runs-on: nvidia-nc4as-t4 timeout-minutes: 600 steps: - name: Checkout Code @@ -42,7 +42,7 @@ jobs: # # test-cpp-compute-sanitizer: # name: C++ code with compute sanitizer - # runs-on: public-blitzar-T4-gpu-vm + # runs-on: nvidia-nc4as-t4 # timeout-minutes: 600 # steps: # - name: Checkout Code @@ -63,7 +63,7 @@ jobs: test-cpp-opt: name: C++ code with optimizations - runs-on: public-blitzar-T4-gpu-vm + runs-on: nvidia-nc4as-t4 timeout-minutes: 600 steps: - name: Checkout Code @@ -74,7 +74,7 @@ jobs: test-cpp-asan: name: C++ code with address sanitizer - runs-on: public-blitzar-T4-gpu-vm + runs-on: nvidia-nc4as-t4 timeout-minutes: 600 steps: - name: Checkout Code @@ -85,7 +85,7 @@ jobs: test-rust: name: Rust Sys Crate - runs-on: public-blitzar-T4-gpu-vm + runs-on: nvidia-nc4as-t4 timeout-minutes: 600 steps: - name: Checkout Code From 1a38014a5d916c873a05a10c0f507416b7a9bc86 Mon Sep 17 00:00:00 2001 From: Trevor Lovell Date: Fri, 29 May 2026 19:24:39 +0000 Subject: [PATCH 3/4] ci: install nix in all jobs that depend on it The generic nvidia runner does not have nix installed by default. This adds a step to install it using a cachix action (single-user). --- .github/workflows/release.yml | 9 +++++-- .github/workflows/test-check-lint.yml | 37 ++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf3fbbe3..172761eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,10 +23,15 @@ jobs: - run: git config --global --add safe.directory $(realpath .) + - name: Install nix + uses: cachix/install-nix-action@v31 + with: + install_options: --no-daemon + - name: Semantic release run: | - nix develop --command npm install semantic-release - TEST_TMPDIR=$HOME/.bazel_test_opt nix develop --command npx semantic-release + nix develop --extra-experimental-features "nix-command flakes" --command npm install semantic-release + TEST_TMPDIR=$HOME/.bazel_test_opt nix develop --extra-experimental-features "nix-command flakes" --command npx semantic-release env: GH_TOKEN: ${{ secrets.GH_TOKEN }} CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} diff --git a/.github/workflows/test-check-lint.yml b/.github/workflows/test-check-lint.yml index b63fea50..0aa61855 100644 --- a/.github/workflows/test-check-lint.yml +++ b/.github/workflows/test-check-lint.yml @@ -19,9 +19,14 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + + - name: Install nix + uses: cachix/install-nix-action@v31 + with: + install_options: --no-daemon - name: Run check - run: nix develop --command ./tools/code_format/check_format.py check + run: nix develop --extra-experimental-features "nix-command flakes" --command ./tools/code_format/check_format.py check test-cpp: name: C++ code @@ -31,8 +36,13 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 + - name: Install nix + uses: cachix/install-nix-action@v31 + with: + install_options: --no-daemon + - name: Run cpp tests - run: TEST_TMPDIR=$HOME/.bazel_test nix develop --command bazel test //... + run: TEST_TMPDIR=$HOME/.bazel_test nix develop --extra-experimental-features "nix-command flakes" --command bazel test //... # Note: There are some steps we need to our # custom nix derivation from https://github.com/spaceandtimefdn/blitzar/pull/96 @@ -68,9 +78,14 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v3 + + - name: Install nix + uses: cachix/install-nix-action@v31 + with: + install_options: --no-daemon - name: Run cpp tests with optimization flags on - run: TEST_TMPDIR=$HOME/.bazel_test_opt nix develop --command bazel test --jobs=1 -c opt //... + run: TEST_TMPDIR=$HOME/.bazel_test_opt nix develop --extra-experimental-features "nix-command flakes" --command bazel test --jobs=1 -c opt //... test-cpp-asan: name: C++ code with address sanitizer @@ -80,8 +95,13 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 + - name: Install nix + uses: cachix/install-nix-action@v31 + with: + install_options: --no-daemon + - name: Run cpp-asan tests - run: TEST_TMPDIR=$HOME/.bazel_test_asan nix develop --command bazel test --config=asan //sxt/... + run: TEST_TMPDIR=$HOME/.bazel_test_asan nix develop --extra-experimental-features "nix-command flakes" --command bazel test --config=asan //sxt/... test-rust: name: Rust Sys Crate @@ -91,7 +111,12 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 + - name: Install nix + uses: cachix/install-nix-action@v31 + with: + install_options: --no-daemon + - name: Run rust tests run: | - TEST_TMPDIR=$HOME/.bazel_test_opt nix develop --command cargo test --manifest-path rust/blitzar-sys/Cargo.toml - TEST_TMPDIR=$HOME/.bazel_test_opt nix develop --command cargo test --manifest-path rust/tests/Cargo.toml + TEST_TMPDIR=$HOME/.bazel_test_opt nix develop --extra-experimental-features "nix-command flakes" --command cargo test --manifest-path rust/blitzar-sys/Cargo.toml + TEST_TMPDIR=$HOME/.bazel_test_opt nix develop --extra-experimental-features "nix-command flakes" --command cargo test --manifest-path rust/tests/Cargo.toml From 69bdf3ce7ebeb24b9ffc58de8a14d92079b4d042 Mon Sep 17 00:00:00 2001 From: Trevor Lovell Date: Mon, 1 Jun 2026 22:09:12 +0000 Subject: [PATCH 4/4] chore: add some debug steps to test-cpp job --- .github/workflows/test-check-lint.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-check-lint.yml b/.github/workflows/test-check-lint.yml index 0aa61855..58d678bb 100644 --- a/.github/workflows/test-check-lint.yml +++ b/.github/workflows/test-check-lint.yml @@ -33,16 +33,26 @@ jobs: runs-on: nvidia-nc4as-t4 timeout-minutes: 600 steps: + - name: Checkout Code uses: actions/checkout@v3 + - name: Check nvidia version + run: nvidia-smi + - name: Install nix uses: cachix/install-nix-action@v31 with: install_options: --no-daemon + - name: Enter nix env + run: nix develop --extra-experimental-features "nix-command flakes" + + - name: Check nvidia version + run: nvidia-smi + - name: Run cpp tests - run: TEST_TMPDIR=$HOME/.bazel_test nix develop --extra-experimental-features "nix-command flakes" --command bazel test //... + run: TEST_TMPDIR=$HOME/.bazel_test bazel test //... # Note: There are some steps we need to our # custom nix derivation from https://github.com/spaceandtimefdn/blitzar/pull/96