-
-
Notifications
You must be signed in to change notification settings - Fork 13
191 lines (184 loc) · 5.74 KB
/
release.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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
name: Benchmark Release
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*d'
jobs:
build_linux:
name: Build for linux
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
arch: [DEIGEN_DONT_VECTORIZE, msse2, mavx, mavx2]
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0]
os: [ubuntu-18.04,ubuntu-20.04,ubuntu-22.04]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
git clone https://gitlab.com/libeigen/eigen
pushd eigen
git checkout tags/${{ matrix.eigenversion }}
popd
mv eigen include
- name: Build
run: |
export EIGEN_PATH=`pwd`/include
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
make
- name: CPU info
run: cat /proc/cpuinfo
- name: Run Bench
run: |
./build/EigenRand-benchmark
- name: Run BenchMv
run: |
./build/EigenRand-benchmark-mv
- name: Run BenchVop
run: |
./build/EigenRand-benchmark-vop
- name: Run Accuracy
run: |
./build/EigenRand-accuracy
- name: Set up Python3
uses: actions/setup-python@v1
with:
python-version: 3.8
architecture: x64
- name: Test Reference
run: |
pip install scipy
python benchmark/comp_scipy.py
build_macos:
name: Build for macOS
runs-on: macOS-10.15
strategy:
max-parallel: 4
matrix:
arch: [DEIGEN_DONT_VECTORIZE, msse2, mavx]
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
wget https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz
tar -zxvf eigen-${{ matrix.eigenversion }}.tar.gz
mv eigen-${{ matrix.eigenversion }} include
- name: Build
run: |
export EIGEN_PATH=`pwd`/include
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
make
- name: CPU info
run: sysctl -a | grep machdep.cpu
- name: Run Bench
continue-on-error: true
run: |
./build/EigenRand-benchmark
- name: Run BenchMv
continue-on-error: true
run: |
./build/EigenRand-benchmark-mv
- name: Run BenchVop
continue-on-error: true
run: |
./build/EigenRand-benchmark-vop
- name: Run Accuracy
run: |
./build/EigenRand-accuracy
- name: Set up Python3
uses: actions/setup-python@v1
with:
python-version: 3.8
architecture: x64
- name: Test Reference
run: |
pip install scipy
python benchmark/comp_scipy.py
build_windows:
name: Build for Windows
runs-on: windows-2019
strategy:
max-parallel: 4
matrix:
arch: ['/D EIGEN_DONT_VECTORIZE', '/arch:SSE2', '/arch:AVX', '/arch:AVX2']
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
Invoke-WebRequest -OutFile eigen.tar.gz https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz
tar -zxvf eigen.tar.gz
mv eigen-${{ matrix.eigenversion }} include
echo "EIGEN_PATH=$(Get-Location)\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- name: Build
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeBuildType: Release
buildWithCMake: true
cmakeAppendedArgs: -G"Visual Studio 16 2019" -Ax64 -DEIGENRAND_CXX_FLAGS="${{ matrix.arch }} /I${{ env.EIGEN_PATH }}"
buildWithCMakeArgs: --config Release
buildDirectory: build
- name: CPU info
run: bash -c "cat /proc/cpuinfo"
- name: Run Bench
run: |
.\build\Release\EigenRand-benchmark.exe
- name: Run BenchMv
run: |
.\build\Release\EigenRand-benchmark-mv.exe
- name: Run BenchVop
run: |
.\build\Release\EigenRand-benchmark-vop.exe
- name: Run Accuracy
run: |
.\build\Release\EigenRand-accuracy.exe
- name: Set up Python3
uses: actions/setup-python@v1
with:
python-version: 3.8
architecture: x64
- name: Test Reference
run: |
pip install scipy
python benchmark/comp_scipy.py
build-arm64:
name: Build for Arm64-Centos7
runs-on: [ubuntu-18.04,ubuntu-20.04,ubuntu-22.04]
strategy:
max-parallel: 4
matrix:
arch: [DEIGEN_DONT_VECTORIZE, march=native]
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: bab2min/run-on-arch-action@use-custom-image
id: runcmd
with:
image: quay.io/pypa/manylinux2014_aarch64
githubToken: ${{ github.token }}
setup: |
mkdir -p "${PWD}/artifacts"
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
run: |
git clone https://gitlab.com/libeigen/eigen
pushd eigen
git checkout tags/${{ matrix.eigenversion }}
popd
mv eigen include
export EIGEN_PATH=`pwd`/include
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
make
./EigenRand-benchmark 1000 3
./EigenRand-benchmark-mv 10000 3
./EigenRand-benchmark-vop 1000 3
./EigenRand-accuracy 256