Skip to content

Commit 548a11b

Browse files
committed
[WIP,Testing]: Add test for mips64
1 parent 47120f2 commit 548a11b

1 file changed

Lines changed: 114 additions & 0 deletions

File tree

.github/workflows/mips64.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: mips64 qemu test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
TEST:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
include:
12+
- target: MIPS64_GENERIC
13+
triple: mips64el-linux-gnuabi64
14+
opts: NO_SHARED=1 TARGET=MIPS64_GENERIC
15+
- target: SICORTEX
16+
triple: mips64el-linux-gnuabi64
17+
opts: NO_SHARED=1 TARGET=SICORTEX
18+
- target: I6400
19+
triple: mipsisa64r6el-linux-gnuabi64
20+
opts: NO_SHARED=1 TARGET=I6400
21+
- target: P6600
22+
triple: mipsisa64r6el-linux-gnuabi64
23+
opts: NO_SHARED=1 TARGET=P6600
24+
- target: I6500
25+
triple: mipsisa64r6el-linux-gnuabi64
26+
opts: NO_SHARED=1 TARGET=I6500
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
- name: install build deps
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache \
36+
gcc-${{ matrix.triple }} gfortran-${{ matrix.triple }} libgomp1-mips64el-cross
37+
38+
- name: checkout qemu
39+
uses: actions/checkout@v3
40+
with:
41+
repository: qemu/qemu
42+
path: qemu
43+
ref: 79dfa177ae348bb5ab5f97c0915359b13d6186e2
44+
45+
- name: build qemu
46+
run: |
47+
cd qemu
48+
./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=mips64el-linux-user --disable-system
49+
make -j$(nproc)
50+
make install
51+
52+
- name: Compilation cache
53+
uses: actions/cache@v3
54+
with:
55+
path: ~/.ccache
56+
key: ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
57+
restore-keys: |
58+
ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}
59+
ccache-${{ runner.os }}-${{ matrix.target }}
60+
61+
- name: Configure ccache
62+
run: |
63+
test -d ~/.ccache || mkdir -p ~/.ccache
64+
echo "max_size = 300M" > ~/.ccache/ccache.conf
65+
echo "compression = true" >> ~/.ccache/ccache.conf
66+
ccache -s
67+
68+
- name: build OpenBLAS
69+
run: make CC='ccache ${{ matrix.triple }}-gcc -static' FC='ccache ${{ matrix.triple }}-gfortran -static' ${{ matrix.opts }} HOSTCC='ccache gcc' -j$(nproc)
70+
71+
- name: test
72+
run: |
73+
export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
74+
qemu-mips64el ./utest/openblas_utest
75+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xscblat1
76+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xdcblat1
77+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xccblat1
78+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xzcblat1
79+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xscblat2 < ./ctest/sin2
80+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xdcblat2 < ./ctest/din2
81+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xccblat2 < ./ctest/cin2
82+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xzcblat2 < ./ctest/zin2
83+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xscblat3 < ./ctest/sin3
84+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xdcblat3 < ./ctest/din3
85+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xccblat3 < ./ctest/cin3
86+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xzcblat3 < ./ctest/zin3
87+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/sblat1
88+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/dblat1
89+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/cblat1
90+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/zblat1
91+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/sblat1
92+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/dblat1
93+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/cblat1
94+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/zblat1
95+
rm -f ./test/?BLAT2.SUMM
96+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/sblat2 < ./test/sblat2.dat
97+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/dblat2 < ./test/dblat2.dat
98+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/cblat2 < ./test/cblat2.dat
99+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/zblat2 < ./test/zblat2.dat
100+
rm -f ./test/?BLAT2.SUMM
101+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/sblat2 < ./test/sblat2.dat
102+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/dblat2 < ./test/dblat2.dat
103+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/cblat2 < ./test/cblat2.dat
104+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/zblat2 < ./test/zblat2.dat
105+
rm -f ./test/?BLAT3.SUMM
106+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/sblat3 < ./test/sblat3.dat
107+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/dblat3 < ./test/dblat3.dat
108+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/cblat3 < ./test/cblat3.dat
109+
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-mips64el ./test/zblat3 < ./test/zblat3.dat
110+
rm -f ./test/?BLAT3.SUMM
111+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/sblat3 < ./test/sblat3.dat
112+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/dblat3 < ./test/dblat3.dat
113+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/cblat3 < ./test/cblat3.dat
114+
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./test/zblat3 < ./test/zblat3.dat

0 commit comments

Comments
 (0)