-
Notifications
You must be signed in to change notification settings - Fork 19
61 lines (53 loc) · 1.8 KB
/
hip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 🐧 HIP
on: [workflow_call]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-hip
cancel-in-progress: true
jobs:
build_hip:
name: ROCm HIP 6.1
runs-on: ubuntu-20.04
env:
CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed"
CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
- name: install dependencies
shell: bash
run: |
.github/workflows/dependencies/hip.sh 6.1
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build ImpactX
shell: bash
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=300M
ccache -z
source /etc/profile.d/rocm.sh
hipcc --version
which clang
which clang++
export CXX=$(which clang++)
export CC=$(which clang)
python3 -m pip install -U pip importlib_metadata launchpadlib setuptools wheel
python3 -m pip install -U cmake
# "mpic++ --showme" forgets open-pal in Ubuntu 20.04 + OpenMPI 4.0.3
# https://bugs.launchpad.net/ubuntu/+source/openmpi/+bug/1941786
# https://github.com/open-mpi/ompi/issues/9317
export LDFLAGS="-lopen-pal"
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_GPU_BACKEND=HIP \
-DAMReX_AMD_ARCH=gfx900 \
-DAMReX_SPACEDIM="1;2;3"
cmake --build build --target pip_install -j 4
ccache -s
du -hs ~/.cache/ccache