@@ -230,3 +230,82 @@ jobs:
230230 python-version : ${{ env.PYTHON_VERSION }}
231231 - uses : ./.github/actions
232232
233+ armv7_simd_test :
234+ needs : [smoke_test]
235+ runs-on : ubuntu-latest
236+ steps :
237+ - uses : actions/checkout@v2
238+ with :
239+ submodules : recursive
240+ fetch-depth : 0
241+ - name : Initialize binfmt_misc for qemu-user-static
242+ run : |
243+ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
244+ - name : Creates new container
245+ run : |
246+ # use x86_64 cross-compiler to speed up the build
247+ sudo apt update
248+ sudo apt install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
249+ docker run --name the_container --interactive -v /:/host arm32v7/ubuntu:latest /bin/bash -c "
250+ apt update &&
251+ apt install -y git python3 python3-dev python3-pip &&
252+ pip3 install cython==0.29.24 setuptools\<49.2.0 hypothesis==6.23.3 pytest==6.2.5 &&
253+ ln -s /host/lib64 /lib64 &&
254+ ln -s /host/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu &&
255+ ln -s /host/usr/arm-linux-gnueabihf /usr/arm-linux-gnueabihf &&
256+ rm -rf /usr/lib/gcc/arm-linux-gnueabihf && ln -s /host/usr/lib/gcc-cross/arm-linux-gnueabihf /usr/lib/gcc/arm-linux-gnueabihf &&
257+ rm -f /usr/bin/arm-linux-gnueabihf-gcc && ln -s /host/usr/bin/arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc &&
258+ rm -f /usr/bin/arm-linux-gnueabihf-g++ && ln -s /host/usr/bin/arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++ &&
259+ rm -f /usr/bin/arm-linux-gnueabihf-ar && ln -s /host/usr/bin/arm-linux-gnueabihf-ar /usr/bin/arm-linux-gnueabihf-ar &&
260+ rm -f /usr/bin/arm-linux-gnueabihf-as && ln -s /host/usr/bin/arm-linux-gnueabihf-as /usr/bin/arm-linux-gnueabihf-as &&
261+ rm -f /usr/bin/arm-linux-gnueabihf-ld && ln -s /host/usr/bin/arm-linux-gnueabihf-ld /usr/bin/arm-linux-gnueabihf-ld &&
262+ rm -f /usr/bin/arm-linux-gnueabihf-ld.bfd && ln -s /host/usr/bin/arm-linux-gnueabihf-ld.bfd /usr/bin/arm-linux-gnueabihf-ld.bfd
263+ "
264+ docker commit the_container the_container
265+ - name : Build
266+ run : |
267+ sudo docker run --name the_build --interactive -v $(pwd):/numpy -v /:/host the_container /bin/bash -c "
268+ uname -a &&
269+ gcc --version &&
270+ g++ --version &&
271+ python3 --version &&
272+ cd /numpy && python3 setup.py install
273+ "
274+ docker commit the_build the_build
275+ - name : Run SIMD Tests
276+ run : |
277+ docker run --rm --interactive -v $(pwd):/numpy the_build /bin/bash -c "
278+ cd /numpy && python3 runtests.py -n -v -- -k test_simd
279+ "
280+
281+ sde_simd_avx512_test :
282+ # Intel Software Development Emulator (SDE) is used to run a given program
283+ # on a specific instruction set architecture and capture various performance details.
284+ # see https://www.intel.com/content/www/us/en/developer/articles/tool/software-development-emulator.html
285+ needs : [smoke_test]
286+ runs-on : ubuntu-latest
287+ steps :
288+ - uses : actions/checkout@v2
289+ with :
290+ submodules : recursive
291+ fetch-depth : 0
292+ - uses : actions/setup-python@v2
293+ with :
294+ python-version : ${{ env.PYTHON_VERSION }}
295+ - name : Install Intel SDE
296+ run : |
297+ curl -o /tmp/sde.tar.bz2 https://www.intel.com/content/dam/develop/external/us/en/documents/downloads/sde-external-8.69.1-2021-07-18-lin.tar.bz2
298+ mkdir /tmp/sde && tar -xvf /tmp/sde.tar.bz2 -C /tmp/sde/
299+ sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde
300+ - name : Install dependencies
301+ run : python -m pip install -r test_requirements.txt
302+ - name : Build
303+ run : python setup.py build
304+ --simd-test="\$werror AVX512F AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL"
305+ install
306+ # KNM implies KNL
307+ - name : Run SIMD tests (Xeon PHI)
308+ run : sde -knm -- python runtests.py -n -v -- -k test_simd
309+ # ICL implies SKX, CLX and CNL
310+ - name : Run SIMD tests (Ice Lake)
311+ run : sde -icl -- python runtests.py -n -v -- -k test_simd
0 commit comments