-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathJenkinsfile
More file actions
72 lines (69 loc) · 2.2 KB
/
Jenkinsfile
File metadata and controls
72 lines (69 loc) · 2.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
properties([
disableConcurrentBuilds(),
buildDiscarder(logRotator(numToKeepStr: '8', daysToKeepStr: '20'))
])
try {
timeout(time: 1, unit: 'HOURS') {
buildPod(dockerfile: 'tools/cufinufft/docker/cuda11.2/Dockerfile-x86_64', gpus: 2, gpuType: 'v100') {
stage('build') {
withEnv([
"HOME=$WORKSPACE",
"PYBIN=/opt/python/cp310-cp310/bin",
"LIBRARY_PATH=$WORKSPACE/build",
"LD_LIBRARY_PATH=$WORKSPACE/build"
]) {
sh '''#!/bin/bash -ex
nvidia-smi
'''
sh '''#!/bin/bash -ex
echo $HOME
'''
sh '''#!/bin/bash -ex
# v100 cuda arch
cuda_arch="70"
cmake -B build . -DFINUFFT_USE_CUDA=ON \
-DFINUFFT_USE_CPU=OFF \
-DFINUFFT_BUILD_TESTS=ON \
-DCMAKE_CUDA_ARCHITECTURES="$cuda_arch" \
-DBUILD_TESTING=ON \
-DFINUFFT_STATIC_LINKING=OFF
cd build
make -j$PARALLEL
'''
sh '''#!/bin/bash -ex
cd build/test/cuda
ctest --output-on-failure
'''
sh '${PYBIN}/python3 -m venv $HOME'
sh '''#!/bin/bash -ex
cuda_arch="70"
source $HOME/bin/activate
python3 -m pip install --no-cache-dir --upgrade pip
python3 -m pip install \
--no-cache-dir \
--config-settings=cmake.define.CMAKE_CUDA_ARCHITECTURES="${cuda_arch}" \
python/cufinufft
'''
sh '''#!/bin/bash -ex
source $HOME/bin/activate
python -c "import cufinufft"
'''
sh '''#!/bin/bash -ex
source $HOME/bin/activate
python3 -m pip install --no-cache-dir --upgrade pycuda cupy-cuda112 numba
python3 -m pip install --no-cache-dir torch==1.12.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html
python3 -m pip install --no-cache-dir pytest pytest-mock
python -c "from numba import cuda; cuda.cudadrv.libs.test()"
python3 -m pytest --framework=pycuda python/cufinufft
python3 -m pytest --framework=numba python/cufinufft
python3 -m pytest --framework=cupy python/cufinufft
python3 -m pytest --framework=torch python/cufinufft
'''
}
}
}
}
}
finally {
emailFailure()
}