Skip to content

Commit 74579ad

Browse files
authored
Merge branch 'OpenMathLib:develop' into lapack1455
2 parents 5f58951 + 8f8a45e commit 74579ad

32 files changed

Lines changed: 935 additions & 763 deletions

‎.github/workflows/loongarch64_clang.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
jobs:
1818
TEST:
1919
if: "github.repository == 'OpenMathLib/OpenBLAS'"
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-24.04
2121
strategy:
2222
fail-fast: false
2323
matrix:
@@ -49,7 +49,7 @@ jobs:
4949
- name: Install APT deps
5050
run: |
5151
sudo apt-get update
52-
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache libglib2.0-dev
52+
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache libglib2.0-dev libxml2
5353
5454
- name: Download and install loongarch64-toolchain
5555
run: |

‎.github/workflows/mips64.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020
jobs:
2121
TEST:
2222
if: "github.repository == 'OpenMathLib/OpenBLAS'"
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
2424
strategy:
2525
fail-fast: false
2626
matrix:

‎.github/workflows/riscv64_vector.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ jobs:
4848
run: |
4949
sudo apt-get update
5050
sudo apt-get install autoconf automake autotools-dev ninja-build make \
51-
libgomp1-riscv64-cross ccache qemu-kvm qemu-user libc6-riscv64-cross
51+
libgomp1-riscv64-cross ccache qemu-system-x86 qemu-utils libvirt-daemon-system \
52+
libvirt-clients bridge-utils virt-manager qemu-user libc6-riscv64-cross
5253
wget ${riscv_gnu_toolchain}/${riscv_gnu_toolchain_nightly_download_path}
5354
tar -xvf $(basename ${riscv_gnu_toolchain_nightly_download_path}) -C /opt
5455
wget https://gist.github.com/martin-frbg/bb630e0de34978e578eeb496b1538d4e/raw/7fd8d971f327f7a517b8f5f7989479ff2b36f71f/qemu-riscv64-10.1-ubuntu24 -P /opt/riscv/bin -o riscv64-qemu

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ endif
406406

407407
lapack-test :
408408
(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out)
409-
$(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING/EIG xeigtstc xeigtstd xeigtsts xeigtstz test_cgges3_scaling test_sgges3_scaling test_dgges3_scaling test_zgges3_scaling
409+
$(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING/EIG xeigtstc xeigtstd xeigtsts xeigtstz test_cgges3_scaling test_sgges3_scaling test_dgges3_scaling test_zgges3_scaling test_cgesvj_emptsw test_dgesvj_emptsw test_sgesvj_emptsw test_zgesvj_emptsw
410410

411411
$(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING/LIN xlintstc xlintstd xlintstds xlintstrfd xlintstrfz xlintsts xlintstz xlintstzc xlintstrfs xlintstrfc
412412

‎azure-pipelines.yml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,25 @@ jobs:
6464
# at the time of writing the available Azure Ubuntu vm image
6565
# does not support AVX512VL, so use more recent LTS version
6666
echo "FROM ubuntu:bionic
67+
ENV INTEL_SDE_URL=""
6768
COPY . /tmp/openblas
6869
RUN apt-get -y update && apt-get -y install \\
6970
cmake \\
7071
gfortran \\
7172
make \\
73+
xz-utils \\
7274
wget
7375
RUN mkdir /tmp/SDE && cd /tmp/SDE && \\
74-
mkdir sde-external-8.35.0-2019-03-11-lin && \\
75-
wget --quiet -O sde-external-8.35.0-2019-03-11-lin.tar.bz2 https://www.dropbox.com/s/fopsnzj67572sj5/sde-external-8.35.0-2019-03-11-lin.tar.bz2?dl=0 && \\
76-
tar -xjvf sde-external-8.35.0-2019-03-11-lin.tar.bz2 -C /tmp/SDE/sde-external-8.35.0-2019-03-11-lin --strip-components=1
76+
INTEL_SDE_URL=$(curl -s https://www.intel.com/content/www/us/en/download/684897/intel-software-development-emulator.html | grep -Po 'https://downloadmirror.intel.com/.*lin.tar.xz(?=")') && \
77+
mkdir sde-external && \\
78+
wget --quiet -O sde-external-lin.tar.xz $(curl -s https://www.intel.com/content/www/us/en/download/684897/intel-software-development-emulator.html | grep -Po 'https://downloadmirror.intel.com/.*lin.tar.xz(?=")') && \\
79+
tar -xJvf sde-external-lin.tar.xz -C /tmp/SDE/sde-external --strip-components=1
7780
RUN cd /tmp/openblas && CC=gcc make QUIET_MAKE=1 DYNAMIC_ARCH=1 NUM_THREADS=32 BINARY=64
78-
CMD cd /tmp/openblas && echo 0 > /proc/sys/kernel/yama/ptrace_scope && CC=gcc OPENBLAS_VERBOSE=2 /tmp/SDE/sde-external-8.35.0-2019-03-11-lin/sde64 -cpuid_in /tmp/SDE/sde-external-8.35.0-2019-03-11-lin/misc/cpuid/skx/cpuid.def -- make -C utest DYNAMIC_ARCH=1 NUM_THREADS=32 BINARY=64" > Dockerfile
81+
CMD cd /tmp/openblas && echo 0 > /proc/sys/kernel/yama/ptrace_scope && CC=gcc OPENBLAS_VERBOSE=2 /tmp/SDE/sde-external/sde64 -cpuid_in /tmp/SDE/sde-external/misc/cpuid/gnr/cpuid.def -- make -C utest DYNAMIC_ARCH=1 NUM_THREADS=32 BINARY=64" > Dockerfile
7982
docker build -t intel_sde .
8083
# we need a privileged docker run for sde process attachment
8184
docker run --privileged intel_sde
82-
displayName: 'Run AVX512 SkylakeX docker build / test'
85+
displayName: 'Run AVX512 GraniteRapids docker build / test'
8386
8487
- job: Windows_cl
8588
pool:

‎docs/developers.md‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,38 @@
66
OpenBLAS/
77
├── benchmark Benchmark codes for BLAS
88
├── cmake CMakefiles
9-
├── ctest Test codes for CBLAS interfaces
10-
├── driver Implemented in C
11-
│   ├── level2
12-
│   ├── level3
9+
├── ctest Test codes for CBLAS interfaces, implemented in C (copied from the Reference BLAS)
10+
├── driver
11+
│   ├── level2 Driver functions that handle copying, rearranging or rescaling data as well
12+
│   ├── level3 as splitting workloads across multiple threads
1313
│   ├── mapper
1414
│   └── others Memory management, threading, etc
1515
├── exports Generate shared library
1616
├── interface Implement BLAS and CBLAS interfaces (calling driver or kernel)
1717
│   ├── lapack
1818
│   └── netlib
19-
├── kernel Optimized assembly kernels for CPU architectures
19+
├── kernel Optimized assembly (or C intrinsics) kernels for CPU architectures
2020
│   ├── alpha Original GotoBLAS kernels for DEC Alpha
2121
│   ├── arm ARMV5,V6,V7 kernels (including generic C codes used by other architectures)
22-
│   ├── arm64 ARMV8
22+
│   ├── arm64 ARMV8, V9
2323
│   ├── generic General kernel codes written in plain C, parts used by many architectures.
2424
│   ├── ia64 Original GotoBLAS kernels for Intel Itanium
25+
│   ├── loongarch64
2526
│ ├── mips
2627
│   ├── mips64
2728
│   ├── power
2829
| ├── riscv64
2930
| ├── simd Common code for Universal Intrinsics, used by some x86_64 and arm64 kernels
3031
│   ├── sparc
32+
│   ├── wasm
3133
│   ├── x86
3234
│ ├── x86_64
3335
│   └── zarch
3436
├── lapack Optimized LAPACK codes (replacing those in regular LAPACK)
3537
│   ├── getf2
3638
│   ├── getrf
3739
│   ├── getrs
40+
| ├── laed3
3841
│   ├── laswp
3942
│   ├── lauu2
4043
│   ├── lauum
@@ -46,8 +49,9 @@ OpenBLAS/
4649
├── lapack-netlib LAPACK codes from netlib reference implementation
4750
├── reference BLAS Fortran reference implementation (unused)
4851
├── relapack Elmar Peise's recursive LAPACK (implemented on top of regular LAPACK)
49-
├── test Test codes for BLAS
52+
├── test Test codes for BLAS, copied from the Reference BLAS
5053
└── utest Regression test
54+
└── utest_ext Tests for the BLAS Extensions not covered by the other tests
5155
5256
```
5357

@@ -149,6 +153,8 @@ in a number of places. For example:
149153
* [MatlabJuliaMatrixOperationsBenchmark](https://github.com/RoyiAvital/MatlabJuliaMatrixOperationsBenchmark)
150154
(various matrix operations in Julia and Matlab)
151155
* [mmperf/mmperf](https://github.com/mmperf/mmperf/) (single-core matrix multiplication)
156+
* [BLAS Microbenchmark](https://github.com/MathieuCAISSA/blas-microbenchmark) Suite covering all BLAS routines in all standard precisions,
157+
capable of comparing all BLAS implementations supported by FlexiBLAS, including relative performance graphs
152158

153159

154160
## Adding autodetection support for a new revision or variant of a supported CPU

‎interface/gemm_batch_strided.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,18 +416,18 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE transa, enum CBLAS_TRANS
416416

417417
#if defined(CBLAS)
418418
if (order == CblasColMajor) {
419-
args_array[i].a=&(a[i*stridea]);
420-
args_array[i].b=&(b[i*strideb]);
419+
args_array[i].a=&(a[i*stridea*COMPSIZE]);
420+
args_array[i].b=&(b[i*strideb*COMPSIZE]);
421421
}else if(order == CblasRowMajor){
422-
args_array[i].a=&(b[i*strideb]);
423-
args_array[i].b=&(a[i*stridea]);
422+
args_array[i].a=&(b[i*strideb*COMPSIZE]);
423+
args_array[i].b=&(a[i*stridea*COMPSIZE]);
424424
}
425425
#else
426-
args_array[i].a=&(a[i*stridea]);
427-
args_array[i].b=&(b[i*strideb]);
426+
args_array[i].a=&(a[i*stridea*COMPSIZE]);
427+
args_array[i].b=&(b[i*strideb*COMPSIZE]);
428428
#endif
429429

430-
args_array[i].c= &c[i*stridec];
430+
args_array[i].c= &c[i*stridec*COMPSIZE];
431431

432432
args_array[i].routine_mode=group_mode;
433433
args_array[i].routine=group_routine;

‎kernel/setparam-ref.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2132,7 +2132,7 @@ static void init_parameter(void) {
21322132
cpuid(0, &eax, &ebx, &ecx, &edx);
21332133

21342134
if ((ebx == 0x68747541) && (l3_kb > 0) && (l3_kb % 32768 == 0) && (l2_kb == 1024)) { //Auth AMD
2135-
if (strcmp(gotoblas_corename(), "cooperlake") == 0 || strcmp(gotoblas_corename(), "skylakex") == 0 || strcmp(gotoblas_corename(), "sapphirerapids") == 0) {
2135+
if (strcmp(gotoblas_corename(), "Cooperlake") == 0 || strcmp(gotoblas_corename(), "SkylakeX") == 0 || strcmp(gotoblas_corename(), "SapphireRapids") == 0) {
21362136

21372137
cpuid(7, &cpuid7_eax, &cpuid7_ebx, &cpuid7_ecx, &cpuid7_edx);
21382138

‎lapack-netlib/SRC/cgesvj.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ f"> */
10871087

10881088
/* Row-cyclic Jacobi SVD algorithm with column pivoting */
10891089

1090-
emptsw = *n * (*n - 1) / 2;
1090+
emptsw = (*n / 2) * (*n - 1 + *n % 2);
10911091
notrot = 0;
10921092
i__1 = *n;
10931093
for (q = 1; q <= i__1; ++q) {

‎lapack-netlib/SRC/cgesvj.f‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ SUBROUTINE CGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
714714
*
715715
* Row-cyclic Jacobi SVD algorithm with column pivoting
716716
*
717-
EMPTSW = ( N*( N-1 ) ) / 2
717+
EMPTSW = ( N / 2 )*( N-1 + MOD( N, 2 ) )
718718
NOTROT = 0
719719

720720
DO 1868 q = 1, N

0 commit comments

Comments
 (0)