1414 max-parallel : 4
1515 matrix :
1616 arch : [DEIGEN_DONT_VECTORIZE, msse2, mavx, mavx2]
17- eigenversion : [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0]
18- os : [ubuntu-18 .04,ubuntu-20.04,ubuntu-22 .04]
19- steps :
17+ eigenversion : [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0, 5.0.0 ]
18+ os : [ubuntu-22 .04, ubuntu-24 .04]
19+ steps :
2020 - uses : actions/checkout@v3
2121 - name : Install dependencies
2222 run : |
@@ -25,11 +25,19 @@ jobs:
2525 git checkout tags/${{ matrix.eigenversion }}
2626 popd
2727 mv eigen include
28+ - name : Set C++ standard for Eigen 5.x
29+ id : cxx_standard
30+ run : |
31+ if [[ "${{ matrix.eigenversion }}" == 5.* ]]; then
32+ echo "cxx_standard=14" >> $GITHUB_OUTPUT
33+ else
34+ echo "cxx_standard=11" >> $GITHUB_OUTPUT
35+ fi
2836 - name : Build
2937 run : |
3038 export EIGEN_PATH=`pwd`/include
3139 mkdir build && cd build
32- cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
40+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} - DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
3341 make
3442 - name : CPU info
3543 run : cat /proc/cpuinfo
@@ -48,33 +56,40 @@ jobs:
4856 - name : Set up Python3
4957 uses : actions/setup-python@v1
5058 with :
51- python-version : 3.8
52- architecture : x64
59+ python-version : " 3.10"
5360 - name : Test Reference
5461 run : |
5562 pip install scipy
5663 python benchmark/comp_scipy.py
5764
5865 build_macos :
59- name : Build for macOS
60- runs-on : macOS-10.15
66+ name : Build for macOS (Intel)
67+ runs-on : macos-15-intel
6168 strategy :
6269 max-parallel : 4
6370 matrix :
6471 arch : [DEIGEN_DONT_VECTORIZE, msse2, mavx]
65- eigenversion : [3.3.4, 3.3. 5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0]
72+ eigenversion : [3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0, 5.0 .0]
6673 steps :
6774 - uses : actions/checkout@v3
6875 - name : Install dependencies
6976 run : |
7077 wget https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz
7178 tar -zxvf eigen-${{ matrix.eigenversion }}.tar.gz
7279 mv eigen-${{ matrix.eigenversion }} include
80+ - name : Set C++ standard for Eigen 5.x
81+ id : cxx_standard
82+ run : |
83+ if [[ "${{ matrix.eigenversion }}" == 5.* ]]; then
84+ echo "cxx_standard=14" >> $GITHUB_OUTPUT
85+ else
86+ echo "cxx_standard=11" >> $GITHUB_OUTPUT
87+ fi
7388 - name : Build
7489 run : |
7590 export EIGEN_PATH=`pwd`/include
7691 mkdir build && cd build
77- cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
92+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} - DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
7893 make
7994 - name : CPU info
8095 run : sysctl -a | grep machdep.cpu
@@ -96,21 +111,20 @@ jobs:
96111 - name : Set up Python3
97112 uses : actions/setup-python@v1
98113 with :
99- python-version : 3.8
100- architecture : x64
114+ python-version : " 3.10"
101115 - name : Test Reference
102116 run : |
103117 pip install scipy
104118 python benchmark/comp_scipy.py
105119
106120 build_windows :
107121 name : Build for Windows
108- runs-on : windows-2019
122+ runs-on : windows-2022
109123 strategy :
110124 max-parallel : 4
111125 matrix :
112126 arch : ['/D EIGEN_DONT_VECTORIZE', '/arch:SSE2', '/arch:AVX', '/arch:AVX2']
113- eigenversion : [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0]
127+ eigenversion : [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0, 5.0.0 ]
114128 steps :
115129 - uses : actions/checkout@v3
116130 - name : Install dependencies
@@ -119,15 +133,19 @@ jobs:
119133 tar -zxvf eigen.tar.gz
120134 mv eigen-${{ matrix.eigenversion }} include
121135 echo "EIGEN_PATH=$(Get-Location)\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
136+ - name : Set C++ standard for Eigen 5.x
137+ id : cxx_standard
138+ shell : pwsh
139+ run : |
140+ if ("${{ matrix.eigenversion }}" -like "5.*") {
141+ echo "cxx_standard=14" >> $env:GITHUB_OUTPUT
142+ } else {
143+ echo "cxx_standard=11" >> $env:GITHUB_OUTPUT
144+ }
122145 - name : Build
123- uses : lukka/run-cmake@v3
124- with :
125- cmakeListsOrSettingsJson : CMakeListsTxtAdvanced
126- cmakeBuildType : Release
127- buildWithCMake : true
128- cmakeAppendedArgs : -G"Visual Studio 16 2019" -Ax64 -DEIGENRAND_CXX_FLAGS="${{ matrix.arch }} /I${{ env.EIGEN_PATH }}"
129- buildWithCMakeArgs : --config Release
130- buildDirectory : build
146+ run : |
147+ cmake -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} -DEIGENRAND_CXX_FLAGS="${{ matrix.arch }} /I${{ env.EIGEN_PATH }}"
148+ cmake --build build --config Release
131149 - name : CPU info
132150 run : bash -c "cat /proc/cpuinfo"
133151 - name : Run Bench
@@ -145,47 +163,118 @@ jobs:
145163 - name : Set up Python3
146164 uses : actions/setup-python@v1
147165 with :
148- python-version : 3.8
149- architecture : x64
166+ python-version : " 3.10"
150167 - name : Test Reference
151168 run : |
152169 pip install scipy
153170 python benchmark/comp_scipy.py
154171
155-
156- build-arm64 :
157- name : Build for Arm64-Centos7
158- runs-on : [ubuntu-18.04,ubuntu-20.04,ubuntu-22.04]
172+ build_linux_arm64 :
173+ name : Build for linux (Arm64)
174+ runs-on : ${{ matrix.os }}
159175 strategy :
160176 max-parallel : 4
161177 matrix :
162- arch : [DEIGEN_DONT_VECTORIZE, march=native ]
163- eigenversion : [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0]
164-
178+ arch : [DEIGEN_DONT_VECTORIZE, march=armv8-a+simd ]
179+ eigenversion : [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0, 5.0.0 ]
180+ os : [ubuntu-22.04-arm64, ubuntu-24.04-arm64]
165181 steps :
166182 - uses : actions/checkout@v3
183+ - name : Install dependencies
184+ run : |
185+ git clone https://gitlab.com/libeigen/eigen
186+ pushd eigen
187+ git checkout tags/${{ matrix.eigenversion }}
188+ popd
189+ mv eigen include
190+ - name : Set C++ standard for Eigen 5.x
191+ id : cxx_standard
192+ run : |
193+ if [[ "${{ matrix.eigenversion }}" == 5.* ]]; then
194+ echo "cxx_standard=14" >> $GITHUB_OUTPUT
195+ else
196+ echo "cxx_standard=11" >> $GITHUB_OUTPUT
197+ fi
198+ - name : Build
199+ run : |
200+ export EIGEN_PATH=`pwd`/include
201+ mkdir build && cd build
202+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
203+ make
204+ - name : CPU info
205+ run : cat /proc/cpuinfo
206+ - name : Run Bench
207+ run : |
208+ ./build/EigenRand-benchmark
209+ - name : Run BenchMv
210+ run : |
211+ ./build/EigenRand-benchmark-mv
212+ - name : Run BenchVop
213+ run : |
214+ ./build/EigenRand-benchmark-vop
215+ - name : Run Accuracy
216+ run : |
217+ ./build/EigenRand-accuracy
218+ - name : Set up Python3
219+ uses : actions/setup-python@v1
167220 with :
168- submodules : true
169- - uses : bab2min/run-on-arch-action@use-custom-image
170- id : runcmd
221+ python-version : " 3.10"
222+ - name : Test Reference
223+ run : |
224+ pip install scipy
225+ python benchmark/comp_scipy.py
226+
227+ build_macos_arm64 :
228+ name : Build for macOS (Arm64)
229+ runs-on : macos-15
230+ strategy :
231+ max-parallel : 4
232+ matrix :
233+ arch : [DEIGEN_DONT_VECTORIZE, march=armv8-a+simd]
234+ eigenversion : [3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0, 5.0.0]
235+ steps :
236+ - uses : actions/checkout@v3
237+ - name : Install dependencies
238+ run : |
239+ wget https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz
240+ tar -zxvf eigen-${{ matrix.eigenversion }}.tar.gz
241+ mv eigen-${{ matrix.eigenversion }} include
242+ - name : Set C++ standard for Eigen 5.x
243+ id : cxx_standard
244+ run : |
245+ if [[ "${{ matrix.eigenversion }}" == 5.* ]]; then
246+ echo "cxx_standard=14" >> $GITHUB_OUTPUT
247+ else
248+ echo "cxx_standard=11" >> $GITHUB_OUTPUT
249+ fi
250+ - name : Build
251+ run : |
252+ export EIGEN_PATH=`pwd`/include
253+ mkdir build && cd build
254+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
255+ make
256+ - name : CPU info
257+ run : sysctl -a | grep machdep.cpu
258+ - name : Run Bench
259+ continue-on-error : true
260+ run : |
261+ ./build/EigenRand-benchmark
262+ - name : Run BenchMv
263+ continue-on-error : true
264+ run : |
265+ ./build/EigenRand-benchmark-mv
266+ - name : Run BenchVop
267+ continue-on-error : true
268+ run : |
269+ ./build/EigenRand-benchmark-vop
270+ - name : Run Accuracy
271+ run : |
272+ ./build/EigenRand-accuracy
273+ - name : Set up Python3
274+ uses : actions/setup-python@v1
171275 with :
172- image : quay.io/pypa/manylinux2014_aarch64
173- githubToken : ${{ github.token }}
174- setup : |
175- mkdir -p "${PWD}/artifacts"
176- dockerRunArgs : |
177- --volume "${PWD}/artifacts:/artifacts"
178- run : |
179- git clone https://gitlab.com/libeigen/eigen
180- pushd eigen
181- git checkout tags/${{ matrix.eigenversion }}
182- popd
183- mv eigen include
184- export EIGEN_PATH=`pwd`/include
185- mkdir build && cd build
186- cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../
187- make
188- ./EigenRand-benchmark 1000 3
189- ./EigenRand-benchmark-mv 10000 3
190- ./EigenRand-benchmark-vop 1000 3
191- ./EigenRand-accuracy 256
276+ python-version : " 3.10"
277+ - name : Test Reference
278+ run : |
279+ pip install scipy
280+ python benchmark/comp_scipy.py
0 commit comments