forked from TESSEorg/ttg
-
Notifications
You must be signed in to change notification settings - Fork 3
146 lines (125 loc) · 5.2 KB
/
Copy pathgpu.yml
File metadata and controls
146 lines (125 loc) · 5.2 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: GPU Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master'}}
jobs:
cuda-tests:
name: "CUDA Device Tests"
runs-on: self-hosted
env:
CCACHE_DIR: ${{github.workspace}}/build/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
OMPI_MCA_btl_vader_single_copy_mechanism: none
PARSEC_MCA_runtime_bind_threads: 0
MKLROOT: /opt/intel/mkl
Eigen3_DIR: /home/evaleev/code/install/eigen-master
LD_LIBRARY_PATH: /home/evaleev/code/install/gcc/12/lib64
steps:
- uses: actions/checkout@v4
- name: Setup ccache
uses: actions/cache@v4
with:
path: ${{github.workspace}}/build/.ccache
key: ${{ runner.os }}-cuda-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-cuda-ccache-
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE \
-G Ninja \
-DCMAKE_CXX_COMPILER=/home/evaleev/code/install/gcc/12/bin/g++ \
-DCMAKE_C_COMPILER=/home/evaleev/code/install/gcc/12/bin/gcc \
-DCMAKE_CUDA_HOST_COMPILER=/home/evaleev/code/install/gcc/12/bin/g++ \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DCMAKE_CUDA_ARCHITECTURES=native \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install \
-DTTG_EXAMPLES=ON \
-DTTG_ENABLE_CUDA=ON \
-DMPIEXEC_PREFLAGS='--bind-to;none;--allow-run-as-root' \
|| (cat CMakeFiles/CMakeConfigureLog.yaml && exit 1)
- name: Build TTG
working-directory: ${{github.workspace}}/build
shell: bash
run: ccache -p && ccache -z && cmake --build . && ccache -s
- name: Build CUDA Examples
working-directory: ${{github.workspace}}/build
shell: bash
run: |
echo "Building CUDA device examples..."
cmake --build . --target bspmm-cuda-parsec || echo "bspmm-cuda-parsec not available"
cmake --build . --target testing_dpotrf_cuda-parsec || echo "testing_dpotrf_cuda-parsec not available"
cmake --build . --target chain-ttg-cuda-parsec || echo "chain-ttg-cuda-parsec not available"
- name: Install
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --target install
- name: Configure Fibonacci Example
shell: bash
run: |
cmake -E make_directory ${{github.workspace}}/fibonacci-build
cd ${{github.workspace}}/fibonacci-build
cmake ${{github.workspace}}/doc/dox/dev/devsamp/fibonacci \
-G Ninja \
-DCMAKE_CXX_COMPILER=/home/evaleev/code/install/gcc/12/bin/g++ \
-DCMAKE_C_COMPILER=/home/evaleev/code/install/gcc/12/bin/gcc \
-DCMAKE_CUDA_HOST_COMPILER=/home/evaleev/code/install/gcc/12/bin/g++ \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DCMAKE_CUDA_ARCHITECTURES=native \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
-DCMAKE_PREFIX_PATH="${{github.workspace}}/install" \
|| (cat CMakeFiles/CMakeConfigureLog.yaml && exit 1)
- name: Build Fibonacci CUDA Example
working-directory: ${{github.workspace}}/fibonacci-build
shell: bash
run: cmake --build . --target fibonacci_cuda-parsec
- name: Run GPU Tests
working-directory: ${{github.workspace}}/build
shell: bash
run: |
set -e # Exit on first error
echo "=== GPU Device Information ==="
nvidia-smi || echo "nvidia-smi not available"
echo "=== Running CUDA Examples ==="
# Test bspmm-cuda if it exists
if [ -f "examples/bspmm-cuda-parsec" ]; then
echo "Testing bspmm-cuda-parsec..."
mpiexec -n 1 ./examples/bspmm-cuda-parsec
mpiexec -n 1 ./examples/bspmm-cuda-parsec 10 10 10
fi
# Test testing_dpotrf_cuda if it exists
if [ -f "examples/testing_dpotrf_cuda-parsec" ]; then
echo "Testing testing_dpotrf_cuda-parsec..."
mpiexec -n 1 ./examples/testing_dpotrf_cuda-parsec -N 100 -nb 25 -P 1
fi
# Test chain-ttg-cuda if it exists
if [ -f "examples/chain-ttg-cuda-parsec" ]; then
echo "Testing chain-ttg-cuda-parsec..."
mpiexec -n 1 ./examples/chain-ttg-cuda-parsec 100
fi
# Test fibonacci_cuda-parsec example (built from installed TTG)
if [ -f "${{github.workspace}}/fibonacci-build/fibonacci_cuda-parsec" ]; then
echo "Testing fibonacci_cuda-parsec..."
mpiexec -n 1 ${{github.workspace}}/fibonacci-build/fibonacci_cuda-parsec 20
fi
- name: Upload build artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: cuda-build-logs
path: |
${{github.workspace}}/build/CMakeFiles/CMakeConfigureLog.yaml
${{github.workspace}}/build/CMakeCache.txt