Merge pull request #5970 from hugomeiland/cortexa72-dgemm-6x8 #3615
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: loongarch64 qemu test | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**/*.md' | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**/*.md' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| TEST: | |
| if: "github.repository == 'OpenMathLib/OpenBLAS'" | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: LOONGSONGENERIC | |
| triple: loongarch64-linux-gnu | |
| opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC | |
| - target: LOONGSON3R5 | |
| triple: loongarch64-linux-gnu | |
| opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5 | |
| - target: LOONGSON2K1000 | |
| triple: loongarch64-linux-gnu | |
| opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000 | |
| - target: LA64_GENERIC | |
| triple: loongarch64-linux-gnu | |
| opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC | |
| - target: LA464 | |
| triple: loongarch64-linux-gnu | |
| opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464 | |
| - target: LA264 | |
| triple: loongarch64-linux-gnu | |
| opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264 | |
| - target: DYNAMIC_ARCH | |
| triple: loongarch64-linux-gnu | |
| opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install APT deps | |
| run: | | |
| sudo apt-get update && \ | |
| sudo apt-get install autoconf automake autotools-dev ninja-build make ccache \ | |
| gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu gfortran-14-loongarch64-linux-gnu | |
| - name: Compilation cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.ccache | |
| key: ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}-${{ github.sha }} | |
| restore-keys: | | |
| ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }} | |
| ccache-${{ runner.os }}-${{ matrix.target }} | |
| - name: Configure ccache | |
| run: | | |
| test -d ~/.ccache || mkdir -p ~/.ccache | |
| echo "max_size = 300M" > ~/.ccache/ccache.conf | |
| echo "compression = true" >> ~/.ccache/ccache.conf | |
| ccache -s | |
| - name: Install QEMU 10.2.1 | |
| run: | | |
| qemu_deb="${RUNNER_TEMP}/qemu-user_10.2.1+ds-1ubuntu3_amd64.deb" | |
| qemu_root="${RUNNER_TEMP}/qemu-user-10.2.1" | |
| wget --output-document="${qemu_deb}" \ | |
| https://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user_10.2.1+ds-1ubuntu3_amd64.deb | |
| echo "e6bdaac070232a44b8657cad84ac0853d84b7167b55af82370af040291f55bd8 ${qemu_deb}" \ | |
| | sha256sum --check - | |
| dpkg-deb --extract "${qemu_deb}" "${qemu_root}" | |
| sudo install -m 0755 "${qemu_root}/usr/bin/qemu-loongarch64" \ | |
| /usr/local/bin/qemu-loongarch64-static | |
| qemu-loongarch64-static --version | |
| - name: Disable utest dsdot:dsdot_n_1 | |
| run: | | |
| echo -n > utest/test_dsdot.c | |
| echo "Due to the current version of qemu causing utest cases to fail," | |
| echo "the utest dsdot:dsdot_n_1 have been temporarily disabled." | |
| - name: Build OpenBLAS | |
| run: | | |
| make CC='ccache ${{ matrix.triple }}-gcc-14 -static' FC='ccache ${{ matrix.triple }}-gfortran-14 -static' \ | |
| RANLIB='ccache ${{ matrix.triple }}-gcc-ranlib-14' ${{ matrix.opts }} HOSTCC='ccache gcc' -j$(nproc) | |
| - name: Test | |
| run: | | |
| qemu-loongarch64-static ./utest/openblas_utest | |
| qemu-loongarch64-static ./utest/openblas_utest_ext | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat1 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat1 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat1 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat1 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat2 < ./ctest/sin2 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat2 < ./ctest/din2 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat2 < ./ctest/cin2 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat2 < ./ctest/zin2 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat3 < ./ctest/sin3 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat3 < ./ctest/din3 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat3 < ./ctest/cin3 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat3 < ./ctest/zin3 | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat1 | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat1 | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat1 | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat1 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat1 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat1 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat1 | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat1 | |
| rm -f ./test/?BLAT2.SUMM | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat2 < ./test/sblat2.dat | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat2 < ./test/dblat2.dat | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat2 < ./test/cblat2.dat | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat2 < ./test/zblat2.dat | |
| rm -f ./test/?BLAT2.SUMM | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat2 < ./test/sblat2.dat | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat2 < ./test/dblat2.dat | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat2 < ./test/cblat2.dat | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat2 < ./test/zblat2.dat | |
| rm -f ./test/?BLAT3.SUMM | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat3 < ./test/sblat3.dat | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat3 < ./test/dblat3.dat | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat3 < ./test/cblat3.dat | |
| OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat3 < ./test/zblat3.dat | |
| rm -f ./test/?BLAT3.SUMM | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat3 < ./test/sblat3.dat | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat3 < ./test/dblat3.dat | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat3 < ./test/cblat3.dat | |
| OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat3 < ./test/zblat3.dat |