@@ -33,17 +33,29 @@ jobs:
33
33
34
34
- name : Install APT deps
35
35
run : |
36
- sudo add-apt-repository ppa:savoury1/virtualisation
37
36
sudo apt-get update
38
- sudo apt-get install autoconf automake autotools-dev ninja-build make ccache \
39
- qemu-user-static
37
+ sudo apt-get install autoconf automake autotools-dev ninja-build make ccache
40
38
41
39
- name : Download and install loongarch64-toolchain
42
40
run : |
43
41
wget https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/download/8.1/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz
44
42
#wget https://github.com/loongson/build-tools/releases/download/2023.08.08/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz
45
43
tar -xf CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz -C /opt
46
44
45
+ - name : Checkout qemu
46
+ uses : actions/checkout@v3
47
+ with :
48
+ repository : qemu/qemu
49
+ path : qemu
50
+ ref : master
51
+
52
+ - name : Install qemu
53
+ run : |
54
+ cd qemu
55
+ ./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=loongarch64-linux-user --disable-system --static
56
+ make -j$(nproc)
57
+ make install
58
+
47
59
- name : Set env
48
60
run : |
49
61
echo "LD_LIBRARY_PATH=/opt/cross-tools/target/usr/lib64:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
@@ -76,45 +88,46 @@ jobs:
76
88
77
89
- name : Test
78
90
run : |
79
- qemu-loongarch64-static ./utest/openblas_utest
80
- qemu-loongarch64-static ./utest/openblas_utest_ext
81
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat1
82
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat1
83
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat1
84
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat1
85
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat2 < ./ctest/sin2
86
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat2 < ./ctest/din2
87
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat2 < ./ctest/cin2
88
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat2 < ./ctest/zin2
89
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat3 < ./ctest/sin3
90
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat3 < ./ctest/din3
91
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat3 < ./ctest/cin3
92
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat3 < ./ctest/zin3
93
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat1
94
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat1
95
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat1
96
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat1
97
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat1
98
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat1
99
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat1
100
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat1
91
+ export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
92
+ qemu-loongarch64 ./utest/openblas_utest
93
+ qemu-loongarch64 ./utest/openblas_utest_ext
94
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat1
95
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat1
96
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat1
97
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat1
98
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat2 < ./ctest/sin2
99
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat2 < ./ctest/din2
100
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat2 < ./ctest/cin2
101
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat2 < ./ctest/zin2
102
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat3 < ./ctest/sin3
103
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat3 < ./ctest/din3
104
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat3 < ./ctest/cin3
105
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat3 < ./ctest/zin3
106
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat1
107
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat1
108
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat1
109
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat1
110
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat1
111
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat1
112
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat1
113
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat1
101
114
rm -f ./test/?BLAT2.SUMM
102
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat2 < ./test/sblat2.dat
103
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat2 < ./test/dblat2.dat
104
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat2 < ./test/cblat2.dat
105
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat2 < ./test/zblat2.dat
115
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat2 < ./test/sblat2.dat
116
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat2 < ./test/dblat2.dat
117
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat2 < ./test/cblat2.dat
118
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat2 < ./test/zblat2.dat
106
119
rm -f ./test/?BLAT2.SUMM
107
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat2 < ./test/sblat2.dat
108
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat2 < ./test/dblat2.dat
109
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat2 < ./test/cblat2.dat
110
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat2 < ./test/zblat2.dat
120
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat2 < ./test/sblat2.dat
121
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat2 < ./test/dblat2.dat
122
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat2 < ./test/cblat2.dat
123
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat2 < ./test/zblat2.dat
111
124
rm -f ./test/?BLAT3.SUMM
112
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat3 < ./test/sblat3.dat
113
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat3 < ./test/dblat3.dat
114
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat3 < ./test/cblat3.dat
115
- OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat3 < ./test/zblat3.dat
125
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat3 < ./test/sblat3.dat
126
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat3 < ./test/dblat3.dat
127
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat3 < ./test/cblat3.dat
128
+ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat3 < ./test/zblat3.dat
116
129
rm -f ./test/?BLAT3.SUMM
117
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat3 < ./test/sblat3.dat
118
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat3 < ./test/dblat3.dat
119
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat3 < ./test/cblat3.dat
120
- OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat3 < ./test/zblat3.dat
130
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat3 < ./test/sblat3.dat
131
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat3 < ./test/dblat3.dat
132
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat3 < ./test/cblat3.dat
133
+ OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat3 < ./test/zblat3.dat
0 commit comments