forked from AMReX-Microelectronics/artemis
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (109 loc) · 4.01 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: 🐧 HIP
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-hip
cancel-in-progress: true
jobs:
build_hip_3d_sp:
name: HIP 3D SP
runs-on: ubuntu-20.04
env:
CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed"
CMAKE_GENERATOR: Ninja
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: install dependencies
shell: bash
run: .github/workflows/dependencies/hip.sh
- name: CCache Cache
uses: actions/cache@v3
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-hip-3dsp-${{ hashFiles('.github/workflows/hip.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-hip-3dsp-${{ hashFiles('.github/workflows/hip.yml') }}-
ccache-hip-3dsp-
- name: build WarpX
shell: bash
run: |
source /etc/profile.d/rocm.sh
hipcc --version
which clang
which clang++
export CXX=$(which clang++)
export CC=$(which clang)
# "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_sp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_AMD_ARCH=gfx900 \
-DWarpX_COMPUTE=HIP \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_MPI=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE \
-DWarpX_PSATD=ON
cmake --build build_sp -j 2
export WARPX_MPI=OFF
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel .
python3 -m pip install *.whl
build_hip_2d_dp:
name: HIP 2D DP
runs-on: ubuntu-20.04
env:
CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed"
CMAKE_GENERATOR: Ninja
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: install dependencies
shell: bash
run: .github/workflows/dependencies/hip.sh
- name: CCache Cache
uses: actions/cache@v3
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-hip-2ddp-${{ hashFiles('.github/workflows/hip.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-hip-2ddp-${{ hashFiles('.github/workflows/hip.yml') }}-
ccache-hip-2ddp-
- name: build WarpX
shell: bash
run: |
source /etc/profile.d/rocm.sh
hipcc --version
which clang
which clang++
export CXX=$(which clang++)
export CC=$(which clang)
# "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_2d \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_AMD_ARCH=gfx900 \
-DWarpX_DIMS=2 \
-DWarpX_COMPUTE=HIP \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_MPI=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=DOUBLE \
-DWarpX_PSATD=ON
cmake --build build_2d -j 2
export WARPX_MPI=OFF
PYWARPX_LIB_DIR=$PWD/build_2d/lib python3 -m pip wheel .
python3 -m pip install *.whl