Skip to content

Commit 45bec97

Browse files
committed
Merge branch 'master' of github.com:simd-everywhere/simde into neon_simplify_high
2 parents 7c38a69 + 62b9f2a commit 45bec97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1558
-166
lines changed

.github/workflows/ci.yml

Lines changed: 145 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
x86:
8888
runs-on: ubuntu-22.04
8989
strategy:
90+
fail-fast: false
9091
matrix:
9192
isax:
9293
- -mavx512bw -mavx512vl -mavx512cd -mavx512dq -mavx512vbmi -mavx512ifma -mavx512vpopcntdq -mavx512bitalg -mavx512vnni -mvpclmulqdq
@@ -105,9 +106,16 @@ jobs:
105106
- -mavx
106107
- -mfma
107108
- -mavx2
109+
include:
110+
- target: tgl
111+
- isax: -mavx512bw -mavx512vl -mavx512cd -mavx512dq -mavx512vbmi -mavx512ifma -mavx512vpopcntdq -mavx512bitalg -mavx512vnni -mvpclmulqdq -mavx512fp16
112+
target: spr
108113
env:
109114
CFLAGS: -Wall -Wextra -Werror ${{ matrix.isax }}
110115
CXXFLAGS: -Wall -Wextra -Werror ${{ matrix.isax }}
116+
CC: gcc-12
117+
CXX: g++-12
118+
INTEL_TARGET: ${{ matrix.target }}
111119
steps:
112120
- uses: actions/checkout@v3
113121
with:
@@ -121,10 +129,13 @@ jobs:
121129
key: ${{ github.job }}-${{ matrix.isax }}
122130
- name: Install APT Dependencies
123131
run: |
124-
sudo apt-get install -y ninja-build ninja-build python3-pip parallel gcovr
132+
sudo apt-get install -y ninja-build ninja-build python3-pip parallel gcovr g++-12 gcc-12
125133
sudo python3 -m pip install meson==0.55.0
134+
- name: add ccache to the build path
135+
run: |
136+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
126137
- name: Configure
127-
run: meson setup build -Db_coverage=true
138+
run: meson setup build -Db_coverage=true || (cat build/meson-logs/meson-log.txt ; false)
128139
- name: Build
129140
run: ninja -C build -v
130141
- name: Test
@@ -238,6 +249,7 @@ jobs:
238249

239250
gcc:
240251
strategy:
252+
fail-fast: false
241253
matrix:
242254
include:
243255
# - version: 4.7
@@ -308,6 +320,9 @@ jobs:
308320
sudo apt-get update
309321
sudo apt-get -yq install gcovr python3-pip ninja-build parallel "${CC}" "${CXX}"
310322
sudo python3 -m pip install meson==0.55.0
323+
- name: add ccache to the build path
324+
run: |
325+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
311326
- name: Configure
312327
run: meson setup build
313328
- name: Build
@@ -317,8 +332,21 @@ jobs:
317332

318333
gcc-qemu:
319334
strategy:
335+
fail-fast: false
320336
matrix:
321337
include:
338+
- version: 12
339+
cross: armel
340+
arch_gnu_abi: eabi
341+
arch_deb: armel
342+
arch_gnu: arm
343+
distro: ubuntu-22.04
344+
- version: 12
345+
cross: armv7
346+
arch_gnu: arm
347+
arch_gnu_abi: eabihf
348+
arch_deb: armhf
349+
distro: ubuntu-22.04
322350
- version: 12
323351
cross: aarch64
324352
arch_gnu: aarch64
@@ -352,8 +380,8 @@ jobs:
352380
sudo add-apt-repository ppa:savoury1/virtualisation
353381
sudo apt-get update -y
354382
sudo apt-get -yq install ninja-build parallel \
355-
gcc-${{ matrix.version }}-${{ matrix.arch_gnu }}-linux-gnu \
356-
g++-${{ matrix.version }}-${{ matrix.arch_gnu }}-linux-gnu binfmt-support \
383+
gcc-${{ matrix.version }}-${{ matrix.arch_gnu }}-linux-gnu${{ matrix.arch_gnu_abi }} \
384+
g++-${{ matrix.version }}-${{ matrix.arch_gnu }}-linux-gnu${{ matrix.arch_gnu_abi }} binfmt-support \
357385
qemu-user-static python3-pip libc6-${{ matrix.arch_deb }}-cross libstdc++-${{ matrix.version }}-dev-${{ matrix.arch_deb }}-cross
358386
sudo python3 -m pip install meson==0.55.0
359387
- name: ccache
@@ -370,31 +398,84 @@ jobs:
370398
- name: Test
371399
run: meson test -C build --print-errorlogs --print-errorlogs $(meson test -C build --list | grep -v emul)
372400

401+
clang-qemu:
402+
strategy:
403+
matrix:
404+
include:
405+
- version: 15
406+
cross: armv7
407+
arch_deb: armhf
408+
arch_gnu_abi: eabihf
409+
arch_gnu: arm
410+
distro: ubuntu-22.04
411+
- version: 15
412+
cross: aarch64
413+
arch_gnu: aarch64
414+
arch_deb: arm64
415+
distro: ubuntu-22.04
416+
- version: 15
417+
cross: armel
418+
arch_gnu_abi: eabi
419+
arch_deb: armel
420+
arch_gnu: arm
421+
distro: ubuntu-22.04
422+
# - version: 15
423+
# cross: armel
424+
# arch_gnu_abi: eabi
425+
# arch_deb: armel
426+
# arch_gnu: arm
427+
# distro: ubuntu-22.04
428+
# - version: 15
429+
# cross: riscv64
430+
# arch_gnu: riscv64
431+
# arch_deb: riscv64
432+
# distro: ubuntu-22.04
433+
# - version: 15
434+
# cross: s390x
435+
# arch_gnu: s390x
436+
# arch_deb: s390x
437+
# distro: ubuntu-22.04
438+
- version: 15
439+
cross: ppc64el
440+
arch_deb: ppc64el
441+
arch_gnu: powerpc64le
442+
distro: ubuntu-22.04
443+
runs-on: ${{ matrix.distro }}
444+
steps:
445+
- uses: actions/checkout@v3
446+
with:
447+
submodules: recursive
448+
- run: sudo apt-get update
449+
- name: CPU Information
450+
run: cat /proc/cpuinfo
451+
- name: Install APT Dependencies
452+
run: |
453+
sudo add-apt-repository ppa:savoury1/virtualisation
454+
sudo apt-get update -y
455+
sudo apt-get -yq install ninja-build parallel \
456+
binfmt-support clang-${{ matrix.version }} clang++-${{ matrix.version }} \
457+
qemu-user-static python3-pip libc6-${{ matrix.arch_deb }}-cross libstdc++-12-dev-${{ matrix.arch_deb }}-cross \
458+
binutils-${{ matrix.arch_gnu }}-linux-gnu${{ matrix.arch_gnu_abi }}
459+
sudo python3 -m pip install meson==0.55.0
460+
- name: ccache
461+
uses: hendrikmuhs/ccache-action@v1.2
462+
with:
463+
key: ${{ github.job }}-${{ matrix.distro }}-${{ matrix.cross }}
464+
- name: add ccache to the build path
465+
run: |
466+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
467+
- name: Configure
468+
run: meson setup --cross-file=docker/cross-files/${{ matrix.cross }}-clang-${{ matrix.version }}-ccache.cross build
469+
- name: Build
470+
run: ninja -C build -v
471+
- name: Test
472+
run: meson test -C build --print-errorlogs --print-errorlogs $(meson test -C build --list | grep -v emul)
473+
373474
clang:
374475
strategy:
476+
fail-fast: false
375477
matrix:
376478
include:
377-
# - version: "3.5"
378-
# distro: ubuntu-16.04
379-
# arch_flags: -mavx2
380-
# - version: "3.6"
381-
# distro: ubuntu-16.04
382-
# arch_flags: -mavx2
383-
# - version: "3.7"
384-
# distro: ubuntu-16.04
385-
# arch_flags: -mavx2
386-
# - version: "3.8"
387-
# distro: ubuntu-16.04
388-
# arch_flags: -mavx2
389-
#- version: "3.9"
390-
# distro: ubuntu-18.04
391-
# arch_flags: -mavx2
392-
# - version: "4.0"
393-
# distro: ubuntu-18.04
394-
# arch_flags: -mavx2
395-
#- version: "5.0"
396-
# distro: ubuntu-18.04
397-
# arch_flags: -mavx2
398479
# - version: "6.0"
399480
# distro: ubuntu-20.04
400481
# arch_flags: -march=native
@@ -458,6 +539,10 @@ jobs:
458539
sudo apt-get update
459540
sudo apt-get -yq install gcovr ninja-build python3-pip clang-${{ matrix.version }}
460541
sudo python3 -m pip install meson==0.55.0
542+
- name: add ccache to the build path
543+
if: ${{ matrix.ccache == 'true' }}
544+
run: |
545+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
461546
- name: Configure
462547
run: meson setup build
463548
- name: Build
@@ -559,3 +644,38 @@ jobs:
559644
run: |
560645
meson --backend=ninja build --cross-file test/arm64cl.txt
561646
meson test -C build --print-errorlogs $(meson test -C build --list | grep -v emul)
647+
648+
linux-gcc-loongarch64:
649+
runs-on: ubuntu-22.04
650+
steps:
651+
- uses: actions/checkout@v3
652+
- name: CPU Information
653+
run: cat /proc/cpuinfo
654+
- name: Install APT Dependencies
655+
run: |
656+
sudo add-apt-repository ppa:savoury1/virtualisation
657+
sudo apt-get install -y ninja-build ninja-build meson qemu-user-static
658+
- name: Download and install loongarch64-toolchain
659+
run: |
660+
wget https://github.com/loongson/build-tools/releases/download/2022.09.06/loongarch64-clfs-7.3-cross-tools-gcc-glibc.tar.xz
661+
tar -xf loongarch64-clfs-7.3-cross-tools-gcc-glibc.tar.xz -C /opt
662+
- name: ccache
663+
uses: hendrikmuhs/ccache-action@v1.2
664+
with:
665+
key: ${{ github.job }}-loongarch64-gcc-13
666+
- name: set env
667+
run: |
668+
echo "LD_LIBRARY_PATH=/opt/cross-tools/target/usr/lib64:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
669+
echo "PATH=$GITHUB_WORKSPACE:/opt/cross-tools/bin:$PATH" >> $GITHUB_ENV
670+
- name: Disable SVML tests
671+
run: |
672+
sed -i "/svml/d" test/x86/meson.build
673+
rm test/x86/svml.c
674+
echo "Due to the qemu versions 7.2 through 8.0 causing timeouts in four sets of test cases,"
675+
echo "the SVML tests have been temporarily disabled."
676+
- name: Configure
677+
run: meson setup build --cross-file=docker/cross-files/loongarch64-gcc-13-ccache.cross
678+
- name: Build
679+
run: meson compile -C build -v
680+
- name: Test
681+
run: meson test -C build --print-errorlogs

docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM debian:${RELEASE}-slim
55

66
ARG DEBIAN_FRONTEND=noninteractive
77
ARG QEMU_GIT=n
8-
ARG ARCHS="arm64 armel armhf i386 mips64el ppc64el s390x"
8+
ARG ARCHS="arm64 armel armhf i386 mips64el ppc64el s390x riscv64"
99

1010
RUN \
1111
apt-get update -y && \
@@ -26,7 +26,7 @@ RUN \
2626
apt-get update -y && \
2727
apt-get upgrade -y && \
2828
apt-get install -yq --no-install-recommends \
29-
git build-essential \
29+
git build-essential vim \
3030
ccache cmake ninja-build \
3131
'^clang-[0-9\.]+$' \
3232
'^llvm-[0-9\.]+$' \
@@ -56,7 +56,7 @@ RUN \
5656
echo ${PACKAGES_TO_INSTALL} ; \
5757
apt-get install -yq ${PACKAGES_TO_INSTALL}
5858

59-
ENV PATH="/usr/lib/ccache:$PATH:/root/.local/bin"
59+
ENV PATH="/usr/lib/ccache:$PATH:/root/.local/bin:/root/.jsvu/bin"
6060

6161
# ICC
6262
RUN \

docker/Dockerfile.ubuntu

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Dockerfile for SIMDe development
2+
3+
FROM ubuntu:focal
4+
5+
ARG DEBIAN_FRONTEND=noninteractive
6+
ARG QEMU_GIT=n
7+
ARG ARCHS="arm64"
8+
#"arm64 armel armhf i386 mips64el ppc64el s390x riscv64"
9+
10+
COPY docker/bin /tmp/simde-bin
11+
RUN \
12+
for script in simde-reset-build.sh; do \
13+
ln -s /usr/local/src/simde/docker/bin/"${script}" /usr/bin/"${script}"; \
14+
done
15+
16+
# Common packages
17+
RUN \
18+
apt-get update -y && \
19+
apt-get upgrade -y && \
20+
apt-get install -yq --no-install-recommends \
21+
git build-essential vim \
22+
ccache cmake ninja-build \
23+
'^clang-[0-9\.]+$' \
24+
'^llvm-[0-9\.]+$' \
25+
'^g(cc|\+\+)-[0-9\.]+$' \
26+
gdb valgrind \
27+
binfmt-support qemu-user-static \
28+
creduce screen htop parallel nano rsync strace \
29+
npm libsleef-dev \
30+
pipx wget
31+
32+
# Meson on stable is too old, and we want to make sure we keep 0.55
33+
# working for a while.
34+
RUN pipx install meson==0.55.0
35+
36+
# GCC cross-compilers
37+
RUN \
38+
apt-get update -y && \
39+
apt-get upgrade -y && \
40+
apt-get install -y apt-file && \
41+
apt-file update
42+
RUN \
43+
PACKAGES_TO_INSTALL=""; \
44+
for ARCH in ${ARCHS}; do \
45+
PACKAGES_TO_INSTALL="${PACKAGES_TO_INSTALL} libc6-${ARCH}-cross libstdc++-[0-9]*-dev-${ARCH}-cross"; \
46+
PACKAGES_TO_INSTALL="${PACKAGES_TO_INSTALL} $(apt-file search -x "/usr/bin/$(/tmp/simde-bin/arch2gcc.sh ${ARCH})-(ar|g(cc|\+\+)-[0-9\.]+)" | awk -F: '{ print $1}')"; \
47+
done; \
48+
echo ${PACKAGES_TO_INSTALL} ; \
49+
apt-get install -yq ${PACKAGES_TO_INSTALL}
50+
51+
ENV PATH="/usr/lib/ccache:$PATH:/root/.local/bin:/root/.jsvu/bin"
52+
53+
# ICC
54+
RUN \
55+
apt-get update -y && \
56+
apt-get upgrade -y && \
57+
apt-get install -yq curl gpg && \
58+
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
59+
| gpg --dearmor > /usr/share/keyrings/oneapi-archive-keyring.gpg && \
60+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneAPI.list && \
61+
apt-get update && \
62+
apt-get install -yq --no-install-recommends intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-compiler-dpcpp-cpp && \
63+
for exe in icc icpc icx icpx; do \
64+
printf '#!/bin/bash\nARGS="$@"\nsource /opt/intel/oneapi/compiler/latest/env/vars.sh >/dev/null\n%s ${ARGS}\n' "${exe}" > /usr/bin/"${exe}" && \
65+
chmod 0755 /usr/bin/"${exe}" ; \
66+
done
67+
68+
# # xlc -- Install fails.
69+
# # Once IBM releases a version for Ubuntu Focal (20.04) I hope I can
70+
# # get this working.
71+
# RUN \
72+
# curl -s 'https://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ubuntu/public.gpg' | apt-key add - && \
73+
# echo "deb [arch=ppc64el] https://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ubuntu/ bionic main" > /etc/apt/sources.list.d/xlc.list && \
74+
# apt-get update && \
75+
# XLC_VERSION="$(apt-cache search '^xlc\.[0-9]+\.[0-9]+\.[0-9]+$' | awk '{ print substr($1, 5) }')" && \
76+
# apt-get install "xlc.${XLC_VERSION}:ppc64el" "xlc-license-community.${XLC_VERSION}:ppc64el" && \
77+
# /opt/ibm/xlC/${XLC_VERSION}/bin/xlc_configure <<< 1 >/dev/null
78+
79+
# Intel SDE
80+
COPY test/download-sde.sh /tmp/simde-bin/download-sde.sh
81+
RUN \
82+
"/tmp/simde-bin/download-sde.sh" "/opt/intel/sde" && \
83+
for executable in sde sde64; do \
84+
ln -s "/opt/intel/sde/${executable}" "/usr/bin/${executable}"; \
85+
done
86+
87+
# Emscripten
88+
RUN \
89+
git clone https://github.com/emscripten-core/emsdk.git /opt/emsdk && \
90+
cd /opt/emsdk && ./emsdk install tot && ./emsdk activate tot && \
91+
ln -s /opt/emsdk/upstream/bin/wasm-ld /usr/bin/wasm-ld && \
92+
npm install jsvu -g && jsvu --os=linux64 --engines=v8 && ln -s "/root/.jsvu/v8" "/usr/bin/v8"
93+
94+
# Meson cross files
95+
RUN \
96+
mkdir -p "/usr/local/share/meson/cross" && ln -s /usr/local/src/simde/docker/cross-files /usr/local/share/meson/cross/simde
97+
98+
# Install QEMU git (necessary for MIPS)
99+
RUN \
100+
if [ ${QEMU_GIT} = "y" ]; then \
101+
apt-get install -y pkg-config libglib2.0-dev libpixman-1-dev && \
102+
git clone https://gitlab.com/qemu-project/qemu.git /usr/local/src/qemu && \
103+
mkdir -p /usr/local/src/qemu/build && cd /usr/local/src/qemu/build && \
104+
../configure --prefix=/opt/qemu && \
105+
make -j$(nproc) && \
106+
make install; \
107+
rm -rf /usr/local/src/qemu; \
108+
fi
109+
110+
RUN mkdir -p /opt/simde
111+
WORKDIR /opt/simde
112+
ENV CCACHE_DIR=/opt/simde/.ccache CCACHE_COMPRESS=1

0 commit comments

Comments
 (0)