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

Update Subspace with CUDA support #303

Merged
merged 1 commit into from
Sep 17, 2024
Merged
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
27 changes: 21 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ jobs:
run: brew install libtool
if: runner.os == 'macOS'

- name: CUDA toolchain
uses: Jimver/cuda-toolkit@9b295696791d75d658d8de64c4a85097ad8abeaf # v0.2.16
with:
cuda: '12.4.1'
method: network
sub-packages: '["nvcc", "cudart"]'
if: runner.os == 'Linux' || runner.os == 'Windows'

- name: Install Protoc
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
Expand Down Expand Up @@ -134,26 +142,33 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-

- name: Build app (Linux or macOS, modern)
- name: Build app (Linux, modern, CUDA)
env:
RUSTFLAGS: ${{ matrix.build.modern-rustflags }}
run: |
cargo -Zgitoxide -Zgit build --locked -Z build-std --target ${{ matrix.build.target }} --profile production
cargo -Zgitoxide -Zgit build --locked -Z build-std --target ${{ matrix.build.target }} --profile production --features cuda
mv target/${{ matrix.build.target }}/production/space-acres target/${{ matrix.build.target }}/production/space-acres-modern
if: (runner.os == 'Linux' || runner.os == 'macOS') && matrix.build.modern-rustflags
if: runner.os == 'Linux' && matrix.build.modern-rustflags

- name: Build app (Windows, modern)
- name: Build app (Windows, modern, CUDA)
env:
RUSTFLAGS: ${{ matrix.build.modern-rustflags }}
run: |
cargo -Zgitoxide -Zgit build --locked -Z build-std --target ${{ matrix.build.target }} --profile production
cargo -Zgitoxide -Zgit build --locked -Z build-std --target ${{ matrix.build.target }} --profile production --features cuda
Move-Item -Path target\${{ matrix.build.target }}\production\space-acres.exe -Destination target\${{ matrix.build.target }}\production\space-acres-modern.exe
if: runner.os == 'Windows' && matrix.build.modern-rustflags

- name: Build app (normal)
- name: Build app (macOS, normal)
env:
RUSTFLAGS: ${{ matrix.build.rustflags }}
run: cargo -Zgitoxide -Zgit build --locked -Z build-std --target ${{ matrix.build.target }} --profile production
if: runner.os == 'macOS'

- name: Build app (Linux or Windows, normal, CUDA)
env:
RUSTFLAGS: ${{ matrix.build.rustflags }}
run: cargo -Zgitoxide -Zgit build --locked -Z build-std --target ${{ matrix.build.target }} --profile production --features cuda
if: runner.os == 'Linux' || runner.os == 'Windows'

- name: Create bundle (macOS)
run: |
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ jobs:
run: brew install libtool
if: runner.os == 'macOS'

- name: CUDA toolchain
uses: Jimver/cuda-toolkit@9b295696791d75d658d8de64c4a85097ad8abeaf # v0.2.16
with:
cuda: '12.4.1'
method: network
sub-packages: '["nvcc", "cudart"]'
if: runner.os == 'Linux' || runner.os == 'Windows'

- name: Install Protoc
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
Expand Down Expand Up @@ -150,6 +158,11 @@ jobs:

- name: cargo clippy
run: cargo -Zgitoxide -Zgit clippy --locked --all-targets -- -D warnings
if: runner.os == 'macOS'

- name: cargo clippy
run: cargo -Zgitoxide -Zgit clippy --locked --all-targets --features cuda -- -D warnings
if: runner.os == 'Linux' || runner.os == 'Windows'

cargo-test:
strategy:
Expand Down
Loading
Loading