Skip to content

Commit

Permalink
sync GPU dependencies with AMReX
Browse files Browse the repository at this point in the history
this pulls in the new sparse libraries
  • Loading branch information
zingale committed Dec 10, 2024
1 parent 5d9a59a commit 8f3ea3d
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
.github/workflows/dependencies_clang-tidy-apt-llvm.sh 19
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 19
- name: Compile flame_wave
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/r

# we should not need to export HIP_PATH=/opt/rocm/hip with those installs

sudo apt-get clean
sudo apt-get update

# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#installing-development-packages-for-cross-compilation
Expand All @@ -56,7 +57,9 @@ sudo apt-get install -y --no-install-recommends \
roctracer-dev \
rocprofiler-dev \
rocrand-dev \
rocprim-dev
rocfft-dev \
rocprim-dev \
rocsparse-dev

# hiprand-dev is a new package that does not exist in old versions
sudo apt-get install -y --no-install-recommends hiprand-dev || true
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/dependencies/dependencies_nvcc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
#
# Copyright 2020-2022 Axel Huebl
#
# License: BSD-3-Clause-LBNL

set -eu -o pipefail

# `man apt.conf`:
# Number of retries to perform. If this is non-zero APT will retry
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

sudo apt-get -qqq update
sudo apt-get install -y \
build-essential \
ca-certificates \
cmake \
g++ \
gfortran \
gnupg \
libopenmpi-dev \
openmpi-bin \
pkg-config \
wget

VERSION_DOTTED=${1-12.0} && VERSION_DASHED=$(sed 's/\./-/' <<< $VERSION_DOTTED)
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get install -y \
cuda-command-line-tools-$VERSION_DASHED \
cuda-compiler-$VERSION_DASHED \
cuda-cupti-dev-$VERSION_DASHED \
cuda-minimal-build-$VERSION_DASHED \
cuda-nvml-dev-$VERSION_DASHED \
cuda-nvtx-$VERSION_DASHED \
libcufft-dev-$VERSION_DASHED \
libcurand-dev-$VERSION_DASHED \
libcusparse-dev-$VERSION_DASHED
sudo ln -s cuda-$VERSION_DOTTED /usr/local/cuda
9 changes: 1 addition & 8 deletions .github/workflows/gpu_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,7 @@ jobs:
sudo apt-get -qq -y install curl cmake jq clang g++>=9.3.0
- name: Install CUDA
# from https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_network
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda-toolkit-11-8
run: .github/workflows/dependencies/dependencies_nvcc.sh 11.8

- name: Install hypre
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
cd ../..
- name: Dependencies
run: .github/workflows/dependencies_hip.sh
run: .github/workflows/dependencies/dependencies_hip.sh

- name: compile flame_wave
run: |
Expand Down

0 comments on commit 8f3ea3d

Please sign in to comment.