Compare commits

...
Author SHA1 Message Date
Martin Kroeker c59578f314 fix conditionals
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true, RISCV64_ZVL256B) (push) Canceled after 0s
2026-04-14 21:32:36 +02:00
Martin Kroeker d9786d387c fix missing eol 2026-04-14 10:56:04 +02:00
Martin Kroeker b9da7dbd24 Quote the respective SUMM file on failure in BLAS2/3 tests 2026-04-12 23:17:36 +02:00
Martin Kroeker 94e053ac10 Work around miscompilation of the AVX512 ?GEMM kernels by Windows LLVM 2026-04-11 19:27:31 +02:00
Martin Kroeker 646d0c9fee Merge pull request #5751 from chenx97/mips-dedup-c-impl
Remove redundant C implemetations from MIPS directories
2026-04-09 23:51:37 +02:00
Martin Kroeker 2c80f8c974 Merge pull request #5755 from martin-frbg/fixup5702
Fix partial merge of changes from PR #5702 (applying Reference-LAPACK PR 1203)
2026-04-09 16:35:13 +02:00
Martin Kroeker 0ea23484c6 Use ROUNDUP_LWORK and remove redundant conversions (Reference-LAPACK PR1203) 2026-04-09 14:54:55 +02:00
Martin Kroeker 1aea1d6237 Merge pull request #5753 from foxtran/fix/1203
Fix DROUNDUP_LWORK: patch was not fully copied
2026-04-09 14:08:23 +02:00
Henry Chen 6a5d2142f4 Fix dsdot precision for arm/dot.c 2026-04-09 18:11:47 +08:00
Igor S. Gerasimov f9f8e94a14 Fix DROUNDUP_LWORK: patch was not fully copied 2026-04-09 02:23:58 +02:00
Martin Kroeker 9a0f76a0a1 Merge pull request #5746 from chenx97/mips-fix-implicit-declaration
MIPS: fix implicit declarations found in the cpuinfo detector
2026-04-08 15:32:20 +02:00
Martin Kroeker 75a99605af Merge pull request #5744 from nakatamaho/fix/slamc3
lapack/laed3: fix MinGW build by matching LAMC3 prototype
2026-04-08 12:18:22 +02:00
Martin Kroeker 9d9fcc1881 Merge pull request #5752 from martin-frbg/fixup5748
Fix missing endif in openblas_config.h
2026-04-08 12:17:35 +02:00
Martin Kroeker e926bb0523 fix missing endif 2026-04-08 10:38:56 +02:00
Henry Chen e875a9cdd0 Remove redundant C implemetations from MIPS directories 2026-04-08 13:59:10 +08:00
Martin Kroeker fb45e7da89 CirrusCI: Fix ranlib confusion between xcode and AndroidNDK (#5749)
* Use ar and ranlib from Android NDK rather than xcode
2026-04-08 00:34:18 +02:00
Martin Kroeker e41cb1ad7a Merge pull request #5748 from martin-frbg/issue5747
Check that _Float16 is available before using it in openblas_config.h
2026-04-07 22:52:20 +02:00
Martin Kroeker dc32a8a90f Try to find out if _Float16 is available on the target before using it 2026-04-07 18:31:40 +02:00
Henry Chen a04ea2b2c4 MIPS: fix implicit declarations found in the cpuinfo detector 2026-04-07 15:59:50 +08:00
NAKATA Maho f272216ae3 lapack/laed3: fix MinGW build for slaed3
common_interface.h declares slamc3 as returning FLOATRET when
NEED_F2CCONV is enabled, but laed3_single.c and laed3_parallel.c
redeclared LAMC3 as returning FLOAT. This causes conflicting-type
errors in MinGW builds.

Use FLOATRET for the local LAMC3 prototype so it matches the shared
declaration. Also undefine the Windows max macro before the local
max definition in laed3_parallel.c to avoid macro redefinition
warnings.
2026-04-06 13:13:21 +09:00
Martin Kroeker 9b3cc7835b Merge pull request #5741 from martin-frbg/issue5696
Add note on using an x86 OpenBLAS in Windows on Arm via Prism
2026-04-02 11:38:16 +02:00
Martin Kroeker bef5f1c6e2 Merge pull request #5740 from martin-frbg/issue5739
Fix out-of-bounds access in the converted C version of the CBLAS tests
2026-04-02 11:37:57 +02:00
Martin Kroeker 3bbd755ba7 Add note on using an x86 OpenBLAS in Windows on Arm via Prism 2026-04-02 10:36:33 +02:00
Martin Kroeker 47be0d8a52 Fix access beyond array size 2026-04-02 10:14:09 +02:00
Martin Kroeker 93515c2f7a Merge pull request #5736 from martin-frbg/lapack1221
Follow-up on ?GESVDQ updates from PR1146 (Reference-LAPACK PR 1221)
2026-04-01 22:47:39 +02:00
Martin Kroeker 7dde52d5d2 Follow-up on ?GESVDQ updates from PR 1146 (Reference-LAPACK PR 1221) 2026-04-01 16:27:56 +02:00
Martin Kroeker c6e4d17819 Follow-up on ?GESVDQ updates from PR 1146 (Reference-LAPACK PR 1221) 2026-04-01 15:34:02 +02:00
Martin Kroeker b9ba9be508 Follow-up on ?GESVDQ updates from PR1146 (Reference-LAPACK PR 1221) 2026-04-01 15:19:41 +02:00
Martin Kroeker d27e98c97a Merge pull request #5734 from martin-frbg/lapack774
Fix workspace size in ?TGSEN (Reference-LAPACK PR 774)
2026-04-01 08:52:37 +02:00
Martin Kroeker 429d23f420 Merge pull request #5730 from martin-frbg/lapack1206
Fix overwriting of LDSWORK in ?TRSYL3 (Reference-LAPACK PR 1206)
2026-03-31 23:58:04 +02:00
Martin Kroeker 3f2338ba85 Merge pull request #5732 from martin-frbg/lapack1209
Remove unused parameter in  DORBDB3/ZUNBDB3 (Reference-LAPACK PR 1209)
2026-03-31 23:57:36 +02:00
Martin Kroeker 62dcdca823 Merge pull request #5733 from martin-frbg/lapack1211
Re-enable testing of the ?BB/?GG driver routines (Reference-LAPACK PR 1211)
2026-03-31 23:57:08 +02:00
Martin Kroeker eaeaf95e23 Merge pull request #5731 from martin-frbg/lapack1207
Fix crossover of INFO variables in some EIG tests (Reference-LAPACK PR 1207)
2026-03-31 23:56:47 +02:00
Martin Kroeker f1f36c02b9 Merge pull request #5729 from martin-frbg/lapack1195
Fix truncation of large workspace values in ZHE routines (Reference-LAPACK PR 1195)
2026-03-31 21:36:54 +02:00
Martin Kroeker 9816062aaf Merge pull request #5727 from martin-frbg/lapack1187
Fix DGGES test seed to avoid bad matrix (Reference-LAPACK PR 1187)
2026-03-31 21:36:35 +02:00
Martin Kroeker 664f17655c Merge pull request #5726 from martin-frbg/lapack1149
Fix display of version number in LAPACK tests (Reference-LAPACK PR 1149)
2026-03-31 21:36:17 +02:00
Martin Kroeker aec6170a8b Merge pull request #5725 from martin-frbg/lapack1146
Fix support for jobu/v in LAPACKE_?GESVDQ_WORK (Reference-LAPACK PR 1146)
2026-03-31 19:21:10 +02:00
Martin Kroeker 66cc9f043d Merge pull request #5724 from martin-frbg/lapack1136
Add NaN checks for input matrix A in ?GEEV (Reference-LAPACK PR 1136)
2026-03-31 16:16:25 +02:00
Martin Kroeker cc74393520 Fix workspace size (Reference-LAPACK PR 774) 2026-03-31 14:06:00 +02:00
Martin Kroeker 4bbb9fefc0 Fix workspace size (Reference-LAPACK PR 774) 2026-03-31 14:02:02 +02:00
Martin Kroeker e48625414f Merge pull request #5723 from martin-frbg/lapack1094
Change WORK dimension in deprecated ?GELQS/?GEQRS (Reference-LAPACK PR 1094)
2026-03-31 12:16:09 +02:00
Martin Kroeker 844939a9fb Enable testing of the driver routines (Reference-LAPACK PR 1211) 2026-03-31 11:53:42 +02:00
Martin Kroeker f085c70784 Remove unused parameter (Reference-LAPACK PR 1209) 2026-03-31 11:47:24 +02:00
Martin Kroeker 391cbf8584 Pass IINFO instead of INFO to ??PGVX (Reference-LAPACK PR 1207) 2026-03-31 11:39:45 +02:00
Martin Kroeker 6e89813300 Fix spurious overwriting of caller variable LDSWORK (Reference-LAPACK PR 1206) 2026-03-31 11:31:38 +02:00
Martin Kroeker 37e189c85d Fix truncation of large workspace values (Reference-LAPACK PR 1195) 2026-03-31 10:59:07 +02:00
Martin Kroeker 6dad37ff8d Merge pull request #5722 from martin-frbg/lapack1023
Change loop order in ?GETC2 (Reference-LAPACK PR 1023)
2026-03-31 09:43:49 +02:00
Martin Kroeker 004cf0d3d0 Fix seed to avoid FMA-sensitive ill-conditioned matrix (Reference-LAPACK PR 1187) 2026-03-31 00:02:26 +02:00
Martin Kroeker 1243314201 Fix display of minor version number (Reference-LAPACK PR 1149) 2026-03-30 23:48:43 +02:00
Martin Kroeker edad2a8b2f Fix display of minor version number (Reference-LAPACK PR 1149) 2026-03-30 23:47:31 +02:00
Martin Kroeker 55d7dd89ae Fix support for jobu and jobv (Reference-LAPACK PR 1146) 2026-03-30 23:36:42 +02:00
Martin Kroeker e19e140619 Add NaN checks for input matrix A (Reference-LAPACK PR 1136) 2026-03-30 23:06:12 +02:00
Martin Kroeker a03cd30185 Change WORK(LWORK) to WORK(*) (Reference-LAPACK PR 1094) 2026-03-30 21:36:05 +02:00
Martin Kroeker 904f9d60b0 Merge pull request #5721 from martin-frbg/lapack1020
Implement ?LARF1F and ?ORM2R (Reference-LAPACK PRs 1019/1020/1196)
2026-03-30 21:25:56 +02:00
Martin Kroeker ff5dc3ebc1 Change loop ordering to improve performance (Reference-LAPACK PR 1023) 2026-03-30 20:24:31 +02:00
Martin Kroeker a5d0f89ea4 Add C replacements for ?LARF1F/?LARF1L 2026-03-30 19:41:54 +02:00
Martin Kroeker af63f2a1aa Add C replacements for ?LARF1F/?LARF1L 2026-03-30 19:40:14 +02:00
Martin Kroeker 4342764c23 Implement ?LARF1F and ?ORM2R (Reference-LAPACK PRs 1019/1020/1196) 2026-03-30 19:15:29 +02:00
Martin Kroeker d9bb8f369f Implement ?LARF1F and ?ORM2R (Reference-LAPACK PRs 1019/1020/1196) 2026-03-30 18:45:36 +02:00
Martin Kroeker f5f789fc52 Implement ?LARF1F and ?ORM2R (Reference-LAPACK PRs 1019/1020/1196) 2026-03-30 18:41:59 +02:00
Martin Kroeker 605b1287e3 Add ?LARF1F and ?LARF1L (Reference-LAPACK PRs 1019/1020) 2026-03-30 18:34:28 +02:00
Martin Kroeker d26960a21e Merge pull request #5719 from martin-frbg/issue5713
ARM64 DYNAMIC_ARCH: add CortexA75/76  and restore VORTEX for DYNAMIC_LIST
2026-03-30 07:19:53 +02:00
Martin Kroeker 16211b7170 Add CortexA75/76 via CortexA73 and restore VORTEX for use with DYNAMIC_LIST 2026-03-29 22:10:44 +02:00
Martin Kroeker 0f9f6e4be5 Merge pull request #5710 from martin-frbg/issue5708
Work around miscompilation of the ARM64 non-SVE DDOT kernel
2026-03-27 22:09:08 +01:00
Martin Kroeker 3ebfc0ef65 Merge pull request #5718 from martin-frbg/issue5625
Fix CMake DYNAMIC_ARCH builds under Windows on Arm
2026-03-27 16:51:58 +01:00
Martin Kroeker 0315003d1f Do not build SME targets in DYNAMIC_ARCH under Windows 2026-03-27 13:42:41 +01:00
Martin Kroeker 75511cb67c POSIX strncasecmp is strnicmp in Windows on Arm 2026-03-27 13:40:39 +01:00
Martin Kroeker b8dbc4a1fc Merge pull request #5716 from yuanjia111/develop
[ARM64] Add optimized fp16 shgemm kernels for Neoverse N2
2026-03-27 13:36:25 +01:00
yuanjia e6eba9fa21 Add optimized FP16 shgemm for for NEOVERSEN2 target 2026-03-27 17:55:06 +08:00
Martin Kroeker 2671786e61 Merge pull request #5715 from martin-frbg/issue5714
typedef the unsupported fp16 as bfloat16 on Loongarch64 too
2026-03-27 10:19:44 +01:00
Martin Kroeker 3c188e4c12 Merge pull request #5712 from murste01/develop
Fix incorrect cast from BF16 to FP32 in SBGEMM
2026-03-27 07:50:00 +01:00
Martin Kroeker 7086a1b075 typedef the unsupported fp16 as bfloat16 on Loongarch64 too 2026-03-26 23:00:04 +01:00
Murray Steele f6d4fe703b Fix incorrect cast from BF16 to FP32 in SBGEMM
This change fixes a regression in SBGEMM where C is assumed to be BF16,
and so unconditionally casts the output to FP32 resulting in incorrect
outputs when beta=1.
2026-03-26 12:10:52 +00:00
Martin Kroeker 1f1fcd4927 Merge pull request #5709 from iv-m/loongarch64-fix-typo
c_check: loongarch64: Fix typo
2026-03-24 23:10:52 +01:00
Martin Kroeker e3ce4623c2 Use volatile attribute for SDOT only, to avoid creating new miscompilations 2026-03-24 23:08:02 +01:00
Ivan A. Melnikov 86971646ed c_check: loongarch64: Fix typo
Fixes: 42c7a27e6b
2026-03-24 21:25:46 +04:00
Martin Kroeker b8697b3448 Update version to 0.3.32.dev 2026-03-24 00:02:13 +01:00
Martin Kroeker d511552e64 Update version to 0.3.32.dev 2026-03-24 00:01:33 +01:00
Martin Kroeker 821242ed9d Merge pull request #5706 from OpenMathLib/release-0.3.0
Merge back from release branch to copy 0.3.32 tag
2026-03-24 00:00:52 +01:00
Martin Kroeker 8cecf899e2 Update version to 0.3.32
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
Nightly-Homebrew-Build / build-OpenBLAS-with-Homebrew (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true, RISCV64_ZVL256B) (push) Canceled after 0s
2026-03-23 23:53:57 +01:00
Martin Kroeker 3f1eac4ba0 Update version to 0.3.32 2026-03-23 23:53:05 +01:00
Martin Kroeker fd1c5ca01a Merge pull request #5705 from OpenMathLib/develop
Merge from develop for 0.3.32 release
2026-03-23 23:51:55 +01:00
Martin Kroeker 52178f70c7 Merge pull request #5703 from martin-frbg/changelog0332
Update Changelog for 0.3.32
2026-03-23 23:48:23 +01:00
Martin Kroeker f88aa7def7 Merge pull request #5702 from martin-frbg/lapack1203
Roundup LWORK and remove conversions in ?GVD (Reference-LAPACK PR 1203)
2026-03-23 20:05:17 +01:00
Martin Kroeker a24cca9576 Merge pull request #5704 from OpenMathLib/revert-5565-jn/makefile-rule-dynamic
Revert "build: fix rule for building dynamic files"
2026-03-23 20:04:08 +01:00
Martin Kroeker 7eab365219 Revert "build: fix rule for building dynamic files"
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true, RISCV64_ZVL256B) (push) Canceled after 0s
2026-03-23 20:03:52 +01:00
Martin Kroeker 6137054da3 Update with 0.3.32 changes 2026-03-23 18:35:22 +01:00
Martin Kroeker b227de9429 Merge pull request #5701 from martin-frbg/lapack1204
Fix internal errors getting ignored in calculation of selected eigenvalues (Reference-LAPACK PR 1204)
2026-03-23 18:32:25 +01:00
Martin Kroeker 99c120916a Use ROUNDUP_LWORK and remove redundant conversions (Reference-LAPACK PR1203) 2026-03-23 16:28:25 +01:00
Martin Kroeker 1b6fc34f0c Fix error codes from ?STEBZ getting ignored, resulting in wrong output (Reference-LAPACK PR1204) 2026-03-23 15:56:50 +01:00
Martin Kroeker 51e904df27 Merge pull request #5699 from martin-frbg/issue5325
Add Q&A on calling convention to the FAQ, from issue 5325
2026-03-23 13:28:27 +01:00
Martin Kroeker 8b9b3f0f5e Merge pull request #5698 from martin-frbg/issue5638
Improve error message displayed when running out of buffers
2026-03-23 08:37:45 +01:00
Martin Kroeker 500e32818a Merge pull request #5697 from martin-frbg/ext_doc
Update documentation of BLAS extensions
2026-03-23 07:21:34 +01:00
Martin Kroeker f6d5eb7af9 Merge pull request #5565 from vtjnash/jn/makefile-rule-dynamic
build: fix rule for building dynamic files
2026-03-22 23:59:41 +01:00
Martin Kroeker 9d3ae22b28 Add section on calling convention, from issue 5325 2026-03-22 23:44:32 +01:00
Martin Kroeker 494a3f735f Improve error message displayed when running out of buffers 2026-03-22 22:46:17 +01:00
Martin Kroeker 496af0d8bb add gemm_batch, gemm_batch_strided, bgemm/bgemv and fp16 extensions 2026-03-22 22:34:27 +01:00
Martin Kroeker 1e48eca408 Merge pull request #5695 from martin-frbg/update_readme_wasm
README.md: Update cpu section and add WASM support
2026-03-22 20:14:53 +01:00
Martin Kroeker faa06bd759 Update cpu section and add WASM support 2026-03-22 00:12:15 +01:00
Martin Kroeker 81d1029950 Merge pull request #5694 from martin-frbg/lapack1191
Update step length selection in ?LAED4  fallback (Reference-LAPACK PR 1191)
2026-03-22 00:06:11 +01:00
Martin Kroeker aa6a59a32e Update step length selection in LAED4 overshoot fallback (Reference-LAPACK PR 1191) 2026-03-21 18:40:54 +01:00
Martin Kroeker 4956446ca2 Merge pull request #5692 from teddygood/wasm-sum-followup
Enable DSUM SIMD path for WASM128_GENERIC
2026-03-21 12:39:30 +01:00
Martin Kroeker a89142fd5d Merge pull request #5688 from martin-frbg/divlimit_dyn
Make PREFERRED_SIZE, GEMM_DIVIDE_LIMIT and _RATE available to DYNAMIC_ARCH builds
2026-03-20 22:23:15 +01:00
Martin Kroeker afcf70dad9 Merge pull request #5691 from martin-frbg/neov2_dotbug
Avoid potential miscompilation of the ARM64 (NeoverseV2) dot kernel
2026-03-20 16:20:43 +01:00
Martin Kroeker c9185e91ad Make GEMM_DIVIDE_RATE and GEMM_PREFERRED_SIZE available in DYNAMIC_ARCH builds 2026-03-20 15:34:04 +01:00
Martin Kroeker 0dd501d794 Add GEMM_DIVIDE_RATE and GEMM_PREFERRED_SIZE to parameters 2026-03-20 15:32:06 +01:00
Martin Kroeker 6bf687b2ef Make divide_rate and preferred_size available to DYNAMIC_ARCH too 2026-03-20 15:30:53 +01:00
Martin Kroeker 3f6e928d34 Declare result as volatile to keep compilers from optimizing it out 2026-03-20 11:32:23 +01:00
Martin Kroeker 7d4a479a29 Merge pull request #5690 from OpenMathLib/revert-5643-neov2_param
Revert "Fix SGEMM returning wrong results in multithreading on NeoverseV2"
2026-03-20 11:28:29 +01:00
Martin Kroeker 57cdef594b Revert "Fix SGEMM returning wrong results in multithreading on NeoverseV2"
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true, RISCV64_ZVL256B) (push) Canceled after 0s
2026-03-20 11:27:28 +01:00
teddygood f0d142c4dd Enable DSUM SIMD path for WASM128_GENERIC 2026-03-20 18:39:53 +09:00
Martin Kroeker e9aab19bbc Merge pull request #5689 from teddygood/wasm-sdot-followup
Use generic dot kernels for WASM128_GENERIC
2026-03-19 17:08:58 +01:00
Martin Kroeker b7601ea92f Retrieve cpu-specific GEMM_DIVIDE_LIMIT if DYNAMIC_ARCH 2026-03-19 08:29:15 +01:00
Martin Kroeker 8f5e49556f Add GEMM_DIVIDE_LIMIT to parameters 2026-03-19 08:26:33 +01:00
Martin Kroeker d7b13fec90 Provide a default GEMM_DIVIDE_LIMIT and add it to DYNAMIC_ARCH 2026-03-19 08:25:53 +01:00
teddygood 8c3717f69a Add WASM SIMD widening path for DSDOT 2026-03-19 14:16:18 +09:00
teddygood 6f672df537 Use generic DDOT kernel for WASM128_GENERIC 2026-03-19 14:15:32 +09:00
teddygood 6bb0dbfd3c Use generic SDOT kernel for WASM128_GENERIC 2026-03-19 13:54:58 +09:00
Martin Kroeker 8d6238f52e Merge pull request #5687 from martin-frbg/issue5686-1
Improve tests for SHGEMM and BGEMM
2026-03-19 00:01:31 +01:00
Martin Kroeker adba2c3c02 Merge pull request #5685 from teddygood/wasm-intrin-backend-exp
Add a WebAssembly SIMD backend for reusable intrinsics kernels
2026-03-18 21:49:53 +01:00
Martin Kroeker e5793d8406 Split failure count between comparison to SGEMM and naive loop 2026-03-18 21:46:48 +01:00
Martin Kroeker afbd7c2b0d Reduce expected accuracy compared to naive code and silence matrix element printout 2026-03-18 21:38:39 +01:00
Martin Kroeker c9dae4c1e0 Merge pull request #5684 from martin-frbg/asan_utest
Fix utest issues flagged by Address Sanitizer
2026-03-18 18:21:48 +01:00
teddygood 99d05575d0 Enable SAXPY for WebAssembly SIMD backend 2026-03-18 21:27:45 +09:00
teddygood 7ff3588833 Refine WebAssembly SIMD backend scope 2026-03-18 17:24:02 +09:00
Martin Kroeker b3de37c96b Merge pull request #5683 from martin-frbg/fix_skx_smallgemm
Fix potential over-optimization of the AVX512 small SGEMM kernel by gcc15
2026-03-18 09:08:05 +01:00
Martin Kroeker 2bdfe31986 Free arrays after test 2026-03-17 23:22:20 +01:00
Martin Kroeker 5741aab90b Avoid resolving wild pointers in automatic search for tests 2026-03-17 23:20:51 +01:00
Martin Kroeker 79a50d80d3 Fix potential over-optimization by gcc15 2026-03-17 23:13:58 +01:00
teddygood 53d0be88f8 Add WebAssembly SIMD backend for universal intrinsics 2026-03-18 03:23:31 +09:00
Martin Kroeker 7a95460bb1 Merge pull request #5680 from teddygood/wasm128-generic-target-exp
Add WebAssembly SIMD SGEMM and DGEMM kernels
2026-03-17 14:25:39 +01:00
Martin Kroeker a1fd7a4658 Merge pull request #5677 from CheryDan/riscv/zdrot
Optimize ZROT_RVV for the non-unit-stride case
2026-03-17 11:10:32 +01:00
Martin Kroeker 66063d123a Merge pull request #5679 from martin-frbg/issue5678
Add Jasper Lake Celeron N5105 and allow default fallback to Nehalem
2026-03-16 23:43:22 +01:00
teddygood 86d1451cbe Add WebAssembly SIMD GEMM kernels 2026-03-17 05:51:54 +09:00
Martin Kroeker 99c6a74e7b Add Jasper Lake Celeron N5105 and allow default fallback to Nehalem 2026-03-16 18:33:31 +01:00
Martin Kroeker ddfbc6499b Merge pull request #5676 from martin-frbg/wasm_arch
Move the WebAssembly/Emscripten support to its own architecture and target
2026-03-16 13:52:23 +01:00
Martin Kroeker f2a89889a4 make some arrays static to fix memory requirement issues 2026-03-16 09:32:56 +01:00
daichengrong aa967ef6ba Optimize ZROT_RVV for the non-unit-stride case
Optimize the RVV implementation of ZROT when inc_x and inc_y are
non-unit strides (inc_x != 1, inc_y != 1).

Reorder several operations to reduce vector register pressure and
avoid unnecessary vector register spill to the stack. This helps GCC
keep vector values in registers and reduces redundant spill/reload
instructions, improving runtime performance.

No functional change.

Signed-off-by: daichengrong <daichengrong@iscas.ac.cn>
2026-03-16 14:22:54 +08:00
Martin Kroeker 4a888bcb73 set USE_TRMM for WASM 2026-03-15 23:07:16 +01:00
Martin Kroeker 9a00d4859c Add Makefile.wasm 2026-03-15 19:51:42 +01:00
Martin Kroeker 460f5e8c0b Add the new WebAssembly target WASM128_GENERIC 2026-03-15 19:43:48 +01:00
Martin Kroeker 705a5f2523 Reuse parameters of RISCV64_GENERIC for WASM128_GENERIC 2026-03-15 19:41:33 +01:00
Martin Kroeker 6ed4cc9c86 Add WebAssembly/Emscripten as a dedicated architecute and target 2026-03-15 19:40:14 +01:00
Martin Kroeker 319343a5fd Report WebAssembly/Emscripten as a dedicated architecture 2026-03-15 19:38:49 +01:00
Martin Kroeker ea7d134aec Add wasm settings 2026-03-15 19:37:39 +01:00
Martin Kroeker 62944c9db0 Turn WebAssembly/Emscripten support into a dedicated architecture 2026-03-15 19:37:09 +01:00
Martin Kroeker 01270a94e8 Add WebAssembly as a separate architecture 2026-03-15 19:35:49 +01:00
Martin Kroeker f590468b69 Copy generic Makefile for wasm laswp 2026-03-15 19:34:25 +01:00
Martin Kroeker cd47770092 Add support for WebAssembly architecture "wasm" 2026-03-15 19:31:51 +01:00
Martin Kroeker ef3315527f Don't include the CPUID code in WebAssembly builds 2026-03-15 19:30:13 +01:00
Martin Kroeker 48f0a0f0ec Generate WASM kernel including existing intrinsics-based kernels 2026-03-15 19:28:08 +01:00
Martin Kroeker cc64ce68c3 Create generic C KERNEL as baseline for WASM 2026-03-15 19:26:42 +01:00
Martin Kroeker 450af57a68 Merge pull request #5675 from martin-frbg/fixctestc
Fix function signatures and minor compiler warnings in the CBLAS tests
2026-03-15 18:54:04 +01:00
Martin Kroeker 86ccbe8fea Fix function signatures and minor compiler warnings 2026-03-15 02:09:22 +01:00
Martin Kroeker b95729f5b0 Merge pull request #5672 from martin-frbg/nvidia_nv3
Add support for NeoverseV3 derivatives as NEOVERSEV2
2026-03-12 02:31:10 +01:00
Martin Kroeker fdc04c0e34 Merge pull request #5673 from martin-frbg/fixup-5671
remove inadvertently committed printf from PR 5671
2026-03-11 22:13:21 +01:00
Martin Kroeker f881af5bdf remove inadvertently committed printf 2026-03-11 22:10:18 +01:00
Martin Kroeker bc69f86dba Merge pull request #5671 from martin-frbg/cpuid_x86_cache
Update x86 cache size decoding table from current sandpile.org data
2026-03-11 11:34:44 +01:00
Martin Kroeker 1ff3a1a13d Merge pull request #5670 from amritahs-ibm/handle_fp16_power
powerpc: Bypass FP16 as BF16 on Power
2026-03-11 09:32:31 +01:00
Martin Kroeker 5b1729eb6d Support NeoverseV3 derivatives from NVIDIA Jetson boards as NEOVERSEV2 2026-03-10 22:34:45 +01:00
Martin Kroeker ee70631c4d Add Neoverse V3AE CPUID from NVIDIA Jetson AGX Thor 2026-03-10 22:32:44 +01:00
Martin Kroeker 02f5f620de Update cache size decoding table with sandpile.org data 2026-03-10 22:25:48 +01:00
Amrita H S 1a708bac8a powerpc: Bypass FP16 as BF16 on Power
typedef FP16 as BF16 on Power as FP16 is
not yet supported
2026-03-08 23:32:42 -05:00
Martin Kroeker 55b16e5923 Merge pull request #5643 from martin-frbg/neov2_param
Fix SGEMM returning wrong results in multithreading on NeoverseV2
2026-03-06 11:51:08 +01:00
Martin Kroeker 37262654d9 Merge pull request #5667 from fadara01/accelerate_sve128_sbgemm
Accelerate SVE128 SBGEMM/BGEMM
2026-03-06 09:14:44 +01:00
Martin Kroeker 75e2f12dae Merge pull request #5668 from martin-frbg/issue5665
Fix CMake DYNAMIC_ARCH compilation with old compilers on ARM64
2026-03-05 20:40:48 +01:00
Martin Kroeker d073702cdf Merge pull request #5661 from martin-frbg/update_readme_java
Fix leftover wiki links in the README and add java insights from issue #5109
2026-03-05 18:30:33 +01:00
Martin Kroeker 78fd789da0 Add compiler test for SVE support 2026-03-05 17:35:15 +01:00
Fadi Arafeh f30202b705 Accelerate SVE128 SBGEMM/BGEMM
This accelerates SBGEMM/BGEMM by extending the existing 8x4 kernel to 8x8 (unrolling N by 8)

Not sure if it's a good idea to delete the previous 8x4 kernel?

Here are the speedups on single core Neoverse-V2 (SVE128) compared to prev state:

Per-shape speedup
  M=N=K=64: SBGEMM 1.164x (16.42%), BGEMM 1.133x (13.30%)
  M=N=K=128: SBGEMM 1.220x (22.02%), BGEMM 1.186x (18.56%)
  M=N=K=256: SBGEMM 1.241x (24.08%), BGEMM 1.235x (23.54%)
  M=N=K=512: SBGEMM 1.240x (23.95%), BGEMM 1.227x (22.75%)
  M=N=K=1024: SBGEMM 1.251x (25.11%), BGEMM 1.232x (23.23%)
  M=N=K=2048: SBGEMM 1.235x (23.47%), BGEMM 1.246x (24.64%)

Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com>
2026-03-05 13:50:07 +00:00
Martin Kroeker 22fc689fa7 Merge pull request #5666 from martin-frbg/issue5664
Improve processing of linker arguments in f_check
2026-03-05 14:19:43 +01:00
Martin Kroeker 91eb0a638c Avoid splitting linker args on dashes not preceded by a space 2026-03-05 10:09:29 +01:00
Martin Kroeker 1590d8baf0 fix install.md link for cortex-m 2026-03-04 23:12:33 +01:00
Martin Kroeker 98864c7c6f fix reintroduced typo again 2026-03-04 20:40:45 +01:00
Martin Kroeker db6bbc7150 Merge pull request #5660 from martin-frbg/issue5658
Rewrite the Haswell SROT/DROT kernel tail loop with AVX2 to get consistent FMA rounding
2026-03-04 18:15:34 +01:00
Martin Kroeker ecdabf9d74 Merge pull request #5663 from martin-frbg/issue5662
Move the early exit in ?GESV for NRHS=0 after the GETRF call
2026-03-04 16:14:06 +01:00
Martin Kroeker dc8b16c57c Move the early exit for NRHS=0 after the GETRF call 2026-03-04 12:21:27 +01:00
Martin Kroeker 754ad2ad4f Fix leftover wiki links and add java insights from issue 5109 2026-03-04 11:44:36 +01:00
Martin Kroeker 3166fffcec Merge pull request #5659 from lindsayad/handle-emerald-rapids
Handle Intel's emerald rapids and do some formatting in the cpuid_x86 file
2026-03-03 20:06:49 +01:00
Martin Kroeker df29cc0205 Use AVX2 in the tail loop too for consistent FMA rounding 2026-03-03 15:51:51 +01:00
Alex Lindsay 692023e364 Switch case ordering for exmodel 12 to be sorted 2026-03-02 16:23:38 -07:00
Alex Lindsay 5a534a63e8 clang-format and make cpuid_x86.c more readable 2026-03-02 15:51:46 -07:00
Alex Lindsay 303903e29c Handle emerald rapids model 2026-03-02 15:39:41 -07:00
Martin Kroeker 18638c70ef Merge pull request #5656 from martin-frbg/issue5653
Add pragma to limit optimization in POWER10 DGEMV kernel
2026-02-22 15:54:59 +01:00
Martin Kroeker ef27ec6bed Add pragma to limit optimization level 2026-02-22 13:42:41 +01:00
Martin Kroeker da0e066c9e Merge pull request #5655 from martin-frbg/intel-default-cpuid
Add feature-based fallbacks for unknown/future Intel CPUIDs
2026-02-20 22:19:25 +01:00
Martin Kroeker 1d0ca19457 Add feature-based fallbacks for unknown/future Intel cpus 2026-02-20 16:45:08 +01:00
Martin Kroeker 30cf14c548 Merge pull request #5640 from ChipKerchner/RVV_Narrow_Accumulate_FP16_GEMM
Added ability to accumulate in FP16.  Convert BF16 to FP32.  For FP16 and BF16 GEMM in RISC-V (BF16 now works for pre-RVA23)
2026-02-20 14:22:27 +01:00
Martin Kroeker b4db4a1713 Merge pull request #5654 from martin-frbg/issue5627-2
Use generic SCAL kernels for PPC970 running FreeBSD
2026-02-20 12:45:42 +01:00
Martin Kroeker 43728ade59 Merge pull request #5651 from martin-frbg/issue5650
Fix gmake build with only a subset of precision types
2026-02-20 08:02:50 +01:00
Martin Kroeker 46b963b9a0 Use generic C kernels for SCAL on FreeBSD 2026-02-19 22:46:03 +01:00
Martin Kroeker 822aae6cab Merge pull request #5652 from martin-frbg/issue5649
Fix passing of C/ZDOTC results in C-converted LAPACK  on non-Windows systems
2026-02-19 22:05:10 +01:00
Martin Kroeker dccbf18c1f fix storing of ZDOTC result on non-Windows 2026-02-19 19:45:20 +01:00
Martin Kroeker 0cfb587fde fix storing of ZDOTU result on non-Windows 2026-02-19 18:46:20 +01:00
Martin Kroeker 92fcffff54 fix storing of CDOTC result on non-Windows 2026-02-19 18:45:07 +01:00
Martin Kroeker 5a07c1b61c Delete misplaced lapack-netlib/chpgst.c 2026-02-19 18:42:30 +01:00
Martin Kroeker 11986454b3 fix storing of CDOTU result on non-Windows 2026-02-19 18:05:59 +01:00
Martin Kroeker 946a2cffec fix storing of CDOTC result on non-Windows 2026-02-19 16:53:18 +01:00
Martin Kroeker ef1c06f5eb fix storing of CDOTC result on non-Windows 2026-02-19 14:08:59 +01:00
Martin Kroeker b7542ffb3d fix storing of CDOTC result on non-Windows 2026-02-19 13:34:48 +01:00
Martin Kroeker 5d29f88fed fix storing of CDOTC result on non-Windows 2026-02-19 13:18:20 +01:00
Martin Kroeker 61db4e8191 fix storing of CDOTC result on non-Windows 2026-02-19 13:07:15 +01:00
Martin Kroeker bf0d7eaacc fix storing of CDOTC result on non-Windows 2026-02-19 12:59:46 +01:00
Martin Kroeker 1da181dac6 fix storing of CDOTC result on non-Windows 2026-02-19 12:05:27 +01:00
Martin Kroeker 4389e1de70 fix storing of CDOTC result on non-Windows 2026-02-19 11:49:15 +01:00
Martin Kroeker 1defad49b6 fix storing of CDOTC result on non-Windows 2026-02-19 11:29:18 +01:00
Martin Kroeker be4ddc752f fix storing of CDOTC result on non-Windows systems 2026-02-19 10:56:27 +01:00
Martin Kroeker 7fe8bd8046 build comparison functions for complex cases too 2026-02-18 19:12:35 +01:00
Martin Kroeker 7d431f3bb0 fix conditional build for double and complex too 2026-02-18 19:10:53 +01:00
Martin Kroeker 0e28b427f3 Add slaed3/dlaed3 to complex builds 2026-02-18 19:09:36 +01:00
Martin Kroeker 92b4d1b6f3 make SLAED/DLAED definitions available to COMPLEX too 2026-02-18 19:06:17 +01:00
Martin Kroeker 7d7a6c6708 Build the comparison functions as needed to avoid missing references 2026-02-18 11:43:43 +01:00
Martin Kroeker d0a6e36896 Fix rules for running the GEMM3M tests 2026-02-18 11:41:25 +01:00
Martin Kroeker 6e3fb2ce52 fix conditional build rule 2026-02-18 11:40:20 +01:00
Chip Kerchner efe63e7970 Add pre-RVA23 to BF16 GEMM. 2026-02-15 15:49:59 +00:00
Martin Kroeker 1ef6319990 Merge pull request #5645 from martin-frbg/cortex925-cpuid
Add CPU autodetection for Arm Cortex X925/A725
2026-02-14 20:07:24 +01:00
Chip Kerchner 1d6aa0dc31 Add dummy memsets - just in case. 2026-02-13 20:03:35 +00:00
Chip Kerchner 7a1d23400f Add flag for not converting A & B - will be used in future to do conversion during packing. 2026-02-13 19:00:41 +00:00
Chip Kerchner 1cc377ef61 Only convert B if M is greater or equal to 4. 2026-02-13 18:14:11 +00:00
Chip Kerchner 0acb60aab3 Conversion from BF16 to FP32 only once. 2026-02-13 17:55:15 +00:00
Chip Kerchner 9701a80a9f One small change. 2026-02-12 20:35:41 +00:00
Chip Kerchner 4121a22c02 Convert BF16 values once (and vectorized). 2026-02-12 18:45:39 +00:00
Martin Kroeker 1690982cf1 Merge pull request #5644 from martin-frbg/issue5641
Work around llvm failing to compile the AVX512 sgemm kernel
2026-02-12 18:04:36 +01:00
Martin Kroeker 5613deb794 Merge pull request #5646 from mattip/azure-timeout
use 100 minute timeout for azure mingw32 job
2026-02-12 16:19:37 +01:00
Martin Kroeker ea82d802e6 fix typo 2026-02-12 15:55:55 +01:00
mattip e5ba61c344 use 100 minute timeout for azure mingw32 job 2026-02-12 12:09:59 +02:00
Martin Kroeker 387be46c42 Support Cortex X925 as NeoverseV2 2026-02-12 00:43:52 +01:00
Martin Kroeker 445b11148f work around llvm failing to compile the AVX512 sgemm kernel 2026-02-12 00:10:26 +01:00
Martin Kroeker db00d5c2c9 Fix SGEMM returning wrong results in multithreading on NeoverseV2 2026-02-12 00:02:13 +01:00
Chip Kerchner 33560437f5 Convert inputs from BF16 to FP32 and use FP32 vector madds. 18% faster. 2026-02-11 19:50:48 +00:00
Chip Kerchner e3cb067bf4 Fixed MADD to use float16 values. Use LMUL = 2 in main loop. Now 1.85X faster on BananaPi. 2026-02-11 00:27:27 +00:00
Chip Kerchner 74d9fe2832 Forget to add defintion. 2026-02-10 19:00:26 +00:00
Chip Kerchner aa1cebd45b 128-bit versions. 2026-02-10 18:30:02 +00:00
Chip Kerchner b5f2a50fe9 Added ability to accumulate in FP16 for GEMM. Widens once at the end of loops. 2026-02-10 17:30:05 +00:00
Chip Kerchner 7da983ebac Merge remote-tracking branch 'origin/develop' into develop 2026-02-10 17:27:51 +00:00
Martin Kroeker 986ba29493 Merge pull request #5637 from gula00/fix-typo
docs: fix minor spelling typos
2026-02-09 09:07:03 +01:00
Qingyu Li 37f7a2e00c docs: fix minor spelling typos 2026-02-09 08:25:31 +08:00
Martin Kroeker 08381cd2f0 Merge pull request #5636 from martin-frbg/arrowhu
Add CPUID identification for Intel Arrow Lake H/U
2026-02-08 17:44:11 +01:00
Martin Kroeker 35e8eeaad3 Merge pull request #5633 from cho-m/makefile-flangnew-macos
build: fix Makefile build with LLVM flang on macOS
2026-02-08 15:18:31 +01:00
Chip Kerchner 720654ace1 Merge remote-tracking branch 'origin/develop' into develop 2026-02-06 13:20:24 +00:00
Martin Kroeker 0ae18524cd Add Arrow Lake H/U 2026-02-05 20:18:46 +01:00
Martin Kroeker 20699b1812 Merge pull request #5634 from yuanjia111/develop
Fix: Remove invalid parentheses after endif
2026-02-05 08:39:46 +01:00
yuanjia 9e42e40884 Remove accidental file tream 2026-02-04 10:12:28 +08:00
yuanjia e955736005 Fix: Remove invalid parentheses after endif 2026-02-04 09:57:48 +08:00
Michael Cho 59da821b0d build: fix Makefile build with LLVM flang on macOS 2026-02-01 15:16:11 -05:00
Chip Kerchner cb4e4ce8bb Merge remote-tracking branch 'origin' into develop 2026-01-30 17:36:01 +00:00
Martin Kroeker 1a9cf8e291 Merge pull request #5631 from martin-frbg/issue5626n
Fix CMake/LLVM compilation issues seen under Windows-on-Arm
2026-01-30 10:17:46 +01:00
Martin Kroeker 27e35d639d Merge pull request #5630 from martin-frbg/pantherlake
Add Intel Panther Lake CPUID
2026-01-30 08:24:18 +01:00
Martin Kroeker 69d92490c1 move inclusion of sme_abi header into the conditional section 2026-01-29 22:24:00 +01:00
Martin Kroeker ebc3eaf80b Need strings.h for strncasecmp prototype 2026-01-29 22:21:46 +01:00
Martin Kroeker 0d6b7fe07b Fix gcc version check in absence of gcc compiler 2026-01-29 22:20:32 +01:00
Martin Kroeker 2ddcdafc0b Merge pull request #5628 from martin-frbg/issue5627
Fix stack address of flag parameter in (pre-POWER6) POWER ?SCAL kernels
2026-01-29 20:32:46 +01:00
Martin Kroeker 2ef9819803 Add Intel Panther Lake CPUID 2026-01-29 18:51:21 +01:00
Martin Kroeker 601bdde8ec fix stack location of dummy2 flag 2026-01-27 22:40:50 +01:00
Martin Kroeker d53d2b11a9 fix stack location of dummy2 flag 2026-01-27 22:39:37 +01:00
Martin Kroeker bc3b7e749a Merge pull request #5623 from martin-frbg/issue5366
Rename the DllMain copy used in static linking to OpenBLASDllMain
2026-01-23 22:48:53 +01:00
Martin Kroeker 80995622dd Rename the DllMain copy used in static linking to OpenBLASDllMain 2026-01-22 11:19:04 +01:00
Martin Kroeker dafb996425 Merge pull request #5621 from martin-frbg/woa_sum
Provide optimized ?SUM kernels for NeoverseN1 and related
2026-01-21 11:03:55 +01:00
Martin Kroeker b6aff4754a Merge pull request #5619 from lujiaweics/fix/serialize_parallelized_syrk_function_callers
Serialize accesses to parallelized syrk functions from multiple calle…
2026-01-20 23:28:18 +01:00
Martin Kroeker 861b3db733 Reuse ?SUM kernels from ThunderX2T99 2026-01-20 15:42:09 +01:00
Martin Kroeker 71261a7b3f Trivially derive optimized S/DSUM for existing SASUM/DASUM kernels 2026-01-20 15:38:50 +01:00
lujiaweics 1f3b81e562 Serialize accesses to parallelized syrk functions from multiple callers, like it was already done for GEMM in level3_thread.c and GEMM3M in level3_gemm3m_thread.c 2026-01-20 21:31:35 +08:00
Martin Kroeker 413e609f9c Merge pull request #5618 from vtjnash/jn/zdot_thunderx2t99-ICE
arm64: fix clang ICE on Windows for thunderx2t kernels
2026-01-20 14:02:30 +01:00
Martin Kroeker a10f535803 Merge pull request #5617 from martin-frbg/fix_apple_ranlib
CI, MacOS: fix missing ranlib with latest llvm
2026-01-20 14:02:07 +01:00
Martin Kroeker 2b4eaad2a0 try to make do without ranlib on OSX 2026-01-19 21:18:12 +01:00
Martin Kroeker 5ffbf38b41 Merge pull request #5616 from 7schroet/develop
Fix Intel OpenMP flag
2026-01-19 21:04:37 +01:00
Martin Kroeker 331b9ef11f Use llvm-ranlib in gmake/llvm builds on Mac 2026-01-19 18:10:58 +01:00
Jameson NashandClaude Opus 4.5 a18a4ee08a arm64: fix clang ICE on Windows for zdot_thunderx2t99.c
Guard .align directive to avoid internal compiler error on
AArch64 Windows with clang.

See: https://github.com/llvm/llvm-project/issues/149547
See: #5076

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:36:14 +00:00
Martin Kroeker 60d03c3600 fix missing ranlib 2026-01-19 15:40:58 +01:00
Martin Kroeker d5a5c7d319 Merge pull request #5598 from moluopro/develop
build: skip tests when building for iOS
2026-01-19 14:18:15 +01:00
Niclas Schroeter 3c9858cfa0 Fix Intel OpenMP flag 2026-01-19 11:53:27 +01:00
Martin Kroeker 14594773a0 Merge pull request #5615 from martin-frbg/issue5607
Fix building without multithreading or LAPACK
2026-01-19 00:35:33 +01:00
Martin Kroeker a8a2238848 Merge pull request #5611 from martin-frbg/issue5602
Fix too small DGEMM_R for some Loongson LA464 cpus
2026-01-18 23:26:11 +01:00
Martin Kroeker 8870cfc750 Merge pull request #5609 from eschnett/patch-2
Avoid integer overflow in dynamic_riscv64.c
2026-01-18 23:25:34 +01:00
Martin Kroeker d40e19ef41 Merge pull request #5606 from botantony/openblas_config-fix-arm-gcc-build
fix: don't use `_Float16` type on GCC 12
2026-01-18 23:24:51 +01:00
Martin Kroeker 566e315f4f Make test_post_fork_async depend on LAPACK as it uses getrf 2026-01-18 19:59:49 +01:00
Martin Kroeker 8742434212 Include thread callback replacement hook in singlethreaded builds as well 2026-01-18 19:55:40 +01:00
Martin Kroeker 8ea938f03a Merge pull request #5613 from al3xtjames/gemm-smp
Fix ARMV9SME/VORTEXM4 GEMM compilation with SMP disabled
2026-01-18 14:01:59 +01:00
Martin Kroeker 67c0675cf0 Merge branch 'OpenMathLib:develop' into issue5602 2026-01-18 13:50:02 +01:00
Martin Kroeker 01657b356f Merge pull request #5614 from martin-frbg/fixcirrusbsd
Cirrus CI: fix softlink for libgfortran on freebsd
2026-01-18 13:49:39 +01:00
Martin Kroeker 70ecde3e49 Merge pull request #5610 from OpenMathLib/release-0.3.0
Merge back from release 0.3.31 to develop to copy tag
2026-01-18 13:47:36 +01:00
Martin Kroeker 3628f35251 fix libgfortran link on freebsd 2026-01-18 12:55:55 +01:00
Alex James d2906e8787 Fix ARMV9SME/VORTEXM4 GEMM compilation with SMP disabled
gemm.c currently declares gotoblas_corename in SMP-enabled builds, but
the ARMV9SME and VORTEXM4 targets call gotoblas_corename even when SMP
is disabled. Fix compilation of the ARMV9SME and VORTEXM4 targets with
SMP disabled by unconditionally declaring gotoblas_corename for
DYNAMIC_ARCH builds.
2026-01-17 22:03:29 -08:00
Martin Kroeker f298361f98 Document size restriction on GEMM_R 2026-01-17 20:58:49 +01:00
Martin Kroeker 4001d7a74f Increase LA464/16MB DGEMM_R for minimal spacing of 64 to MAX(p,q) 2026-01-17 20:53:51 +01:00
Erik Schnetter 55e853a698 Avoid integer overflow in dynamic_riscv64.c
Closes https://github.com/OpenMathLib/OpenBLAS/issues/5608.
2026-01-16 10:36:53 -05:00
botantony c077708852 fix: don't use _Float16 type on GCC 12
`_Float16` is not supported by GCC 12 on Arm64 architectures:
https://godbolt.org/z/nKbrjPTvG

Related to:
https://github.com/Homebrew/homebrew-core/pull/263008
https://github.com/Homebrew/homebrew-core/pull/263009

Signed-off-by: botantony <antonsm21@gmail.com>
2026-01-16 03:04:13 +01:00
Martin Kroeker 45e9820118 Update version to 0.3.31.dev 2026-01-16 00:09:51 +01:00
Martin Kroeker f8a9c067d8 Update version to 0.3.31.dev 2026-01-16 00:09:15 +01:00
Martin Kroeker 76f1be470c Merge pull request #5605 from OpenMathLib/develop
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
Nightly-Homebrew-Build / build-OpenBLAS-with-Homebrew (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true, RISCV64_ZVL256B) (push) Canceled after 0s
Merge from develop for  0.3.31 release
2026-01-15 23:57:26 +01:00
Martin Kroeker 0e7b11fbc3 Merge branch 'release-0.3.0' into develop 2026-01-15 23:57:09 +01:00
Martin Kroeker ca1aefc5f9 Update version to 0.3.31 2026-01-15 23:54:29 +01:00
Martin Kroeker 366847fc10 Update version to 0.3.31 2026-01-15 23:53:53 +01:00
Martin Kroeker 10bd0ec4c3 Merge pull request #5604 from martin-frbg/changelog0331
Update the Changelog for version 0.3.31
2026-01-15 23:47:52 +01:00
Martin Kroeker 5bb7ef1466 Update the Changelog for version 0.3.31 2026-01-15 23:47:16 +01:00
Martin Kroeker 4cd575c20f Merge pull request #5423 from martin-frbg/issue5414
Split VORTEXM4 from VORTEX target and fix SGEMM_DIRECT support for SME-capable targets
2026-01-15 23:35:44 +01:00
Martin Kroeker 6f225daf94 make VORTEXM4 MacOS-only for now 2026-01-15 19:33:29 +01:00
Martin Kroeker 55a10c748d Make VortexM4 available in DYNAMIC_ARCH on MacOS only 2026-01-15 16:31:51 +01:00
Martin Kroeker 5133aac055 Make VORTEXM4 available in DYNAMIC_ARCH on Apple 2026-01-15 16:26:03 +01:00
Martin Kroeker faa18750d6 typo fix 2026-01-15 00:04:29 +01:00
Martin Kroeker 7acf919836 typo 2026-01-15 00:03:24 +01:00
Martin Kroeker 93cd7b9238 Force linking to clang_rt_builtins when using LLVM for AppleM4 2026-01-14 23:11:13 +01:00
Martin Kroeker d49df4c579 force linking to clang_rt_builtins when using LLVM for AppleM4 2026-01-14 23:08:58 +01:00
Martin Kroeker 7ffce1c788 fix spurious change of (S)BGEMM parameters for NeoverseV1 2026-01-14 19:03:06 +01:00
Martin Kroeker 88c583ed49 Update Makefile 2026-01-14 17:00:45 +01:00
Martin Kroeker d3e4b41136 remove cpu=apple-m4 as not required and less portable 2026-01-14 13:55:16 +01:00
Martin Kroeker 6735872092 drop the cpu=apple-m4 part as nonessential 2026-01-14 11:28:19 +01:00
Martin Kroeker 6137236c0a fix os variable reference 2026-01-13 23:51:34 +01:00
Martin Kroeker fa021e1887 fix missing endif() and add AppleClang options for M4 2026-01-13 22:32:41 +01:00
Martin Kroeker bdcb9b7252 add prototype 2026-01-13 22:25:30 +01:00
Martin Kroeker 533cab235f add prototype 2026-01-13 22:24:27 +01:00
Martin Kroeker 31bb6ca7df Apple Clang requires +sme in the arch string for M4 2026-01-13 21:10:07 +01:00
Martin Kroeker 5e5f9a39ad Apple Clang absolutely needs the +sme in the arch string 2026-01-13 21:05:11 +01:00
Martin Kroeker 770ad6883d Distinguish AppleClang from LLVM on ARM64 2026-01-13 20:48:02 +01:00
Martin Kroeker 10ba0e6044 fix missing parentheses on endif 2026-01-12 23:30:46 +01:00
Martin Kroeker 3149408165 Merge branch 'OpenMathLib:develop' into issue5414 2026-01-12 23:25:39 +01:00
Martin Kroeker e07bea17c8 Merge pull request #5601 from martin-frbg/issue5336-2
Use linker response files with CMake on all Apple hardware
2026-01-12 23:23:59 +01:00
Martin Kroeker e04df1941d Use linker response files on all Apple hardware 2026-01-12 20:54:51 +01:00
Martin Kroeker 31150eb1e6 Move early exit up; don't rely on support_sme() for now 2026-01-12 15:47:33 +01:00
Martin Kroeker 0a53d91789 Move early exit up; don't rely on support_sme() for now 2026-01-12 15:44:49 +01:00
Martin Kroeker aafd3cb0db Merge branch 'OpenMathLib:develop' into issue5414 2026-01-12 00:51:25 +01:00
Martin Kroeker 01cc6df92e Merge pull request #5600 from martin-frbg/lapack1179
Fix out-of-bounds accesses in the LAPACK LIN tests (Reference-LAPACK PR 1179)
2026-01-12 00:48:23 +01:00
Martin Kroeker e776297bf9 Fix out-of-bounds accesses to the TAU array (Reference-LAPACK PR 1179) 2026-01-11 22:10:16 +01:00
Martin Kroeker 05d7c18894 Merge pull request #5599 from martin-frbg/issue5552
Temporarily use the generic C kernel for DNRM2 on SPARC
2026-01-11 22:06:59 +01:00
Martin Kroeker 4d08156266 Use the generic C kernel for DNRM2 2026-01-11 21:58:31 +01:00
Martin Kroeker 6de062cfc2 Merge branch 'OpenMathLib:develop' into issue5414 2026-01-11 17:45:11 +01:00
Martin Kroeker 52ec7faf31 Merge pull request #5554 from hideaki-motoki/issue5553_gemm_default_pqr_for_a64fx
Setting optimized `[SD]GEMM_DEFAULT_[PQR]` parameters for `A64FX`
2026-01-11 15:59:51 +01:00
Martin Kroeker 1ffea2b8c1 Merge pull request #5597 from martin-frbg/issue5503
Improve the precision of ARM64 S/CNRM2 by summing in double precision
2026-01-11 14:47:39 +01:00
moluopro a3af4cadcc build: skip tests when building for iOS 2026-01-11 20:16:42 +08:00
Martin Kroeker d1de282a4e Improve the precision of S/CNRM2 by summing in double precision 2026-01-11 13:04:00 +01:00
Martin Kroeker e5aebeaf93 Merge pull request #5596 from moluopro/develop
docs: fix iOS build script & use xcrun SDK path
2026-01-10 19:51:04 +01:00
moluopro a514760e06 Change 'make libs' back to 'make' 2026-01-10 21:14:05 +08:00
moluopro d7d1088d21 docs: fix iOS build script & use xcrun SDK path 2026-01-09 23:35:58 +08:00
Martin Kroeker a9a6edaf17 Adapt for DYNAMIC_ARCH with multiple ...preprocess symbols 2026-01-09 15:29:36 +01:00
Martin Kroeker 2d46f1ec65 Merge branch 'develop' into issue5414 2026-01-09 15:04:06 +01:00
Martin Kroeker c040d5ed86 Merge pull request #5591 from quic/topic/ssyr2k_direct_sme1
Support for SME1 based ssyr2k_direct kernel for cblas_ssyr2k level 3 API
2026-01-08 15:47:38 +01:00
Zhiqing xie 6939a43c3b Support for SME1 based ssyr2k_direct kernel for cblas_ssyr2k level 3 API 2026-01-08 11:09:04 +08:00
Martin Kroeker 20ae36ba75 Merge pull request #5595 from amritahs-ibm/fix_dgemm_warnings
Fixing warning messages in dgemm and dgemv kernels
2026-01-07 12:17:28 +01:00
Amrita H S b53d18b3ad Fixing warning messages in dgemm and dgemv kernels
Signed-off-by: Amrita H S <amritahs@linux.vnet.ibm.com>
2026-01-06 10:20:56 -06:00
Martin Kroeker 7e612b640f Merge pull request #5594 from lujiaweics/fix/symbol-suffix-missing-threads-callback-function
Fix bug where openblas_set_threads_callback_function does not support modyfing symbol prefix and suffix in shared library
2026-01-06 11:54:39 +01:00
Martin Kroeker e384396a51 Use the armv9 capability set in the compiler test for SME 2026-01-05 23:37:31 +01:00
Martin Kroeker 02bc005306 reset SVE and SME capabilities between targets 2026-01-05 19:14:50 +01:00
Martin Kroeker a18a53605e Adjust M4 options to avoid unresolved reference with non-Apple LLVM 2026-01-05 19:10:52 +01:00
Martin Kroeker 618bcbd7c0 adjust M4 options to avoid undefined references with non-Apple LLVM 2026-01-05 19:09:09 +01:00
Martin Kroeker badf4c09e2 Merge pull request #5592 from RajalakshmiSR/sgemm-p10-unroll
POWER10: Reduce sgemm loop unrolling
2026-01-05 16:19:55 +01:00
lujiaweics 879497990f Fix bug where openblas_set_threads_callback_function does not support modyfing symbol prefix and suffix in shared library 2026-01-05 21:49:04 +08:00
Rajalakshmi Srinivasaraghavan 2283fcbbe7 POWER10: Reduce sgemm loop unrolling
With GCC 14, unnecessary move and lxvp instructions appear when unrolling the inner loop for larger sizes.
Reducing the loop unroll factor restores performance to GCC 11.
2026-01-04 17:01:01 -06:00
Martin Kroeker 67fd33e729 syntax fix 2025-12-31 19:46:20 +01:00
Martin Kroeker f4383d0235 syntax fix 2025-12-31 19:41:46 +01:00
Martin Kroeker 7beba94023 Add workaround for current LLVM SME bug on Windows 2025-12-31 15:49:43 +01:00
Martin Kroeker b183182e61 Add workaround for current LLVM SME bug on Windows 2025-12-31 15:43:15 +01:00
Martin Kroeker 5c8cf37d83 Add workaround for current LLVM SME bug on Windows 2025-12-31 15:33:15 +01:00
Martin Kroeker 275eb6f7f3 Add workaround for current LLVM SME bug on Windows 2025-12-31 15:29:27 +01:00
Martin Kroeker e4344def6a Merge pull request #5505 from martin-frbg/issue5493
Rewrite lapacke headers with pre/postfixes if necessary
2025-12-31 14:19:41 +01:00
Martin Kroeker 80951a2acc Merge pull request #5534 from bartoldeman/fix-flang-fcheck
Fix f_check detection of LLVM 21 flang
2025-12-30 18:15:37 +01:00
Martin Kroeker 772741e2b1 Merge pull request #5586 from martin-frbg/issue5337
Update instructions for setting up a conda-based build environment on Windows
2025-12-30 12:38:03 +01:00
Martin Kroeker 54f7b76f20 Merge pull request #5588 from martin-frbg/cooperlake_cast
Cast the alignment parameter for Cooper Lake and Sapphire Rapids to BLASLONG
2025-12-30 10:45:13 +01:00
Martin Kroeker 579eda3778 Name openmp packages in Windows/conda build recipe 2025-12-30 00:03:40 +01:00
Martin Kroeker 83a788c387 Add BLASLONG cast to the DEFAULT_ALIGN parameter of Cooper Lake and Sapphire Rapids 2025-12-29 23:23:34 +01:00
Martin Kroeker 5e3a9922bd replace mentions of miniconda with miniforge 2025-12-27 22:50:38 +01:00
Martin Kroeker e548bda1ba Update Windows/LLVM build to use miniforge and flang_win-64 package 2025-12-27 22:33:01 +01:00
Martin Kroeker cd02751b12 Merge pull request #5548 from mayeut/ppc64le-clang
ci: add build with clang on ppc64le
2025-12-25 18:02:16 +01:00
Martin Kroeker 5766adbcad Merge pull request #5569 from OpenMathLib/revert-5479-forklock
Revert "[WIP,Testing] remove the lock around the thread shutdown function again"
2025-12-25 17:10:29 +01:00
Martin Kroeker 1f2bffb4fe Merge pull request #5551 from almayne/sgemv_ramps
Updated SGEMV ramps.
2025-12-25 12:53:36 +01:00
Martin Kroeker 067e43c1e1 Merge pull request #5575 from martin-frbg/woa-neozdot
Make the thunderx2 zdot kernel compatible with LLVM21 in Windows on Arm
2025-12-25 12:00:58 +01:00
Martin Kroeker 0ff51a40f1 Merge pull request #5579 from vtjnash/jn/YIELDING
fix define for YIELDING
2025-12-25 09:51:44 +01:00
Jameson Nash 0b2b583223 POSIX.1-2008 2025-12-24 21:47:03 -05:00
Jameson Nash fed16d638c Update common.h 2025-12-24 17:47:48 -05:00
Martin Kroeker d39b77748f Make .align conditional on not being on WoA and strip CRLF endings 2025-12-24 20:00:45 +01:00
Jameson Nash 371663f0c2 fix define for YIELDING
The intent is to define this as nop, but previously it was then
immediately overriding it for various architectures, causing a compiler
warning on Windows.
2025-12-23 13:59:29 -05:00
Martin Kroeker 097d2d98fd Merge pull request #5578 from martin-frbg/mingw-getenv
Fix potential crash on startup in CYGWIN or MINGW builds with DYNAMIC_ARCH
2025-12-23 18:56:53 +01:00
Martin Kroeker 5b0884d8e7 Use getenv for readenv_atoi in CYGWIN or MINGW builds 2025-12-22 16:31:33 +01:00
Martin Kroeker c7b0304ba3 Merge pull request #5576 from martin-frbg/issue5562-4
Fix variable shadowing in the c/z_div macros of f2c-converted LAPACK
2025-12-21 09:09:38 +01:00
Martin Kroeker 652bf6b51b Initialize local variable to remove a compiler warning 2025-12-20 18:08:03 +01:00
Martin Kroeker 9fa64b9a3d Initialise string length variables 2025-12-20 18:04:30 +01:00
Martin Kroeker b8163b65cb Fix compilation error caused by inadvertent shadowing of variables in the MSVC c/z_div macros 2025-12-20 18:02:28 +01:00
Martin Kroeker ac2c66321d remove special handling of C/ZDOT for LLVM on WoA 2025-12-19 17:04:21 +01:00
Martin Kroeker cfa28bcf71 Support compilation with LLVM for Windows on Arm 2025-12-19 17:00:47 +01:00
Martin Kroeker 6bc4276f90 Merge pull request #5574 from martin-frbg/issue5562-3
Fix MSVC macros for complex division in the f2c-translated LAPACK
2025-12-19 16:28:49 +01:00
Martin Kroeker bc52252cd5 Fix previous misedits in MSVC complex dot and fix MSVC macros for complex division 2025-12-19 01:09:10 +01:00
Martin Kroeker 5aff62eb96 Merge pull request #5572 from martin-frbg/issue5562-2
Fix cut-n-paste error introduced into the f2c-converted LAPACK with PR 5567
2025-12-16 10:08:34 +01:00
Martin Kroeker e155bc0061 Merge pull request #5571 from mattip/issue5570
fix regression due to adding bgemv interfaces
2025-12-15 23:52:41 +01:00
Martin Kroeker e1d2411545 Fix cut-n-paste error introduced with previous fix for zdotc/zdotu 2025-12-15 22:46:15 +01:00
mattip cbecf98308 fix regression due to adding bgemv interfaces 2025-12-15 21:49:14 +02:00
Martin Kroeker eb098f67d3 Revert "[WIP,Testing] remove the lock around the thread shutdown function aga…"
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true, RISCV64_ZVL256B) (push) Canceled after 0s
This reverts commit ef6f97624b.
2025-12-13 23:49:46 +01:00
Martin Kroeker 9023e76a77 Merge pull request #5556 from mayeut/fork-bug
fix: deadlock in exec_blas_async after fork
2025-12-13 23:49:09 +01:00
Martin Kroeker 486d150662 Merge pull request #5567 from martin-frbg/issue5562
Fix MSVC versions of inline functions in the f2c-converted LAPACK
2025-12-12 23:26:39 +01:00
Martin Kroeker 4dbbdcaeb4 Merge branch 'OpenMathLib:develop' into issue5562 2025-12-12 20:07:04 +01:00
Martin Kroeker 5d68b8fc58 Merge pull request #5568 from martin-frbg/azureosx14
AzureCI: Update deprecated macos-13 instances to macos-14
2025-12-12 20:06:43 +01:00
Martin Kroeker a680c60a69 Update iPhoneOS SDK 2025-12-12 15:33:24 +01:00
Martin Kroeker e7ddd63234 list xcode platforms/sdks 2025-12-12 14:57:04 +01:00
Martin Kroeker 38882e0123 Update xcode sdks 2025-12-12 14:40:19 +01:00
Martin Kroeker 231d7c4397 Update xcode version for macos-14 2025-12-12 11:44:56 +01:00
Martin Kroeker 80a12ae824 Update deprecated macos-13 instances to macos-14 2025-12-12 10:14:17 +01:00
Martin Kroeker 938477683f Fix MSVC versions of the inline c/zdot function 2025-12-11 22:39:11 +01:00
Jameson Nash 1607a49cb9 build: fix rule for building dynamic files
Previously the architecture-specific dynamic files were relying on the
built-in rules alone.
2025-12-11 15:11:40 -05:00
Martin Kroeker e85efb8d86 remove za from clobber lists 2025-12-03 22:40:02 +01:00
Martin Kroeker 68ff451ecc Merge pull request #5558 from ErnstPeng/fix-LA
Fix floating point registers ld/st bug of Loongarch
2025-12-03 16:02:06 +01:00
pengxu f6533ccea0 Fix floating point registers ld/st bug of Loongarch 2025-12-03 10:52:59 +08:00
mayeut 396137ff27 revert locks introduced in #5170 2025-11-30 07:27:24 +01:00
mayeut 7750d507ff chore: add test case for exec_blas_async after fork
most functions are using exec_blas but dgetrf  uses exec_blas_async directly and the behavior after fork is not the same. It's currently deadlocking.
2025-11-29 22:55:25 +01:00
Martin Kroeker 825d3ad12e AppleClang does not define feature local_streaming 2025-11-28 23:54:16 +01:00
h-motoki 5f0735832b fix param.h: turn [sd]gemm_default_[pqr] parameters for a64fx 2025-11-28 13:27:23 +09:00
Martin Kroeker c3c857c95e fix sequence 2025-11-24 22:38:49 +01:00
Martin Kroeker 7ab8dc125d rework ARM64 SME dependency handling 2025-11-24 22:36:02 +01:00
Martin Kroeker 705259c344 remove redundant HAVE_SME 2025-11-24 22:30:36 +01:00
Martin Kroeker a683287006 rework for dynamic_arch 2025-11-24 22:24:06 +01:00
Martin Kroeker b185c9a4ce small fixes for separating sme and dummy parts 2025-11-24 22:22:14 +01:00
Martin Kroeker 4af187080a Only add dedicated VORTEXM4 if building with LLVM 2025-11-24 22:15:45 +01:00
Martin Kroeker b0bd49a064 Add compiler guard around the M4 HAVE_SME property 2025-11-24 22:07:38 +01:00
Martin Kroeker 7e44f62a09 fix sequence of arm64 sgemm_direct_performance and sgemm_direct_ab 2025-11-24 22:02:34 +01:00
Anna Mayne 8da0a1fb9c Updated SGEMV ramps. 2025-11-24 14:43:43 +00:00
Martin Kroeker 7d35bf61ba Add cpuid for Apple M5 (from a PR to the archspec project) 2025-11-24 08:21:37 +01:00
Martin Kroeker 8c0b13c41c Merge branch 'OpenMathLib:develop' into issue5414 2025-11-23 23:12:49 +01:00
Martin Kroeker d6b25c43c6 Merge pull request #5542 from abhishek-iitmadras/abhishek_new_tt_a64fx
[A64FX]: add tt for a64fx dot
2025-11-23 22:55:51 +01:00
Martin Kroeker 5b79d01424 Merge pull request #5434 from ywwry66/mixed_openmp_warning
CMake: Demote the OpenMP mixed linkage check to NOTICE
2025-11-23 21:25:28 +01:00
Martin Kroeker 9c0965b884 Merge branch 'OpenMathLib:develop' into issue5414 2025-11-23 19:45:53 +01:00
Martin Kroeker 48e33f23e8 Merge pull request #5543 from ayappanec/AIX-compiler-checks
Skip C and Fortran compiler combination checks in AIX if NO_FORTRAN or ONLY_CBLAS is set
2025-11-23 19:16:12 +01:00
Martin Kroeker 7cef9524f7 Merge pull request #5550 from martin-frbg/flangppc
Fix PPC compilation with flang and gmake
2025-11-23 18:01:39 +01:00
Martin Kroeker 88c1899b88 Merge pull request #5549 from mayeut/warn-bfloat16
fix(warning): taking the absolute value of 'bfloat16' has no effect
2025-11-23 17:53:38 +01:00
Martin Kroeker ea85b6696f Merge branch 'OpenMathLib:develop' into issue5414 2025-11-23 10:14:07 +01:00
Martin Kroeker 0d5bf7b760 flang does not understand -frecursive 2025-11-23 10:09:43 +01:00
Martin Kroeker 93d0d195a0 Merge pull request #5547 from martin-frbg/oryon_cachesizes
Report proper cache sizes for Qualcomm Oryon in WoA
2025-11-23 10:06:27 +01:00
mayeut c5e1967ddb fix(warning): taking the absolute value of 'bfloat16' has no effect
The compinv function is invalid when building for BFLOAT16 and leads to the following warning:
`taking the absolute value of unsigned type 'bfloat16' (aka 'unsigned short') has no effect`.
Update pre-processor conditions to remove its definition when building for BFLOAT16.
2025-11-23 09:40:04 +01:00
Martin Kroeker 58ee3c0761 Merge pull request #5544 from mayeut/rpcc-aarch64
fix: rpcc on linux aarch64
2025-11-22 22:28:44 +01:00
mayeut 4867c421ed ci: add build with clang on ppc64le 2025-11-22 20:14:55 +01:00
Martin Kroeker fa0403bd17 Report proper cache sizes for Qualcomm Oryon in WoA 2025-11-22 18:46:44 +01:00
Martin Kroeker 29fab2b912 Merge pull request #5546 from martin-frbg/issue5545
Fix compilation of the PPC SBGEMM kernels with LLVM
2025-11-22 17:36:15 +01:00
Martin Kroeker f7b7296bff Fix compilation with LLVM 2025-11-22 16:07:34 +01:00
mayeut a367f5f58b fix: rpcc on linux aarch64
The inline assembly code seems ill-formed and gcc/clang are not generating the same thing.
This also removes hundreds of `warning: value size does not match register size specified by the constraint and modifier` when building with clang.
2025-11-22 09:40:18 +01:00
Ayappan Perumal 64b9600724 Skip C and Fortran compiler combination checks in AIX if NO_FORTRAN or ONLY_CBLAS is set 2025-11-21 03:17:00 -06:00
Abhishek Kumar a14caf464f add tt for a64fx dot
Signed-off-by: Abhishek Kumar <abhishek.r.kumar@fujitsu.com>
2025-11-20 12:14:17 +05:30
Martin Kroeker 28eeef5bbe Merge pull request #5538 from CheryDan/riscv/rot
Optimize ZROT_RVV for the unit-stride case (inc_x = inc_y = 1)
2025-11-19 07:33:08 +01:00
Martin Kroeker a51a1b8e1f Merge pull request #5540 from Thyre/support-flang-new-integer-8
Makefile: Recognize `-fdefault-integer-8` for LLVMs flang
2025-11-19 00:13:31 +01:00
Martin Kroeker 17f2e94260 Merge pull request #5539 from FRosner/arm64-dot-kernel-refactoring
Refactoring: ARM64 dot Kernel: don't call num_cpu_avail twice
2025-11-18 23:25:51 +01:00
Martin Kroeker 75ceb6c69f Merge pull request #5536 from mayeut/clang-sve
fix: dot_kernel_sve "n" usage & clobber list
2025-11-18 22:04:13 +01:00
Jan André Reuter ccef6ccde7 Recognize -fdefault-integer-8 for LLVMs flang
Signed-off-by: Jan André Reuter <jan@zyten.de>
2025-11-18 19:19:15 +01:00
Frank Rosner 762ed66c72 Refactoring: ARM64 dot Kernel: don't call num_cpu_avail twice 2025-11-18 15:34:51 +01:00
daichengrong 98a8230dee Optimize ZROT_RVV for the unit-stride case (inc_x = inc_y = 1) 2025-11-18 17:34:27 +08:00
mayeut 39d5e44723 fix: dot_kernel_sve "n" usage & clobber list 2025-11-17 21:53:51 +01:00
Bart Oldeman 71c6016206 Fix f_check detection of LLVM 21 flang
The check for GCC is confused by the GNU-stack in

```
	.file	"FIRModule"
	.text
	.globl	zhoge_
	.p2align	4
	.type	zhoge_,@function
zhoge_:
	xorps	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	retq
.Lfunc_end0:
	.size	zhoge_, .Lfunc_end0-zhoge_

	.ident	"flang version 21.1.5"
	.section	".note.GNU-stack","",@progbits
```

And displays:
```
./f_check: line 102: [: 	: integer expression expected
```

Since it expects a string with GCC anyway, better to only match
GCC and not GNU.
2025-11-15 16:06:38 +00:00
Martin Kroeker f6df9bebbb Merge pull request #5533 from martin-frbg/azure-osxgcc
AzureCI: Update the obsolete OSX x86_64 gcc12 job to gcc15
2025-11-08 15:31:53 +01:00
Martin Kroeker aa7e9abf52 Merge pull request #5531 from martin-frbg/issue5510
Fix CYGWIN builds that use CMake
2025-11-07 15:15:23 +01:00
Martin Kroeker bbb87aa5c2 Update OSX gcc12 job to gcc15 2025-11-07 14:51:52 +01:00
Martin Kroeker f00c0d0827 CYGWIN builds currently require blas_server_win32 2025-11-07 12:20:31 +01:00
Martin Kroeker 8a0b97e0d3 CYGWIN needs to be named OS_CYGWIN_NT in config.h 2025-11-07 12:18:22 +01:00
Martin Kroeker f2d010de12 Merge pull request #5512 from quic/topic/ssyrk_direct_sme1
Support for SME1 based ssyrk_direct kernel for cblas_ssyrk level 3 API
2025-11-06 14:06:43 -08:00
Martin Kroeker 65af1b1401 Merge pull request #5530 from martin-frbg/riscv_sbgemmCI
CI: Add back the SBGEMM/SBGEMV tests on RISCV64_ZVL256B
2025-11-06 08:06:25 -08:00
Martin Kroeker 7bdb3ac720 Add back the SBGEMM/SBGEMV tests 2025-11-06 14:38:20 +01:00
Martin Kroeker 123c25c748 Merge pull request #5527 from ChipKerchner/fixbfloat16Tobf16conversions
Prevent possible conversion from bfloat16 to __bf16 - RISC-V
2025-11-06 03:17:58 -08:00
Chip Kerchner 00a7336fc9 Missing one gemv conversion. 2025-11-04 22:27:53 +00:00
Chip Kerchner edf2e5900c Prevent possible conversion from bfloat16 to __bf16. 2025-11-04 21:00:37 +00:00
Chip Kerchner 7ca689b54f Merge remote-tracking branch 'refs/remotes/origin/develop' into develop 2025-11-04 13:55:15 +00:00
Martin Kroeker 8882409131 Merge branch 'OpenMathLib:develop' into issue5493 2025-11-04 03:54:28 -08:00
Martin Kroeker 3a9da520d5 RISCV64-CI: don't rely on dependency resolution for qemu-user (#5506)
* install current qemu as the Ubuntu package is too old
* add shgemm and bgemm tests for zvl256b target - curiously, sbgemm&sbgemv tests fail in this configuration
2025-11-04 12:18:24 +01:00
Chip Kerchner 93e89c09be Merge remote-tracking branch 'refs/remotes/origin/develop' into develop 2025-11-03 23:19:59 +00:00
Martin Kroeker 92fe96b460 fix processing of lapacke.h 2025-11-02 13:17:31 -08:00
Martin Kroeker 9c8626d73a Merge pull request #5522 from Smilyf/bugfix/issue-5521
Fix #5521: add @SUFFIX64@ in OpenBLASConfig.cmake.in
2025-11-02 03:00:04 -08:00
Martin Kroeker 2e7c667c11 Merge pull request #5526 from martin-frbg/fixcirrusxcode
Update Xcode version in Cirrus CI
2025-11-02 02:59:15 -08:00
Martin Kroeker 2b745f816d Update Xcode SDK versions as well 2025-11-02 10:01:46 +01:00
Martin Kroeker 716feb6704 Merge pull request #5525 from martin-frbg/issue5524
CMake: Fix missing support for HFLOAT16 in Windows dll generation
2025-11-02 01:58:36 -07:00
Martin Kroeker aa43496936 Update Xcode 2025-11-01 22:00:16 +01:00
Martin Kroeker 358c582ef9 Fix missing support for HFLOAT16 in Windows symbol renaming/dll generation 2025-11-01 19:27:56 +01:00
Yang Desheng 1da3b47163 Fix #5521: add @SUFFIX64@ in OpenBLASConfig.cmake.in 2025-11-01 20:42:48 +08:00
Martin Kroeker 18eb6a7f70 Merge pull request #5519 from martin-frbg/issue5517
Introduce a minimum problem size requirement for multithreading in the hermitian operations
2025-10-30 14:39:56 -07:00
Martin Kroeker ef6f97624b [WIP,Testing] remove the lock around the thread shutdown function again (#5479)
* remove the lock around the thread shutdown function - server is locked already here
2025-10-30 19:12:47 +01:00
Martin Kroeker 0c59ae0b45 Merge pull request #5453 from pratiklp00/dgemm_optimization
Dgemm loop unroll and 4x1, 4x2 dgemv VSX implementation for power10.
2025-10-28 16:51:41 -07:00
Martin Kroeker c1c1285236 Add lower limit for multithreading 2025-10-28 09:40:24 +01:00
Martin Kroeker 8e44cde3f6 Add lower limit for multithreading 2025-10-28 09:39:16 +01:00
Martin Kroeker 75b3e110c4 Add lower limit for multithreading 2025-10-28 09:34:45 +01:00
Martin Kroeker c5b0d1efd1 Add lower limit for multithreading 2025-10-28 09:33:32 +01:00
Martin Kroeker 585e6d0680 Merge pull request #5515 from iha-taisei/feature/ger_unroll
Improve single-thread performance of [SD]GER on A64FX and Neoverse V1
2025-10-24 08:17:06 -07:00
Martin Kroeker 677424ad55 Merge pull request #5516 from OpenMathLib/revert-4741-Pthread_Scalability_Improvement
Revert "Enhancing Core Utilization in BLAS Calls: A Scalable Architecture"
2025-10-23 08:04:17 -07:00
Martin Kroeker 43d0803949 Merge pull request #5513 from yuyichao/arm-fix
More arm compilation fix
2025-10-23 04:36:50 -07:00
Martin Kroeker b2b9abc20b Revert "Enhancing Core Utilization in BLAS Calls: A Scalable Architecture"
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, RISCV64_ZVL256B) (push) Canceled after 0s
2025-10-22 15:44:43 +02:00
Iha, Taisei cb66aca707 Improve single-thread performance of [SD]GER on A64FX and Neoverse V1 2025-10-22 19:56:14 +09:00
Yichao Yu 3d19d3b60a Make dummy function have the same linkage as the real one 2025-10-20 12:42:39 -04:00
changjua 43d38d336f Support for SME1 based ssyrk_direct kernel for cblas_ssyrk level 3 API 2025-10-20 11:35:20 +08:00
Martin Kroeker 682f61e8b8 Add prototype for gotoblas_corename 2025-10-19 14:37:39 -07:00
Martin Kroeker 83d3e0ed1a fix copy/paste 2025-10-19 14:16:46 -07:00
Martin Kroeker 1b591ea4ed export HAVE_SME setting and exclude VortexM4 from DYNAMIC_ARCH if gcc-compiled 2025-10-19 13:49:26 -07:00
Martin Kroeker f4ee3aec88 Allow VortexM4 on the SME fast path only with non-gcc compilers 2025-10-19 13:43:11 -07:00
Martin Kroeker e01b1094de Allow VortexM4 on the same fast path only with non-gcc compilers 2025-10-19 13:42:17 -07:00
Martin Kroeker 643a0b53b0 Allow VortexM4 on the direct_SME fast path only for clang-based compilers 2025-10-19 13:37:38 -07:00
Martin Kroeker d7b0fccbb4 Enable SME-based kernels for VortexM4 with clang-based compilers only 2025-10-19 13:34:26 -07:00
Martin Kroeker 2346d0bdc4 Add HAVE_SME for VortexM4 only with non-gcc compilers 2025-10-19 13:32:54 -07:00
Martin Kroeker 8211db6203 Don't enable SME for VortexM4 when the compiler is gcc (which does not support it w/out SVE) 2025-10-19 13:31:30 -07:00
Martin Kroeker aef36a3ff0 Merge pull request #5509 from martin-frbg/cmake_riscv
CMake: Add default compiler options for RISCV
2025-10-17 11:36:24 -07:00
Martin Kroeker 016e2f14e2 Merge pull request #5499 from martin-frbg/issue5497
Add test for SHGEMM
2025-10-17 08:23:56 -07:00
Martin Kroeker 4c1741d814 Add compiler options for RISCV 2025-10-17 08:06:00 -07:00
Martin Kroeker c35b11a86b Merge pull request #5501 from martin-frbg/azure_timeouts
AzureCI: Use DYNAMIC_LIST for OSX builds that time out; try to speed up mingw32
2025-10-17 08:04:23 -07:00
Martin Kroeker 098a8d5865 Merge branch 'OpenMathLib:develop' into issue5497 2025-10-16 15:22:11 -07:00
Martin Kroeker f3cecbebe7 Merge pull request #5508 from martin-frbg/cmake_hfloat
Fix CMake compilation of BGEMM and SHGEMV kernels
2025-10-16 15:21:22 -07:00
Martin Kroeker 5b640b1cbc add bgemm_thread_xx 2025-10-16 10:03:04 -07:00
Martin Kroeker a9a152ebc7 fix bgemv build 2025-10-16 10:00:41 -07:00
Martin Kroeker a387217a07 Add BGEMV 2025-10-16 05:02:24 -07:00
Martin Kroeker c92bac1524 Add SHGEMV 2025-10-16 04:57:18 -07:00
Martin Kroeker c0b2772288 move L2 HFLOAT16 kernels out of the BFLOAT16 block 2025-10-16 13:53:14 +02:00
Martin Kroeker ee6aa89fb0 Add BFLOAT16 and HFLOAT16 tests 2025-10-16 03:56:43 -07:00
Martin Kroeker 3d5010bf37 Fix test for pre/postfix 2025-10-16 11:35:27 +02:00
Martin Kroeker 887f4f32ed Merge branch 'OpenMathLib:develop' into issue5497 2025-10-15 14:01:13 -07:00
Martin Kroeker 19be504cd0 Add tests varying alpha and beta 2025-10-15 14:00:58 -07:00
Martin Kroeker 96f34621fb Add symbol pre- and/or postfixes to lapack.h and lapacke.h 2025-10-15 09:02:18 -07:00
Martin Kroeker 05adb52353 copypaste fix 2025-10-15 00:29:26 +02:00
pratiklp00 6637352260 remmove spacing 2025-10-14 00:06:04 -05:00
Martin Kroeker 87470a3b18 remove unused definitions 2025-10-12 14:21:33 -07:00
Martin Kroeker d539685c49 rewrite lapacke headers with pre/postfixes if necessary 2025-10-12 14:04:34 -07:00
Martin Kroeker 9bfc3612f9 Merge branch 'OpenMathLib:develop' into issue5414 2025-10-12 09:18:06 -07:00
Martin Kroeker b6d5057493 Merge pull request #5482 from yuyichao/arm-fix
Fix compilation on ARM
2025-10-12 09:16:20 -07:00
Yichao Yu b94e9b92ad Fix compilation on ARM
Define a dummy function if SME is not supported, following what sgemm does
2025-10-11 20:28:59 -04:00
Martin Kroeker e40714cabd Merge pull request #5450 from quic/topic/strmm_direct_sme1
Support for SME1 based strmm_direct kernel for cblas_strmm level 3 API
2025-10-11 15:20:19 -07:00
Martin Kroeker ffd2e47995 drop LAPACK from slow mingw build 2025-10-11 14:17:05 +02:00
Martin KroekerandChristopher Sidebottom a5fda2e2c3 fix missed bfloat/hfloat edit
Co-authored-by: Christopher Sidebottom <chris.sidebottom@arm.com>
2025-10-10 23:38:43 +02:00
Martin Kroeker cb48a52d42 fix accidental indentation 2025-10-10 23:24:13 +02:00
Martin Kroeker 476677568b Merge pull request #5495 from pcc/fix-cross
Fix cross compilation for x86 targets from non-x86
2025-10-10 11:51:21 -07:00
Martin Kroeker 5ba2b9e138 Merge pull request #5500 from martin-frbg/issue5498
fix misnaming of NVHPC as NVC in ARM64 compiler option selection
2025-10-10 07:41:10 -07:00
Martin Kroeker 5b18a3f08a fix copy/paste error 2025-10-10 16:39:28 +02:00
Martin Kroeker e9a4553a1a Use DYNAMIC_LIST for OSX builds that time out; try speeding up mingw build 2025-10-10 14:55:17 +02:00
Martin Kroeker fba2014239 remove spurious POSIX define 2025-10-10 14:36:33 +02:00
Martin Kroeker d5870f2628 Merge pull request #5496 from martin-frbg/riscv-qemu2
Remove C11 requirement for tests and ensure qemu is installed in the RISCV64 CI job
2025-10-10 05:20:52 -07:00
Martin Kroeker 5c89e4c770 remove the stricted build flags 2025-10-10 11:09:56 +02:00
Martin Kroeker 4291fa2f7a fix misnaming of NVHPC as NVC in ARM64 compiler option selection 2025-10-10 10:51:07 +02:00
Martin Kroeker 09c18779bb Add test for SHGEMM 2025-10-10 01:40:28 -07:00
changjua 644ea07ef9 Support for SME1 based strmm_direct kernel for cblas_strmm level 3 API 2025-10-10 10:48:27 +08:00
Martin Kroeker f6b0d48a39 Add BUILD_BFLOAT16/HFLOAT16 for RISCV_ZVL256B target 2025-10-09 12:42:36 +02:00
Martin Kroeker de004136cd Update riscv64_vector.yml 2025-10-09 12:27:07 +02:00
Martin Kroeker acff97cef1 Ensure qemu is installed for running the tests 2025-10-09 12:04:14 +02:00
pratiklp00 e2399be6d2 add macro 2025-10-08 23:24:41 -05:00
Peter Collingbourne 6f3691a84b Fix cross compilation for x86 targets from non-x86
When building on a non-x86 host the Makefile definitions for HAVE_* are
never printed which leads to build failures and/or silently targeting the
wrong microarchitecture. The issue is that INTEL_AMD is defined if the
host architecture is x86, but for cross builds we need to test whether
the target is x86. Test for that using the macro FORCE_INTEL.
2025-10-08 13:22:06 -07:00
Martin Kroeker 4ac29b9a77 Merge pull request #5492 from ChipKerchner/activateSHGEMV
Tie in SHGEMV for RISC-V.
2025-10-08 11:51:52 -07:00
Chip Kerchner 03a83778bb Tie in SHGEMV for RISC-V. 2025-10-08 14:08:29 +00:00
Chip Kerchner ac1604b40c Merge remote-tracking branch 'refs/remotes/origin/develop' into develop 2025-10-08 13:46:10 +00:00
Martin Kroeker 47a66aef0f Update limits based on benchmarking the SME code on Apple M4 2025-10-08 14:36:17 +02:00
Martin Kroeker 20f5ed1a94 Merge branch 'OpenMathLib:develop' into issue5414 2025-10-08 05:27:28 -07:00
Martin Kroeker c3ce473ab2 Merge pull request #5491 from martin-frbg/fixup5485
Rework definitions of ?FLOAT16_GEMM_GEMV_FORWARD to avoid undefined behavior
2025-10-08 05:26:28 -07:00
Martin Kroeker 49eca84eaf Merge pull request #5478 from martin-frbg/issue5477
Change all aligned moves in x86_64 MIN/MAX to unaligned
2025-10-08 02:46:00 -07:00
Martin Kroeker fa912ce852 rework definitions of ?FLOAT16_GEMM_GEMV_FORWARD 2025-10-08 11:11:52 +02:00
Martin Kroeker 7af2225354 Merge pull request #5490 from martin-frbg/issue5489
fix unspecified array size in DGEMV clobber list on POWER10
2025-10-08 01:03:47 -07:00
Martin Kroeker 46fc6c0794 fix unspecified array size in clobber list 2025-10-08 08:23:24 +02:00
Martin Kroeker 064751ee65 Merge pull request #5481 from ChipKerchner/vectorSBGEMV
Add SBGEMV and SHGEMV routines to RISC-V
2025-10-07 13:31:03 -07:00
Chip Kerchner ba143f3288 Merge remote-tracking branch 'refs/remotes/origin/develop' into develop 2025-10-07 19:01:11 +00:00
Martin Kroeker de43ccc566 Merge pull request #5485 from Mousius/shgemv-infra
Add Infrastructure for SHGEMV
2025-10-07 11:17:36 -07:00
Chip Kerchner f552040c5d Fix stride issue. 2025-10-07 17:17:18 +00:00
Chris Sidebottom 37fc3bbca0 Add Infrastructure for SHGEMV
This adds all the relevant bits and pieces to add a `shgemv` path as
well as a future `hgemm`/`hgemv` path in a similar model to `sb` and `b`
interfaces.

I've also fixed a few bits and pieces around `shgemm` which didn't build
in a few situations.
2025-10-07 15:03:24 +00:00
Martin Kroeker 8918247207 Merge pull request #5483 from Mousius/bgemm-correctness
Fix bf16->f32 conversion for NEOVERSEV1 and NEOVERSEN2 targets
2025-10-07 07:55:17 -07:00
Martin Kroeker 106fabcd40 Merge pull request #5484 from martin-frbg/cirrusbsd_upd
Cirrus CI: Update FreeBSD instances to 14.3
2025-10-07 07:27:42 -07:00
Chip Kerchner aecb7f9537 Change signature of SBGEMV. 2025-10-07 13:14:20 +00:00
Martin Kroeker db9e7ac224 Update FreeBSD instances to 14.3 2025-10-07 13:55:35 +02:00
Chris Sidebottom 958f721e36 Beta fix for generic gemv T 2025-10-07 10:01:12 +00:00
Chris Sidebottom 578e7dae85 Fix bf16->f32 conversion for NEOVERSEV1 and NEOVERSEN2 targets
This fixes an issue originally introduced with the BGEMM kernel.

I've updated the tests to run with `beta=1.0` so as to test loading and
updating from C.

Alongside this, the tests now return sensible return values to reduce
the risk of them being ignored.

Also fixed a bug in `generic/gemv_t.c` resulting in weird outputs for
`bgemv`.
2025-10-06 18:05:58 +00:00
Chip Kerchner 809e1cba8f Better FP16 vectorized GEMV - 20% faster. 2025-10-06 13:19:03 +00:00
Chip Kerchner e07a9ae418 Merge branch 'develop' into vectorSBGEMV 2025-10-03 17:13:29 +00:00
Chip Kerchner 1eafda12ad Merge branch 'develop' of https://github.com/OpenMathLib/OpenBLAS into develop 2025-10-03 17:12:56 +00:00
Chip Kerchner 588f0e87cc Add SBGEMV and SHGEMV routines to RISC-V. 2025-10-03 17:09:16 +00:00
Martin Kroeker c889558317 Rework for DYNAMIC_ARCH use and use of SGEMM functions by SSYMM 2025-10-02 07:39:24 -07:00
Martin Kroeker 4ae3e37b45 restore 2VLx2VL naming 2025-10-02 07:35:30 -07:00
Martin Kroeker b3d0bc40e9 Update Makefile.L3 2025-10-02 05:13:58 -07:00
Martin Kroeker ba9d2d29f3 remove sme from M4 Fortran flags as gfortran couples it with sve 2025-10-02 05:11:34 -07:00
Martin Kroeker b48a089d75 Change all aligned moves to unaligned 2025-10-01 23:36:48 +02:00
Martin Kroeker fc516af155 Merge branch 'develop' into issue5414 2025-10-01 14:12:59 -07:00
Martin Kroeker e939c6c315 Merge pull request #5471 from quic/topic/ssymm_direct_sme1
Support for SME1 based ssymm_direct kernel for cblas_ssymm level 3 API
2025-10-01 06:22:36 -07:00
Martin Kroeker 03c8d1010f Merge pull request #5476 from ChipKerchner/fasterGEMVNRISCV
Tranverse matrix data in a cache friendly manner for GEMV_N (RISCV)
2025-10-01 00:38:36 -07:00
Martin Kroeker 3eed1883cd Merge pull request #5475 from martin-frbg/issue5424
Fix Fortran compiler autodetection in the presence of compiler arguments
2025-09-30 15:45:59 -07:00
Chip Kerchner 36f9cb85b1 Fix pre-RVV 1.0. 2025-09-30 22:41:31 +00:00
Chip Kerchner 2d82d144e2 Tranverse matrix data in a cache friendly manner for GEMV_N (RISCV). 2025-09-30 21:22:10 +00:00
Chip Kerchner dd7a1d6d4d Merge branch 'develop' of https://github.com/OpenMathLib/OpenBLAS into develop 2025-09-30 20:16:19 +00:00
Martin Kroeker b7c8c5c190 Fix autodetection in the presence of compiler arguments 2025-09-30 21:29:24 +02:00
Martin Kroeker aaa5c377bc Merge pull request #5465 from ChipKerchner/addRVVVectorizedFP16Packing
Add vectorized packing for FP16 and BF16 for RISC-V.  Reactivate vector packing for FP64 transposed
2025-09-30 09:21:15 -07:00
Chris Marsh c1f607c43c fix -lto_library filtering for apple-clang + gfortran on sdk26 (#5474)
* ensure filter-out applies to subsequent sdk versions
2025-09-30 16:28:37 +02:00
Rajendra Prasad Matcha 19268471cc Support for SME1 based ssymm_direct kernel for cblas_ssymm level 3 API 2025-09-30 15:05:33 +05:30
Martin Kroeker 1dcd4cb6e9 Merge pull request #5472 from pratiklp00/fix_build_issue
Fix typos in Power10 kernel
2025-09-30 00:52:09 -07:00
Chip Kerchner 67ddda394e Merge branch 'develop' into addRVVVectorizedFP16Packing 2025-09-29 13:49:57 +00:00
pratiklp00 d7b11605d1 fix build issue 2025-09-29 02:02:13 -05:00
Martin Kroeker b27a1184fd Merge pull request #5468 from martin-frbg/issue5464
Fix CMake builds not passing the HFLOAT16 parameter to generated files
2025-09-27 14:05:31 -07:00
Martin Kroeker 4ef70b490c Add support for passing the HFLOAT16 option where required 2025-09-27 22:19:23 +02:00
Martin Kroeker b537dacb34 Merge pull request #5463 from sharkcz/ppc
fix typos in Power8 routines
2025-09-27 04:29:15 -07:00
Dan Horák f5ec1c4e53 fix typos in Power8 routines
Fixes: https://github.com/OpenMathLib/OpenBLAS/pull/5448
2025-09-26 16:54:03 +02:00
Dan Horák 681af71d95 drop gcc 15 workaround
As the assembler routines has correctly specified parameter we can drop
the previously applied workaround in https://github.com/OpenMathLib/OpenBLAS/pull/5409.
2025-09-26 16:52:17 +02:00
Chip Kerchner 07d0e742c2 Add vectorized packing for FP16 and BF16. Reactivate vector packing for FP64 transposed. 2025-09-26 14:50:38 +00:00
Martin Kroeker e58f6dc50d Add extensions ?GEMM_BATCH_STRIDED and CBLAS_?GEMM_BATCH_STRIDED (#5458)
* Add ?GEMM_BATCH_STRIDED and CBLAS_?GEMM_BATCH_STRIDED
2025-09-26 14:00:47 +02:00
Martin Kroeker c92f7f6bb2 Merge pull request #5448 from martin-frbg/issue5372-2
Fix clobber list entries for arrays in POWER kernels that use inline asm
2025-09-26 02:24:50 -07:00
Martin Kroeker 65c626e646 Merge pull request #5456 from ChipKerchner/riscv-bf16-fix
Disable bf16 flags on RISC-V unless BUILD_BFLOAT16=1
2025-09-26 00:09:33 -07:00
Martin Kroeker f2304af1d3 Merge pull request #5462 from martin-frbg/issue5460
Use generic kernels for SCAL on POWER4/POWER5 to fix corner cases of Inf/NAN
2025-09-25 22:41:43 -07:00
Martin Kroeker 2852171d4f Merge pull request #5461 from martin-frbg/applemlinux
Fix Apple M cpu identification under Linux
2025-09-25 14:10:22 -07:00
Martin Kroeker 916a47409c Merge pull request #5455 from martin-frbg/lapack1158
Rescale Infinity input in CSRSCL/ZDRSCL early to avoid infinite loop later (Reference-LAPACK PR 1158)
2025-09-25 12:48:23 -07:00
Martin Kroeker 14c9dcaac7 Use generic kernels for SCAL to fix corner cases of Inf/NAN 2025-09-25 20:31:12 +02:00
Martin Kroeker 6798aec462 Any Apple cpu running Linux has to be Vortex 2025-09-25 20:26:47 +02:00
Martin Kroeker 7989caabdc Merge pull request #5449 from OpenMathLib/gemm_batch
[WIP] Add BLAS interface to ?GEMM_BATCH to complement the CBLAS one
2025-09-24 02:42:08 -07:00
Chip Kerchner fc7d6e65a1 Change BF16 warning message. 2025-09-23 20:26:44 +00:00
Chip Kerchner 9427eaf4c4 Reduce flags for BF16 to only needed ones. 2025-09-23 20:24:40 +00:00
Chip Kerchner 3116749717 Disable bf16 flags on RISC-V unless BUILD_BFLOAT16=1 2025-09-23 15:02:20 +00:00
Martin Kroeker 99c077a3a7 Update gemm_batch.c
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, RISCV64_ZVL256B) (push) Canceled after 0s
2025-09-23 15:43:33 +02:00
Martin Kroeker fe5402d82b Merge pull request #5454 from ChipKerchner/addRISCV64_BFLOAT16
Add support for BF16 sbgemm on RISCV.
2025-09-23 01:02:50 -07:00
Martin Kroeker 5a8f9aa8fc Remove LABAD (Reference-LAPACK PR 805) and fix infinite loop scaling Inf (PR 1158) 2025-09-22 13:27:59 -07:00
Chip Kerchner 92f09a6a98 Add BF16 sbgemm on RISCV. 2025-09-22 14:32:43 +00:00
pratiklp00 16be28af7c dgemm loop unroll and 4x1 4x2 dgemv implimentation 2025-09-21 23:00:21 -05:00
Martin Kroeker fc042d928b fix symbol naming (underscoring) 2025-09-21 19:01:11 +02:00
Martin Kroeker e5c836136d Merge pull request #5451 from ChipKerchner/fixRVVSHGEMM
Fix _Float16 casting issue and reduce LMUL for certain vector instruction from m2 to m1.
2025-09-20 03:07:14 -07:00
Chip Kerchner a4abf7828e Fix _Float16 casting issue and reduce LMUL for certain vector instruction from m2 to m1. 2025-09-18 21:30:22 +00:00
Martin Kroeker cdeac0a3ae Build non-CBLAS ?gemm_batch too 2025-09-17 11:42:11 -07:00
Martin Kroeker eb931deb22 Add BLAS interface to ?GEMM_BATCH 2025-09-17 10:23:48 -07:00
Martin Kroeker 1d5279fd29 Fix clobber list entries for arrays in inline asm 2025-09-17 07:02:18 -07:00
Martin Kroeker 79a1f38770 Merge pull request #5445 from Dayuxiaoshui/develop
Add RVV vectorized optimization for omatcopy function on RISC-V64 architecture
2025-09-17 06:38:41 -07:00
Dayuxiaoshui becda2faa4 Merge branch 'develop' of https://github.com/Dayuxiaoshui/OpenBLAS into develop 2025-09-15 18:50:22 +08:00
Dayuxiaoshuiandgong-flying b61a2d7648 Clean up RISC-V RVV performance test files
Removed temporary test files and benchmarks created for omatcopy RVV optimization validation:
- Removed benchmark scripts and result files
- Removed test executables (scalar vs RVV comparison)
- Removed temporary test source files

Previous testing on sg2044 showed RVV implementation achieved ~30% performance improvement
over scalar version for 3000x4000 matrix operations (0.384s vs 0.552s per iteration).

Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn>
2025-09-15 18:49:23 +08:00
学习中的牛马 8b7e4c2b5c Merge branch 'OpenMathLib:develop' into develop 2025-09-15 12:08:17 +08:00
Dayuxiaoshui 2265318d3e Optimize RISC-V RVV omatcopy implementation with latest RVV API\n\nCo-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> 2025-09-15 11:46:50 +08:00
Martin Kroeker 43fdff7f14 Merge pull request #5444 from yuanjia111/develop
riscv:Remove  the manual unrolling in gemv_t_vector.c  to performance better
2025-09-12 23:58:13 -07:00
yuanjia 826cb4588f remove unused variable 2025-09-13 11:35:49 +08:00
yuanjia 53d7452cdf riscv: gemv_t_vector.c optimize 2025-09-13 11:24:49 +08:00
Dayuxiaoshuiandgong-flying bd45b82ed0 Optimize RISC-V RVV omatcopy_ct implementation with advanced vectorization
- Implement block-based memory access optimization (64x64 blocks)
- Add 4-way loop unrolling to reduce loop overhead
- Optimize VSETVL calls to improve vectorization efficiency
- Add software prefetching for better memory access patterns
- Implement fast path for small matrices (<64x64)
- Add cross-compilation script for RISC-V testing
- Improve boundary handling with separate main/tail loops

Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn>
2025-09-11 20:01:39 +08:00
Dayuxiaoshuiandgong-flying 7aa183bb56 Fix OMATCOPY_CT correctness issues and optimize performance
- Fixed matrix initialization to use row-major order
- Fixed memory allocation size calculation for output matrix
- Optimized RVV simulation with 4-way loop unrolling
- All test cases now pass correctness verification
- Performance improvements: up to 1.26x speedup for alpha=1.0 case

Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn>
2025-09-11 19:29:31 +08:00
Dayuxiaoshuiandgong-flying 708d586599 Add OMATCOPY_CT performance test with RVV optimization
Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn>
2025-09-11 19:20:26 +08:00
Dayuxiaoshuiandgong-flying 2953c7d244 Add OMATCOPY_CT performance test with RVV optimization
- Created comprehensive performance test for omatcopy_ct function
- Added RVV vectorized implementation with conditional compilation
- Included build script for SG2044 server testing
- Support both scalar and RVV optimized versions
- Added throughput measurement and detailed performance metrics

Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn>
2025-09-11 13:29:18 +08:00
Martin Kroeker 2a95564500 Merge pull request #5442 from martin-frbg/pr5418
Make GEMM3M parameters available on 32bit X86-GENERIC
2025-09-10 15:24:12 -07:00
Martin Kroeker cb6c4392a5 Make GEMM3M parameters available on 32bit X86-GENERIC 2025-09-10 22:44:14 +02:00
Martin Kroeker a55535b01f Merge pull request #5441 from martin-frbg/fixup5431
Add message for fallback due to unavailable Zfh extension in RISCV DYNAMIC_ARCH
2025-09-10 03:42:00 -07:00
Martin Kroeker 66cc27e75f Add message for fallback due to unavailable Zfh extension 2025-09-10 10:57:02 +02:00
Martin Kroeker 5ab143736f Merge pull request #5431 from markdryan/markdryan/riscv-hf16-fix
disable fp16 flags on RISC-V unless BUILD_HFLOAT16=1
2025-09-09 14:51:47 -07:00
Martin Kroeker 2fee943edb Add CMake build support for IBM Z (#5440)
* Add ZARCH support, including DYNAMIC_ARCH
2025-09-09 22:18:51 +02:00
Martin Kroeker 90f6dd43c5 Merge pull request #5439 from martin-frbg/fixup5354
clean up duplicate assignment of cpus newer than POWER10
2025-09-08 13:10:29 -07:00
Martin Kroeker 7b1f9bedf8 clean up duplicate assignment of cpus newer than POWER10 2025-09-08 15:11:57 +02:00
Martin Kroeker e2f9f57433 Merge pull request #5432 from markdryan/markdyan/fix-rvv-detection
fix RVV 1.0 detection code
2025-09-05 13:40:23 -07:00
Martin Kroeker c31861ea62 Merge pull request #5435 from martin-frbg/update_rvv_ci
Update the riscv-collab llvm toolchain in CI to its latest nightly build
2025-09-02 14:11:16 -07:00
Martin Kroeker 57c2936a43 Merge branch 'OpenMathLib:develop' into update_rvv_ci 2025-09-02 12:09:30 -07:00
Martin Kroeker 6d070820fc Merge pull request #5436 from martin-frbg/update_osx_ci
Update Mac CI jobs as cmake is preinstalled in the runner images now
2025-09-02 12:09:09 -07:00
Martin Kroeker 1c7251ca20 remove the -llto_library option for any osx fortran compiler 2025-09-02 18:36:02 +02:00
Martin Kroeker a1331406a3 drop (re)installation of cmake on osx runners 2025-09-02 15:39:08 +02:00
Martin Kroeker c42fccccb5 Drop installation of cmake 2025-09-02 15:36:32 +02:00
Martin Kroeker 4c1a4e60a6 Update toolchain to its latest nightly build 2025-09-02 14:54:08 +02:00
Ruiyang Wu ed6c223105 CMake: Improve the wording of the OpenMP mixed linkage check 2025-09-01 22:33:52 -04:00
Ruiyang Wu fd8f0d4f8c CMake: Demote the OpenMP mixed linkage check to NOTICE 2025-09-01 22:33:24 -04:00
Mark Ryan 7fcad02dc2 fix RVV 1.0 detection code
There were a couple of issues with the detection code used to check
for RVV 1.0 on kernels that do not support hwprobe.

1. The vtype clobber was missing
2. The wrong form of vsetvli was being used. The vsetvli x0, x0 form
   is inappropriate for this use case as it can only be safely used
   in code where the value of vtype is known.  The use of vsetvli
   x0, x0 here can lead to a failure to detect RVV 1.0, if,
   for example, the vill bit happens to be set before
   detect_riscv64_rvv100 is called.

We fix both issues by adding the missing clobber and replacing the
first parameter to vsetvli with t0 (which we add to our clobbers).
2025-08-28 14:20:37 +00:00
Mark Ryan ce79fe12fd disable fp16 flags on RISC-V unless BUILD_HFLOAT16=1
The compiler options that enable 16 bit floating point instructions
should not be enabled by default when building the RISCV64_ZVL128B
and RISCV64_ZVL256B targets.  The zfh and zvfh extensions are not part
of the 'V' extension and are not required by any of the RVA profiles.
There's no guarantee that kernels built with zfh and zvfh will work
correctly on fully compliant RVA23U64 devices.

To fix the issue we only build the RISCV64_ZVL128B and RISCV64_ZVL256B
kernels with the half float flags if BUILD_HFLOAT16=1.  We also update
the RISC-V dynamic detection code to disable the RISCV64_ZVL128B and
RISCV64_ZVL256B kernels at runtime if we've built with DYNAMIC_ARCH=1
and BUILD_HFLOAT16=1 and are running on a device that does not support
both Zfh and Zvfh.

Fixes: https://github.com/OpenMathLib/OpenBLAS/issues/5428
2025-08-28 09:41:07 +00:00
Martin Kroeker 06c09deee9 Merge pull request #5426 from hideaki-motoki/issue5417_axpy_sve
Implementing SVE in `[SD]AXPY` Kernels for `A64FX` and `Graviton3E`
2025-08-26 01:10:14 -07:00
Martin Kroeker da7d0f4a38 Merge pull request #5427 from yuanjia111/develop
Optimize the gemv_t_vector.c  kernel  for  RISCV64_ZVL256B target
2025-08-25 06:45:44 -07:00
Martin Kroeker 2b5d8c789d remove debugging printout 2025-08-24 13:50:08 -07:00
Martin Kroeker 1b88c9c742 remove debugging printouts 2025-08-24 13:48:22 -07:00
Martin Kroeker b4fc09e9e1 Add registers d8 to d15 to clobber lists as the code does not expressly save them 2025-08-23 14:39:27 -07:00
Martin Kroeker 8e50b8d525 Add d8 to d15 to clobber lists as the code does not expressly save them 2025-08-23 14:36:49 -07:00
Martin Kroeker 7f89c6f353 smh-based direct sgemm currently requires leading dimensions to be same as matrix dimension 2025-08-23 14:20:15 -07:00
yuanjia c2cc7a3602 riscv64: optimize gemv_t_vector.c 2025-08-22 16:14:14 +08:00
h-motoki e23f9c6642 Merge remote-tracking branch 'upstream/develop' into issue5417_axpy_sve 2025-08-21 22:16:28 +09:00
Martin Kroeker b3f247ae5a Merge pull request #5425 from martin-frbg/fixup5389
Increase L2 defaults for RISCV X280 / ZVL256B and ARM SVE targets in CMake cross-compilation
2025-08-21 05:13:34 -07:00
h-motoki 855945befb Implementing SVE in [SD]AXPY Kernels for A64FX and Graviton3E 2025-08-21 20:56:58 +09:00
Martin Kroeker 7c1839899e Increase assumed L2 sizes for RISCV X280 / ZVL256B and for SVE-capable ARM64 2025-08-21 11:57:07 +02:00
Martin Kroeker 1ee8879c78 Add VORTEXM4 2025-08-20 09:59:32 -07:00
Martin Kroeker edaa73fd24 Hide the local 2VLx2VL symbol as static is insufficient for this with gcc 2025-08-20 06:33:28 -07:00
Martin Kroeker 501728a354 adjust register 20 accesses to 21 after moving x18 2025-08-20 06:24:38 -07:00
Martin Kroeker 107c883c8a Update SME-related kernels 2025-08-19 05:13:28 -07:00
Martin Kroeker 05dbb54362 Delete misplaced file 2025-08-19 05:12:09 -07:00
Martin Kroeker 4609732e69 Relax version number requirement for AppleClang 2025-08-18 14:54:20 -07:00
Martin Kroeker bf98e448eb Add VORTEXM4 to DYNAMIC_ARCH list 2025-08-18 14:43:08 -07:00
Martin Kroeker 0bc19a1335 Update SME kernel details 2025-08-18 14:38:16 -07:00
Martin Kroeker 426b5f23ed Add compiler options for VORTEXM4 2025-08-18 14:35:36 -07:00
Martin Kroeker 4328c91e27 relax requirements in compiler SME capability check 2025-08-18 14:34:51 -07:00
Martin Kroeker c794d0a4ce Add VORTEXM4 2025-08-18 14:33:24 -07:00
Martin Kroeker a4f5fec46e Add compiler options for VORTEXM4 2025-08-18 14:32:07 -07:00
Martin Kroeker ca542f319f Add VORTEXM4 2025-08-18 08:41:38 -07:00
Martin Kroeker 18f9582f3e Add VORTEXM4 2025-08-18 01:54:09 -07:00
Martin Kroeker 4e2a8c18e5 Split VORTEXM4 from VORTEX target due to SME support 2025-08-18 01:53:04 -07:00
Martin Kroeker 30970460b8 Add VORTEXM4 target 2025-08-18 01:52:05 -07:00
Martin Kroeker b0a00fbd62 Add minimal compiler flags for VORTEXM4 2025-08-18 01:51:10 -07:00
Martin Kroeker ccfd0170fb Enable SME on MacOS and add VORTEXM4 to DYNAMIC_ARCH list 2025-08-18 01:50:13 -07:00
Martin Kroeker ef0b883dff Add sgemm_direct_performant for ARM64 2025-08-18 01:48:08 -07:00
Martin Kroeker e76c39099a Add sgemm_direct_performant for ARM64 2025-08-18 01:47:17 -07:00
Martin Kroeker 202a7a0e2a Separate VORTEXM4 from VORTEX and ARMV9SME 2025-08-18 01:45:40 -07:00
Martin Kroeker de91afd2ae Move SGEMM_DIRECT after the CBLAS parameter check and add sgemm_direct_performant for ARM64 2025-08-18 01:44:21 -07:00
Martin Kroeker 0203657f40 Add sgemm_direct_performant for ARM64 2025-08-18 01:42:32 -07:00
Martin Kroeker e82bcd2740 Update ARM64 sgemm_direct object generation 2025-08-18 01:41:13 -07:00
Martin Kroeker 731f4dd686 Add VORTEXM4 settings 2025-08-18 01:39:35 -07:00
Martin Kroeker 53d3bb50cc Get symbol name from build system; change b.first to b.mi for AppleClang compatibility 2025-08-18 01:37:50 -07:00
Martin Kroeker 08a00326a4 Build symbol name from build system variables 2025-08-18 01:35:41 -07:00
Martin Kroeker 89898fc499 Add sgemm_direct_performant for switching between direct and regular kernels 2025-08-18 01:31:40 -07:00
Martin Kroeker 22c6607db9 Use ASMNAME to get symbol name from build system; leave x18 unused as reserved on MacOS 2025-08-18 01:30:10 -07:00
Martin Kroeker ca22e28ca1 Rename sgemm_direct_sme1.S to sgemm_direct_sme1_2VLx2VL.S 2025-08-18 01:25:44 -07:00
Martin Kroeker 9c43301b6d Merge pull request #5421 from reibax-marcus/develop
fix: broken cblas installation when using makefile based builds
2025-08-17 03:03:05 -07:00
Martin Kroeker 9d6df1dd3e Merge pull request #5422 from ChipKerchner/addRVVVectorizedPacking
Add and use vectorized packing in ZVL128B and ZVL256B for RISCV
2025-08-16 13:45:35 -07:00
Martin Kroeker f3b2a15fad Merge pull request #5420 from yuanjia111/develop
Move the value assignment of vector x in gemv_n_sve.c to the outermos…
2025-08-16 12:06:53 -07:00
Chip Kerchner 64401b4417 Disable vectorized packing for DGEMM - since it is slower than scalar. 2025-08-13 13:41:12 +00:00
Martin Kroeker 5e43ba948c Merge pull request #5419 from Mousius/bgemm-optimisation
Optimize SBGEMM / BGEMM for NEOVERSEV1 further
2025-08-13 02:10:20 -07:00
Chip Kerchner c00afc86a6 Add and use vectorized packing to ZVL128B and ZVL256B. Up to 3x+ faster than generic scalar functions. 2025-08-12 17:18:56 +00:00
Xabier Marquiegui 3a6b79c50f fix: broken cblas installation when using makefile based builds
Fix cblas.h missing from target directory if NO_CBLAS is defined but has
a value that indicates you do want cblas built and installed.
2025-08-12 14:41:15 +02:00
yuanjia 803e8d4838 Move the value assignment of vector x in gemv_n_sve.c to the outermost loop to reduce the repeated data retrieval.
1.Verify correctness using BLAS-Tester
    2.Using the built-in benchmark to verify performance, the performance of float and doule type improved by about 60% and about 40% respectively.The test command is:
     export OMP_NUM_THREADS=1;numactl -C 10 -l ./sgemv.goto 3000 4000 100
     export OMP_NUM_THREADS=1;numactl -C 10 -l ./dgemv.goto 3000 4000 100
2025-08-12 18:03:16 +08:00
Chris Sidebottom 5f47b872f1 Remove older kernels for BGEMM on NEOVERSEV1 2025-08-11 09:25:19 +00:00
Chris Sidebottom 114316f361 Optimize SBGEMM / BGEMM for NEOVERSEV1 further
This changes the kernels to pack full SVE vectors and reduces the
overall complexity of the inner GEMM loop.
2025-08-11 09:25:13 +00:00
Martin Kroeker 75c6ab4036 CI: Update WoA job to use LLVM 20.1.8 and avoid stray preinstalled LLVM19 (#5411)
* Update to 20.1.8

* fix PATH to avoid the obsolete LLVM19 that appeared in the preinstalled msvc folder hierarchy
2025-08-09 12:28:24 +02:00
Martin Kroeker 5c5f852ee3 Merge pull request #5415 from martin-frbg/Fixum-5399
Fix compilation of the NeoverseN2 SBGEMM kernel
2025-08-04 04:29:26 -07:00
Martin Kroeker f1ee61ea30 Include NEON header for the bfloat conversion functions 2025-08-04 00:21:39 -07:00
Martin Kroeker b3ffd5524a Include NEON header for the bfloat conversion functions 2025-08-04 00:20:28 -07:00
Martin Kroeker d23680b81d Merge pull request #5407 from nakagawa-fj/feature/gemm_divide_rate_for_neoversev1
Multi-thread Performance Improvement of GEMM on NeoverseV1 with DIVIDE_RATE=1
2025-07-30 13:19:50 -07:00
Martin Kroeker b4cc4be2ce Merge pull request #5410 from martin-frbg/issue5404
Adjust multithreading threshold in S/DGER and add an intermediate step
2025-07-30 12:16:05 -07:00
Martin Kroeker 0968dddf1a Merge pull request #5409 from martin-frbg/issue5372
Work around gcc15.1 on POWER misoptimizing DGEMV at -O3
2025-07-30 10:36:39 -07:00
Martin Kroeker eddfe1e6b3 Merge pull request #5408 from ChipKerchner/fixRISCV64GEMVInitializationAndWarnings
Fix bad vector zero initializer and other compiler warnings for RISC-V.
2025-07-30 08:43:08 -07:00
Martin Kroeker 30d11bc92c Adjust multithreading threshold and add an intermediate step 2025-07-30 08:13:33 -07:00
Martin Kroeker a3b9c933c5 mark xbuffer as volatile to work around gcc15.1 optimizer bug 2025-07-30 17:05:36 +02:00
Chip Kerchner 72f082f31d Fix bad vector zero initializer and other compiler warnings for RISC-V. 2025-07-30 14:04:43 +00:00
Masato Nakagawa 7e29f11396 Multi-thread GEMM Performance Improvement on NeoverseV1 (DIVIDE_RATE=1) 2025-07-29 18:54:36 +09:00
Martin Kroeker 9a64b32b44 Merge pull request #5406 from martin-frbg/fixbgemmtest
Fix building of bgemm tests on GEMM3M-capable (x86) targets
2025-07-28 23:17:29 -07:00
Martin Kroeker b66a01f909 Fix building of bgemm tests on GEMM3M-capable (x86) targets 2025-07-28 22:43:28 +02:00
Martin Kroeker a5e7c0e3e0 Merge pull request #5396 from abhishek-iitmadras/abhishekk_bfloat16
ARM64: Enable bfloat16 kernels by default
2025-07-28 13:39:08 -07:00
abhishek-fujitsu 6356190d06 fix gfortran link path in dynamic_arch.yml 2025-07-28 14:37:51 +05:30
abhishek-fujitsu 4c8dcb3a8f Darwin/arm64: disable SVE/SME and fix gfortran link path 2025-07-26 16:59:46 +05:30
Martin Kroeker 33b50548eb Merge pull request #5403 from martin-frbg/issue5402
Introduce a (crude) threshold to multithreading in STRMV/DTRMV
2025-07-25 20:10:47 +02:00
Martin Kroeker c504aedca1 Merge pull request #5400 from Mousius/neoversev2-target
Add NEOVERSEV2 target support
2025-07-25 15:47:06 +02:00
Martin Kroeker b9e107932a add NeoverseV2 2025-07-25 15:44:34 +02:00
Martin Kroeker 2f89a5970e fix NeoverseV2 typo 2025-07-25 15:43:37 +02:00
Martin Kroeker a9e8fa06bf Introduce a (crude) threshold to multithreading 2025-07-25 15:15:46 +02:00
Martin Kroeker b4c2b34a45 Merge pull request #5401 from martin-frbg/followup-5397
Include float-bfloat conversion functions in ONLY_CBLAS builds as well
2025-07-25 13:56:13 +02:00
Martin Kroeker c9204f7b6f Merge pull request #5399 from Mousius/bgemm-8x4
Add optimized BGEMM for NEOVERSEN2 target
2025-07-25 11:20:52 +02:00
Martin Kroeker a55e65dba9 Merge pull request #5391 from martin-frbg/issue5387
Use OpenBLAS_ROOT_DIR in OpenBLASConfig.cmake generation only if set
2025-07-25 09:28:46 +02:00
abhishek-fujitsu 0bc79da587 add neon header 2025-07-25 11:10:20 +05:30
abhishek-fujitsu 720a4743b9 update contribution list 2025-07-25 11:08:22 +05:30
abhishek-fujitsu 05fc88180c ARM64: Enable bfloat16 kernels by default 2025-07-25 11:08:22 +05:30
Martin Kroeker 965463f177 Include float-bfloat conversion functions in ONLY_CBLAS builds as well 2025-07-24 23:33:20 +02:00
Martin Kroeker 4272cf8c7f Merge pull request #5398 from martin-frbg/fixup-5394
Update ?GEMM-to-?GEMV forwarding settings for CMake
2025-07-24 23:29:39 +02:00
Chris Sidebottom 87247daadc Add NEOVERSEV2 target support
Did a quick run around to make `TARGET=NEVOERSEV2` build successfully.

Fixes #5385
2025-07-24 12:40:31 +01:00
Chris Sidebottom ea2faf0c9a Add optimized BGEMM for NEOVERSEN2 target
This re-uses the existing NEOVERSEN2 8x4 `sbgemm` kernel to implement `bgemm`.
2025-07-24 10:59:28 +00:00
Martin Kroeker a5b55f6fe3 remove CBLAS restriction on GEMM_GEMV forwarding 2025-07-24 09:30:58 +02:00
Martin Kroeker a4f4662459 Merge pull request #5397 from omegacoleman/fix-cblas-bgemm
Fix cmake building with cblas_bgemm
2025-07-24 09:28:25 +02:00
Martin Kroeker 82954ba4ca Update ?GEMM-to-?GEMV forwarding settings 2025-07-23 23:24:42 +02:00
Martin Kroeker 392d38168e Merge pull request #5394 from Mousius/optimize-bgemv
Optimized BGEMV for NEOVERSEV1 target
2025-07-23 23:13:44 +02:00
youcai 41f9701ebc Fix cmake building with cblas_bgemm 2025-07-23 22:10:53 +08:00
Martin Kroeker f4caa61e47 Merge pull request #5395 from martin-frbg/fixloongsonCI
Fix libffi6 download in the Loongarch64_clang CI job (for now)
2025-07-23 14:36:30 +02:00
Martin Kroeker 444d03db9c switch to another site that still has libffi6 (for now) 2025-07-23 14:04:11 +02:00
Chris Sidebottom 2c3cdaf74e Optimized BGEMV for NEOVERSEV1 target
- Adds bgemv T based off of sbgemv T kernel
- Adds bgemv N which is slightly alterated to not use Y as an
accumulator due to the output being bf16 which results in loss of
precision
- Enables BGEMM_GEMV_FORWARD to proxy BGEMM to BGEMV with new kernels
2025-07-23 10:51:41 +01:00
Martin Kroeker 7d908564fe Use OpenBLAS_ROOT_DIR in CMake config file generation only if set 2025-07-22 16:01:46 +02:00
Martin Kroeker 2f81d6e60c Merge pull request #5390 from martin-frbg/issue5388-2
Declare the "small" complex DOT and AXPY kernels for RISCV-ZVL256B static in addition to inline
2025-07-22 13:05:14 +02:00
Martin Kroeker e2d941e9af Declare the "small" kernel static in addition to inline 2025-07-22 11:02:32 +02:00
Martin Kroeker 8214700930 Declare the "small" kernel static in addition to inline 2025-07-22 11:01:37 +02:00
Martin Kroeker 4ae8707b54 Merge pull request #5389 from martin-frbg/issue5388
Add cross-compilation parameters for RISCV64 targets in CMake
2025-07-22 10:57:59 +02:00
Martin Kroeker b24212f5df fix numbers 2025-07-21 22:54:52 +02:00
Martin Kroeker 6ff06f5483 Add cross-compilation data for RISCV64 targets 2025-07-21 22:42:15 +02:00
Martin Kroeker d92f151634 Merge pull request #5386 from martin-frbg/issue5384
Fixes for some gcc warnings
2025-07-19 08:33:51 +02:00
Martin Kroeker 30dbca5051 fix misleading indentation to silence a gcc warning 2025-07-18 23:51:04 +02:00
Martin Kroeker 38e6999295 format cleanup 2025-07-18 23:45:08 +02:00
Martin Kroeker 3df503cafd portability fix and cleanup 2025-07-18 23:41:57 +02:00
Martin Kroeker 39c90f9859 Merge pull request #5380 from quic/topic/sgemm_direct_sme1_alpha_beta
SME1 based direct kernel (with alpha and beta) for cblas_sgemm level 3
2025-07-18 23:23:39 +02:00
Rajendra Prasad Matcha eae0abfdb6 SME1 based direct kernel with alpha and beta for cblas_sgemm level 3 API. 2025-07-17 16:14:31 +05:30
Martin Kroeker ac8cbfdd8e Merge pull request #5381 from Mousius/bgemv-infrastructure
Add infrastructure for BGEMV
2025-07-16 23:22:08 +02:00
Martin Kroeker 1742decdcb Merge pull request #5375 from lowkeyrossi/CI_for_WoA
Add CI support for building and validating OpenBLAS on WoA
2025-07-15 21:16:03 +02:00
Martin Kroeker 08df0f02d9 Merge pull request #5382 from martin-frbg/issue5379
Update cross-compilation instructions for the Android NDK
2025-07-15 21:07:34 +02:00
Martin Kroeker 7d7757acd1 Update cross-compilation instructions for the Android NDK 2025-07-15 18:25:55 +02:00
Chris Sidebottom 947d7af4c9 Fix CMake references to bscal and bgemv 2025-07-15 15:41:53 +01:00
Chris Sidebottom 72d2ebb4dd Re-add GEMV fallback for Level3 2025-07-15 15:00:20 +01:00
Chris Sidebottom e105411460 Add infrastructure for bgemv/bscal
- Sets up all the various entrypoints for `bgemv`
- Adds `bscal` for use in the `bgemv` interface
- Adds test cases for comparing `sgemv` and `bgemv`
- Adds generic kernels for `bgemv_n` and `bgemv_t` which are accurate
enough to pass above tests
2025-07-15 14:48:57 +01:00
Martin Kroeker 666e1081ac Merge pull request #5378 from martin-frbg/cpuid_lunarlake
Add ID data for Intel Lunar Lake ("Core Ultra 200V series")
2025-07-13 23:18:22 +02:00
Martin Kroeker 3ea6322eff Merge pull request #5377 from Mousius/test-fixes
Improve bgemm and sbgemm testing
2025-07-13 23:03:35 +02:00
Martin Kroeker 848e9e6ba7 Add ID data for Intel Lunar Lake ("Core Ultra 200V series") 2025-07-13 20:34:19 +02:00
Chris Sidebottom 09a016fdf6 Split sbgemv test from sbgemm test 2025-07-13 13:39:44 +00:00
Chris Sidebottom 3f110c8272 Improve bgemm and sbgemm testing
- Fixes wrong return type for `is_close`
- Adds stricter compiler flags for test files so we don't see the above
issue again
- Re-uses test helper functions between compare_sgemm_sbgemm/bgemm.c
2025-07-13 12:48:09 +00:00
newyork_loki cb2c726716 Add CI support for OpenBLAS on WoA 2025-07-12 14:37:30 +05:30
newyork_loki c8d41e4a32 Add CI support for OpenBLAS on WoA 2025-07-12 14:34:29 +05:30
Martin Kroeker 81b30d4538 Merge pull request #5374 from martin-frbg/fixup-5373
Fix compilation of the new bgemm test
2025-07-11 15:33:38 +02:00
Martin Kroeker aad97c7763 Fix return type declaration 2025-07-11 15:32:41 +02:00
Martin Kroeker 7acb122a98 Merge pull request #5373 from Mousius/bgemm-optimized
Add optimized BGEMM kernel for NEOVERSEV1 target
2025-07-11 11:56:56 +02:00
Chris SidebottomandYe Tao 740efd71c4 Add optimized BGEMM kernel for NEOVERSEV1 target
This also improves the testing and generic kernel by re-using the BF16
conversion functions.

Built on top of https://github.com/OpenMathLib/OpenBLAS/pull/5357 and derived from https://github.com/OpenMathLib/OpenBLAS/pull/5287

Co-authored-by: Ye Tao <ye.tao@arm.com>
2025-07-10 23:23:27 +00:00
Martin Kroeker e927373f62 Merge pull request #5371 from martin-frbg/fixup-5357
Complete the infrastructure changes for adding BGEMM
2025-07-10 16:38:37 +02:00
Martin Kroeker 9a272fece6 Re-enable the BGEMM tests 2025-07-10 15:02:59 +02:00
Martin Kroeker b54aec804e remove spurious include 2025-07-10 15:00:30 +02:00
Martin Kroeker 343830c26f Add BGEMM parameter tables 2025-07-10 14:59:46 +02:00
Martin Kroeker b37516add6 Add BGEMM parameters 2025-07-10 14:59:01 +02:00
Martin Kroeker d030f81380 Merge pull request #5369 from martin-frbg/lapack1144
Fix workspace allocation in LAPACKE strsen/dtrsen (Reference-LAPACK PR 1144)
2025-07-10 10:46:15 +02:00
Martin Kroeker b746f0eda3 Allocate IWORK to hold at least the one element for workspace queries 2025-07-10 08:58:16 +02:00
Martin Kroeker b8f66ba0ee Merge pull request #5367 from Mousius/bgemm-init
Temporarily disable test_bgemm
2025-07-10 00:57:41 +02:00
Martin Kroeker cdebb4fd4b Merge pull request #5365 from martin-frbg/issue5324
Fix arm64 HAVE_SME setting for DYNAMIC_ARCH builds using CMake
2025-07-09 22:50:54 +02:00
Martin Kroeker ff614575c9 Fix arm64 HAVE_SME setting for DYNAMIC_ARCH builds 2025-07-09 14:44:25 +02:00
Martin Kroeker 0e11537cab Merge pull request #5357 from Mousius/bgemm-init
Add infrastructure for BGEMM
2025-07-09 09:34:58 +02:00
Chris Sidebottom 8cd4be8d47 Temporarily disable test_bgemm 2025-07-09 08:27:18 +01:00
Chris Sidebottom 66d9185ebe Fix CMake support 2025-07-08 22:49:55 +00:00
Martin Kroeker 98aefb70b4 Merge pull request #5292 from isharif168/optimized_gemv_n_1x3
Optimize gemv_n_sve_v1x3 kernel
2025-07-08 21:05:43 +02:00
Martin Kroeker fd37406817 Merge branch 'develop' into optimized_gemv_n_1x3 2025-07-08 21:05:30 +02:00
Chris SidebottomandYe Tao 48394384ef Use correct constants for per-target BGEMM/SBGEMM
This fixes the build and tests on `NEOVERSEV1` target, which was failing
with specific constants for `SBGEMM`

Co-authored-by: Ye Tao <ye.tao@arm.com>
2025-07-08 16:23:27 +01:00
Chris Sidebottom 73bf0b941a Add bgemm to gensymbol 2025-07-08 16:22:43 +01:00
Chris SidebottomandYe Tao f95e7b0e32 Add infrastructure for BGEMM
Setting up all the infrastructure for BGEMM support in OpenBLAS, hopefully I found all the right places.

Derived mostly from the previous work done in https://github.com/OpenMathLib/OpenBLAS/pull/5287

Co-authored-by: Ye Tao <ye.tao@arm.com>
2025-07-08 16:22:41 +01:00
Martin Kroeker 15d6e58510 Merge pull request #5364 from martin-frbg/blashalf
change BLAS_HALF to BLAS_BFLOAT16 in parallelized POTRF (another missed rename)
2025-07-08 17:14:50 +02:00
Martin Kroeker 04bb5acd79 change BLAS_HALF to BLAS_BFLOAT16 (another missed rename) 2025-07-08 14:40:22 +02:00
Martin Kroeker 3d31887073 Merge pull request #5362 from Mousius/fix-bf16
Fix SBGEMM BFLOAT16 build
2025-07-08 14:35:50 +02:00
Martin Kroeker 0ddf8ebd42 Merge pull request #5354 from pratiklp00/p11
Add Support for POWER11
2025-07-08 11:52:18 +02:00
Martin Kroeker d2ea9bbb6d Merge pull request #5363 from guoyuanplct/develop
Update CONTRIBUTORS.md
2025-07-08 11:47:18 +02:00
guoyuanplct 4ff549a450 Update CONTRIBUTORS.md 2025-07-08 17:16:51 +08:00
guoyuanplct 309c48e327 Update CONTRIBUTORS.md 2025-07-08 17:13:27 +08:00
Chris Sidebottom 552e1c7a7a Correct compiler flags for NEOVERSEV1 target 2025-07-07 11:26:36 +00:00
Chris Sidebottom 46b9b7a080 Also enable BFLOAT16 for make cirun 2025-07-07 10:41:12 +00:00
Chris Sidebottom eaaa628af2 Enable BUILD_BFLOAT16 in cirun 2025-07-07 10:20:17 +00:00
Chris Sidebottom 7a97c4ca97 Rename HALF -> BFLOAT16 in some more places 2025-07-07 10:13:39 +00:00
Martin Kroeker ee6560c89f Merge pull request #5360 from sertonix/cpuid-arm
Fix cpuid.S on arm
2025-07-07 07:41:56 +02:00
Sertonix 8d11e4630c Fix cpuid.S on arm
The ARM assembly syntax differs a bit

Fixes 61b9339d3a getarch/cpuid.S: Fix warning about executable stack

Signed-off-by: Sertonix <sertonix@posteo.net>
2025-07-06 23:48:10 +02:00
Martin Kroeker 03a4afcf14 Merge pull request #5359 from martin-frbg/gitign_isnan
update gitignore configuration
2025-07-05 22:26:55 +02:00
Martin Kroeker 901de8f33a remove lapacke_mangling.h and add la_xisnan.mod 2025-07-05 20:35:16 +02:00
Martin Kroeker ce6991780a Merge pull request #5356 from ilina-linaro/ilina-woa
Update README.md to include Windows on Arm64
2025-07-05 19:07:45 +02:00
Martin Kroeker df013c5e28 Merge pull request #5358 from iha-taisei/dot_unroll
Performance improvements of [SD]DOT with loop-unrolling on A64FX
2025-07-04 23:38:32 +02:00
Iha, Taisei f7ad906b49 Performance improvements of [SD]DOT with loop-unrolling on A64FX 2025-07-04 22:57:44 +09:00
Lina Iyer 7f360001f9 Update README.md to include Windows on Arm64
Update README.md to indicate that binaries are available for Windows on ARM64
2025-07-03 07:15:20 -06:00
Martin Kroeker 36c2589d3a Merge pull request #5355 from tetsuzo-usui/add_parallel_laed3
Improve [SD]SYEVD performance by parallelizing [SD]LAED3
2025-07-02 09:14:03 +02:00
Usui, Tetsuzo 14107e37d9 Add parallel laed3 2025-07-01 22:12:27 +09:00
Martin Kroeker a06bcf836b Merge pull request #5353 from nakagawa-fj/feature/gemm_divide_rate_for_A64FX
Multi-thread Performance Improvement of GEMM with DIVIDE_RATE=1 for A64FX
2025-07-01 14:06:53 +02:00
Masato Nakagawa 5253c8f165 Multi-thread Performance Improvement of GEMM with DIVIDE_RATE=1 for
A64FX.
2025-06-30 21:35:16 +09:00
Martin Kroeker 8f0a1a3f82 Merge pull request #5303 from martin-frbg/issue5289
Exit if memory allocation keeps failing, instead of retrying forever
2025-06-29 22:47:56 +02:00
Martin Kroeker 2c0dd2468e Merge pull request #5350 from martin-frbg/issue5341
Declare the server_lock mutex volatile in addition to static
2025-06-29 21:10:18 +02:00
Martin Kroeker 7ae24d0b85 Merge pull request #5351 from martin-frbg/lapack1140
Fix documentation error and ordering bug in ?LAED/?LASD  (Reference-LAPACK PR 1140)
2025-06-29 19:20:17 +02:00
Martin Kroeker 5aeca597fe Fix documentation error and ordering bug (Reference-LAPACK PR 1140) 2025-06-29 17:42:15 +02:00
Martin Kroeker dcb289539b Merge pull request #5344 from MaartenBaert/fix-dlasd7
LAPACK: Fix documentation error and ordering bug in DLASD7
2025-06-29 17:39:41 +02:00
Martin Kroeker 9bcffbd655 Declare the server_lock mutex volatile in addition to static 2025-06-29 15:42:43 +02:00
Martin Kroeker 334cd242d4 Merge pull request #5348 from hideaki-motoki/issue5343_prefered_size_for_a64fx
Setting `GEMM_PREFERED_SIZE` parameter for `A64FX`
2025-06-27 14:57:37 +02:00
h-motoki bba75d5e45 GEMM_PREFERED_SIZE parameter has been changed for A64FX. 2025-06-27 19:37:36 +09:00
Martin Kroeker 4062c10370 Merge pull request #5345 from OpenMathLib/revert-5251-issue5250
Revert "Fix out-of-bounds accesses in ?/SCAL/?GEEV triggered by preceding errrors/invalid inputs"
2025-06-27 09:45:10 +02:00
Martin Kroeker b78d1dc0ae Merge pull request #5342 from martin-frbg/cmake_ampere
Add CMake build settings for the Ampere One cpu
2025-06-26 18:46:33 +02:00
Martin Kroeker 83a01d29ca Revert "Fix out-of-bounds accesses in ?/SCAL/?GEEV triggered by preceding errrors/invalid inputs"
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, RISCV64_ZVL256B) (push) Canceled after 0s
2025-06-26 17:47:20 +02:00
Martin Kroeker 560fa88c96 Add cross-build parameters for Ampere One 2025-06-26 10:57:30 +02:00
Martin Kroeker 55bb5ef867 Add compiler options for Ampere One 2025-06-26 10:50:44 +02:00
Maarten Baert b37889e52d Merge branch 'OpenMathLib:develop' into fix-dlasd7 2025-06-26 09:29:07 +02:00
pratiklp00 1dde4a13c0 p11 changes 2025-06-26 00:03:38 -05:00
Martin Kroeker 11ce79a4f0 Merge pull request #5329 from foxtran/fix/docs
Update FAQ
2025-06-25 16:44:44 +02:00
Maarten Baert 0904a42fa4 Fix documentation error and ordering bug in DLASD7 2025-06-25 15:50:41 +02:00
Martin Kroeker d24195e9a1 Merge pull request #5295 from Pengzhou0810/develop
Fix some hyperthreading errors.
2025-06-25 11:09:46 +02:00
zhoupeng 134b21ae60 Fix some hyperthreading errors.
When there are multiple NUMA nodes and hyper-threading causes adjacent logical cores to share a physical core (e.g., common -> avail[i] = 0x5555555555555555UL), the numa_mapping function should not use a bitmask for filtering, as this would lead to redundant masking with the subsequent local_cpu_map function.
2025-06-25 09:52:26 +08:00
Martin Kroeker d96daa220d Merge pull request #5290 from Srangrang/develop
Add support for FP16 to openBLAS and shgemm on RISCV
2025-06-24 23:10:15 +02:00
Martin Kroeker fdc1c32340 Merge pull request #5336 from martin-frbg/issue5332
Use response files on old PPC/Intel Macs in single-target builds too
2025-06-24 21:58:58 +02:00
Martin Kroeker 5aa483e16c Use response files on old PPC/Intel Macs in single-target builds too 2025-06-24 17:37:34 +02:00
Martin Kroeker 12591caa91 Merge pull request #5334 from azuresky01/develop
Fix INTERFACE64 builds on Loongarch64 with LLVM
2025-06-24 16:09:25 +02:00
Martin Kroeker ee26caffb3 Merge pull request #5309 from davidz-ampere/dev-ampereone
Add support for Ampere AmpereOne processors
2025-06-24 12:27:08 +02:00
Martin Kroeker 8b08df5c5a Merge pull request #5335 from martin-frbg/issue5330
Remove non-portable option from objcopy calls in the CMake build
2025-06-24 12:25:46 +02:00
Martin Kroeker 3bba35b8f7 Remove non-portable option from objcopy calls 2025-06-24 09:01:47 +02:00
azuresky01 8953ba9c2f Fix INTERFACE64 builds on Loongarch64 with LLVM
fix https://github.com/OpenMathLib/OpenBLAS/issues/5331
2025-06-24 14:27:15 +08:00
davidz-ampere aa90ab4142 Add support for Ampere AmpereOne processors 2025-06-24 00:12:34 -04:00
Igor S. Gerasimov 46b0dfef8f Use links to issues 2025-06-21 11:35:02 +02:00
Igor S. Gerasimov 83efceb3cd Keep dgemm_snb_1thread.png in repo 2025-06-21 11:24:42 +02:00
Martin Kroeker b4945057b7 Merge pull request #5319 from imciner2/im/armtypes
Update SBGEMM neoversev1 kernel to use standard C types
2025-06-20 06:02:22 -07:00
Martin Kroeker b3904aeed7 Merge pull request #5323 from imciner2/im/ofast
Switch power to use O3 instead of Ofast
2025-06-20 05:55:21 -07:00
Ian McInerney 721c80644b Switch power to use O3 instead of Ofast
Ofast enables possibly unsafe optimizations in addition to O3. This
appears to have been added and then just continually copied into later
Power architectures, and it wasn't included in the CMake build system
when that was introduced.

Replace this with O3 so that the same level of optimization is done by
the compiler.
2025-06-20 09:23:05 +01:00
Ian McInerney badef1d32e Update sbgemm_tcopy_4_neoversev1 kernel to use standard C types 2025-06-19 14:26:16 +01:00
Martin Kroeker 4e6da5ed34 Update version to 0.3.30.dev 2025-06-19 11:57:35 +02:00
Martin Kroeker 8dff37827e Update version to 0.3.30.dev 2025-06-19 11:56:55 +02:00
Martin Kroeker c055c36b40 Merge pull request #5317 from OpenMathLib/release-0.3.0
merge back from 0.3.0 to copy tag
2025-06-19 02:56:01 -07:00
Martin Kroeker 993fad6aeb Update version to 0.3.30
apple m / build (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build (make, gfortran, 1, 1) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
Nightly-Homebrew-Build / build-OpenBLAS-with-Homebrew (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, RISCV64_ZVL256B) (push) Canceled after 0s
2025-06-19 11:45:39 +02:00
Martin Kroeker 3382763df6 Update version to 0.3.30 2025-06-19 11:44:35 +02:00
Martin Kroeker e81fca06dd Merge pull request #5316 from OpenMathLib/develop
Update from develop for 0.3.30 release
2025-06-19 02:34:00 -07:00
Martin Kroeker d339bd5515 Merge pull request #5308 from martin-frbg/changelog0330
Update the Changelog for version 0.3.30
2025-06-19 02:05:09 -07:00
Martin Kroeker 157273fda0 another round of last minute updates for 0.3.30 2025-06-18 22:44:36 +02:00
Martin Kroeker 1546599a13 Merge pull request #5315 from loss-and-quick/arm-exec-stack
Add .note.GNU-stack in ARM epilogue to avoid writable stack
2025-06-18 13:18:40 -07:00
minicx 79b4dd0fb0 fix(arm): add .note.GNU-stack to ARM assembly to prevent writable-stack warnings
Add .section .note.GNU-stack in ARM assembly epilogue on Linux/ELF targets to
avoid warnings about a writable/executable stack and ensure shared objects do
not require an executable stack.

Signed-off-by: minicx <minicx@disroot.org>
2025-06-18 17:11:30 +03:00
Martin Kroeker c2342fc2d0 Merge pull request #5314 from martin-frbg/dynampere1
Support AmpereOne/OneA as NeoverseN1 in DYNAMIC_ARCH builds
2025-06-18 05:50:51 -07:00
Martin Kroeker e541bf68f5 support AmpereOne/OneA as NeoverseN1 2025-06-18 09:54:08 +02:00
Martin Kroeker 5ad6435660 Merge pull request #5312 from martin-frbg/x86cdot
Work around X86 POTRS/CDOT bug on old systems and add CI job for 32bit manylinux
2025-06-17 23:56:04 -07:00
Martin Kroeker e684e36377 Add 32bit manylinux to match what python wheel build tests use 2025-06-17 22:50:53 +02:00
Martin Kroeker 3318a2b904 override CDOT and ZDOT with the generic C kernel 2025-06-17 22:41:40 +02:00
davidz-ampere 84730068af reduce duplicate kernel code 2025-06-17 03:05:34 -04:00
Martin Kroeker 85337c5160 Merge pull request #5310 from nakagawa-fj/bugfix/identify_cpu_part_for_arm64
Bug Fix: Problem with identifying some ARM64 processors
2025-06-16 05:03:22 -07:00
Martin Kroeker 53cd6e7ff7 Update Changelog.txt 2025-06-16 13:31:15 +02:00
Masato Nakagawa 1dd396033a Fix:Problem with identifying some ARM64 processors. 2025-06-16 19:50:08 +09:00
Srangrang 3b1ac29b77 disable BUILD_HFLOAT16 2025-06-16 18:05:16 +08:00
davidz-ampere be68ef03b4 Add support for Ampere processors 2025-06-15 22:00:40 -04:00
Martin Kroeker f1097d1cba Merge pull request #5306 from martin-frbg/lapack1131
Fix missing initialization leading to bypassing corner cases in C/ZGEQP3RK (Reference-LAPACK PR #1131)
2025-06-15 15:00:05 -07:00
Martin Kroeker 3fe7f196e6 Update the Changelog for version 0.3.30 2025-06-15 23:31:45 +02:00
Martin Kroeker bad47bd024 Fix too strict leading dimensions check in LAPACKE_?gesdd_work (Reference-LAPACK PR #1126) (#5307)
* relax leading dimensions check (Reference-LAPACK PR #1126)
2025-06-15 22:47:14 +02:00
Martin Kroeker 7f3093a0ad Merge pull request #5305 from martin-frbg/lapack1135
Fix 2nd dimension used by LAPACKE_c/zunmlq in NaN check and transposition (Reference-LAPACK PR #1135)
2025-06-15 12:41:03 -07:00
Martin Kroeker 1804ff58d7 fix missing initialization 2025-06-15 19:35:34 +02:00
Martin Kroeker 906b9df316 fix missing initialization 2025-06-15 19:34:01 +02:00
Martin Kroeker f4e5177050 fix dimension used in nancheck (Reference-LAPACK PR 1135) 2025-06-15 19:16:58 +02:00
Martin Kroeker 2a6beac88f fix dimension used in transposition (Reference-LAPACK PR 1135) 2025-06-15 19:14:53 +02:00
Martin Kroeker d8a2324699 fix dimension used in nancheck (Reference-LAPACK PR 1135) 2025-06-15 19:13:23 +02:00
Martin Kroeker 874744976c fix dimension used in nancheck (Reference-LAPACK PR 1135) 2025-06-15 19:11:26 +02:00
Srangrang 9f13b2c6ac style: modify HALF to BFLOAT16 in benchmark folder 2025-06-15 20:57:05 +08:00
Srangrang ec14e1648c fix: resolve non-RISCV host build failed issue
- adjust interface to disable "small matrix" pathway
- separate HFLOAT16 from BFLOAT16
- remove SHGEMM_UNROLL_M and SHGEMM_UNROLL_N equal conditions

Related to PR#5290
Co-authored-by Martin
2025-06-15 20:25:15 +08:00
Martin Kroeker 0ea173ec8c Merge pull request #5304 from martin-frbg/fixgemmtr_if
fix source file used for sbgemmt/sbgemmtr in CMake builds
2025-06-14 22:53:10 -07:00
Martin Kroeker 5e393f207c fix source file used for sbgemmt/sbgemmtr 2025-06-15 00:06:34 +02:00
Martin Kroeker 162591af47 Merge branch 'OpenMathLib:develop' into issue5289 2025-06-13 13:27:50 -07:00
Martin Kroeker dbd5643d37 Merge pull request #5302 from martin-frbg/zscal_mips_3
mips64 SICORTEX: temporarily change default C/ZSCAL to the non-asm implementation
2025-06-13 13:27:21 -07:00
Martin Kroeker 31ef2cbbb3 Exit if memory allocation keeps failing, instead of looping forever 2025-06-13 14:11:03 +02:00
Martin Kroeker e338d34ce1 fix path 2025-06-13 13:37:15 +02:00
Martin Kroeker d36093d084 temporarily change default C/ZSCAL to the non-asm implementation 2025-06-13 13:32:02 +02:00
Martin Kroeker cc4b04a684 Merge pull request #5301 from martin-frbg/zscal_mips_2
kernel/mips(64): Fix cscal and zscal
2025-06-13 02:52:59 -07:00
Martin Kroeker b3c90564d7 resync with the generic arm version for inf/nan handling 2025-06-13 00:54:27 -07:00
Martin Kroeker 6bdc7f9eb7 Merge pull request #5300 from martin-frbg/fixup5296
kernel/riscv64: Fix cscal/zscal for riscv64_generic
2025-06-12 15:02:22 -07:00
Martin Kroeker 63272b6c82 Merge pull request #5299 from martin-frbg/x86_64-ssezscal
Disable the default SSE kernels for x86_64 CSCAL/ZSCAL for now
2025-06-12 15:01:31 -07:00
Martin Kroeker 73af02b89f use dummy2 as Inf/NAN handling flag 2025-06-12 13:33:56 -07:00
Martin Kroeker 549a9f1dbb Disable the default SSE kernels for CSCAL/ZSCAL for now 2025-06-12 18:54:33 +02:00
Martin Kroeker ca1ce84ee5 Merge pull request #5298 from martin-frbg/fixup5281
Fix PR5281 "kernel/arm64: fix cscal/zscal"
2025-06-12 09:49:55 -07:00
Martin Kroeker 58eeb9041c fix handling of dummy2 2025-06-12 03:03:01 -07:00
Martin Kroeker 7c77537b25 Merge pull request #5297 from martin-frbg/zscal_x86_sparc
kernel/(x86|sparc): Fix cscal and zscal by reverting to the generic C kernels
2025-06-12 01:10:35 -07:00
Martin Kroeker 63287e1855 Merge pull request #5296 from martin-frbg/zscal_riscv
kernel/riscv64: Fix cscal and zscal
2025-06-12 01:10:15 -07:00
Martin Kroeker d2855d3dab Merge pull request #5285 from martin-frbg/zscal_zarch
kernel/zarch: Fix cscal and zscal
2025-06-12 01:09:52 -07:00
Martin Kroeker 1408be5fe0 Merge pull request #5282 from martin-frbg/zscal_power
kernel/power: Fixed cscal and zscal
2025-06-12 01:04:38 -07:00
Martin Kroeker 1589d0b21e Merge pull request #5281 from martin-frbg/zscal_arm64
kernel/arm64: fixed cscal and zscal
2025-06-12 01:04:18 -07:00
Martin Kroeker a86419fb66 Merge pull request #5280 from martin-frbg/zscal_x86_64
kernel/x86_64: fixed cscal and zscal
2025-06-12 01:03:55 -07:00
Martin Kroeker 11ff18bb0f Merge pull request #5081 from XiWeiGu/kernel_generic_fixed_cscal_zscal
kernel/generic: Fixed cscal and zscal
2025-06-12 01:03:00 -07:00
Martin Kroeker 2e2691b34b Merge pull request #5078 from XiWeiGu/la64_fixed_cscal_zscal
LoongArch64: fixed cscal and zscal
2025-06-12 01:02:19 -07:00
Martin Kroeker f4194fc65f Merge branch 'develop' into la64_fixed_cscal_zscal 2025-06-11 14:28:41 -07:00
Martin Kroeker e12132abd4 Use generic C/ZSCAL kernels to address inf/nan handling for now 2025-06-11 22:12:10 +02:00
Martin Kroeker 1cefbea7ea Use generic SCAL kernels to address inf/nan handling for now 2025-06-11 22:10:46 +02:00
Sharif Inamdar 8279e68805 Optimize gemv_n_sve_v1x3 kernel
- Calculate predicate outside the loop
- Divide matrix in blocks of 3
2025-06-11 10:16:56 +00:00
Martin Kroeker f18b7a46bf add dummy2 flag handling for inf/nan agnostic zeroing 2025-06-11 01:47:43 -07:00
Martin Kroeker fe220a0d7d Merge pull request #5291 from guoyuanplct/develop
kernel/riscv64:fixed the performance problem in RISCV64_ZVL256 when OPENBLAS_K is small
2025-06-09 23:42:04 -07:00
Martin Kroeker bbdc265798 Merge pull request #5294 from arnej27959/arnej/fix-arm64-register
Accumulate results in output register explicitly
2025-06-09 23:41:12 -07:00
Arne Juul 5442aff218 Accumulate results in output register explicitly 2025-06-09 19:03:22 +00:00
guoyuanplct 83fcab7578 Merge branch 'develop' of https://github.com/guoyuanplct/OpenBLAS into develop 2025-06-05 21:58:13 +08:00
guoyuanplct 2ae019161a fixed the performance problem in RISCV64_ZVL256 when OPENBLAS_K is small 2025-06-05 21:53:03 +08:00
Srangrang fb89820f20 Merge branch 'develop' of https://github.com/Srangrang/OpenBLAS into develop 2025-06-04 20:27:05 +08:00
Srangrang 4e1a381e5b fix: resolve the compilation failure without zfh instruction
- modify the macro conditions in Makefile.system
- Delete development test code

Related to issue#5279
2025-06-04 20:00:12 +08:00
Linjin Li fa2b08b378 Merge pull request #1 from gkdddd/riscv_shgemm
Added shgemm_kernel_8x8 for RISCV64_ZVL128B and shgemm_kernel_16x8 fo…
2025-06-03 21:00:19 +08:00
gkdddd 670ec6f757 Added shgemm_kernel_8x8 for RISCV64_ZVL128B and shgemm_kernel_16x8 for RISCV64_ZVL256B
Added HFLOAT16 support for RISCV64
Added shgemm_kernel_8x8 for RISCV64_ZVL128B and shgemm_kernel_16x8 for RISCV64_ZVL256B based on HFLOAT16
The instruction sets used are ZVFH and ZFH, which need to be supported by RVV1.0

Related to issue #5279
Co-authored-by Linjin Li <linjin_li@163.com>
2025-06-03 20:14:30 +08:00
Martin Kroeker 02267d86f5 Merge pull request #5288 from guoyuanplct/develop
kernel/riscv64:Optimized the implementation of axpby on TARGET=RISCV64_ZVL256B.
2025-05-29 07:38:38 -07:00
guoyuanplct d2003dc886 del lines 2025-05-29 18:38:22 +08:00
guoyuanplct 45fd2d9b07 Optimized the axpby function. 2025-05-29 17:50:44 +08:00
Srangrang 0a967797a1 Add FP16 support for RISCV 2025-05-27 14:34:57 +08:00
Martin Kroeker fb8dc8ff5c Add dummy2 flag handling 2025-05-25 14:47:06 -07:00
Srangrang 2996c25c94 add shgemm for RISCV_ZVL128B 2025-05-24 23:55:49 +08:00
Martin Kroeker cf06250d36 add handling of dummy2 flag 2025-05-24 06:06:24 -07:00
Martin Kroeker 28f8fdaf0f support flag for NaN/Inf handling and fix scaling of NaN/Inf values 2025-05-23 14:59:59 +02:00
Martin Kroeker 669c847ceb support extra flag for NaN handling 2025-05-23 05:52:48 -07:00
Martin Kroeker 0163143fdd Merge pull request #5278 from martin-frbg/fixup5276
Fix compilation with pre-C99 compilers
2025-05-22 00:32:29 -07:00
Martin Kroeker 20f2ba0141 Move declaration of i for pre-C99 compilers 2025-05-21 23:44:17 +02:00
Martin Kroeker e2e6a4d90a Merge pull request #5276 from nakagawa-fj/gemm_2d_thread_partitioning
Improvement of 2D thread-partitioned GEMM for M << N case
2025-05-21 14:41:49 -07:00
Martin Kroeker 9ef5995c22 Merge pull request #5277 from martin-frbg/fixmingw32
Fix building with mingw32-gcc15
2025-05-21 14:33:37 -07:00
Martin Kroeker 42b7d1f897 Fix addressing of alpha in CBLAS 2025-05-21 22:03:38 +02:00
Martin Kroeker bd573a9d38 Expand mingw32 gfortran workaround to all versions after 14.1 2025-05-21 22:01:02 +02:00
Masato Nakagawa 2351a98005 Update 2D thread-partitioned GEMM for M << N case. 2025-05-21 21:21:52 +09:00
Martin Kroeker a5f701c4ab Merge pull request #5274 from martin-frbg/issue5247
Expressly provide a shared libs option in CMakelists.txt
2025-05-20 00:39:32 -07:00
Martin Kroeker 4ca76d9de4 Expressly provide a shared libs option 2025-05-19 12:07:24 -07:00
Martin Kroeker 846a5436e7 Merge pull request #5273 from martin-frbg/issue5259
CMAKE: Do not suffix the library with a 64 if LIBNAMESUFFIX already contains it
2025-05-19 11:59:57 -07:00
Martin Kroeker 8779eac3b8 Do not add a 64 suffix to the library name if the user-provided suffix already contains it 2025-05-19 08:55:14 -07:00
Martin Kroeker 3473118213 Merge pull request #5272 from martin-frbg/issue5271
Fix compiler options for NeoverseN1 and CortexX2/A?10 in CMake builds
2025-05-19 08:17:57 -07:00
Martin Kroeker f2022c23ac Remove sve capability from NeoverseN1 and specify CortexX2/A?10 as arm8.4a 2025-05-19 16:08:12 +02:00
Martin Kroeker b5456c1b41 Merge pull request #5260 from taoye9/enable_bf16_gemm_gemv_forward_on_arm64
enable sbgemm to be forward to sbgemv on arm64
2025-05-18 13:54:05 -07:00
Martin Kroeker 5a322f21af Merge pull request #5268 from martin-frbg/fix-dyn-sgemmdirect
Fix conditional inclusion of SGEMM_KERNEL_DIRECT
2025-05-17 10:30:23 -07:00
Martin Kroeker 6680e0592f Fix conditional inclusion of SGEMM_KERNEL_DIRECT 2025-05-17 05:12:15 -07:00
Martin Kroeker 0b0bb9951d Merge pull request #5265 from guoyuanplct/develop
kernel/riscv64:Added support for omatcopy on RISCV64_ZVL256B
2025-05-17 05:08:47 -07:00
guoyuanplct 7732a55200 Add retry mechanism after deadlock timeout for c910v. 2025-05-16 18:24:46 +08:00
guoyuanplct be9f7550b5 Format Code 2025-05-15 18:55:47 +08:00
guoyuanplct 4d213653d8 kernel/riscv64:Added support for omatcopy on riscv64. 2025-05-15 13:29:14 +08:00
Ye Tao 7321444660 enable sbgemm to be forward to sbgemv on arm64 2025-05-12 15:37:32 +00:00
gxw 2da86b80c9 LoongArch64: Fixed scalar version of cscal and zscal 2025-01-22 14:32:20 +08:00
gxw 5392f6df69 LoongArch64: Fixed LASX version of cscal and zscal 2025-01-22 14:15:27 +08:00
gxw b2117bb2ca LoongArch64: Fixed LSX version of cscal and zscal 2025-01-21 14:49:44 +08:00
gxw 6954845d8d utest: Add utest for {c/z}scal and {c/z}gemv 2025-01-21 14:24:03 +08:00
gxw e114880dc4 kernel/generic: Fixed cscal and zscal 2025-01-21 11:44:22 +08:00
1641 changed files with 71576 additions and 36030 deletions
+12 -10
View File
@@ -58,8 +58,8 @@ task:
- export VALID_ARCHS="i386 x86_64"
- xcrun --sdk macosx --show-sdk-path
- xcodebuild -version
- export CC=/Applications/Xcode_16.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_16.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -arch x86_64"
- export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk -arch x86_64"
- make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
always:
config_artifacts:
@@ -78,8 +78,8 @@ task:
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
- export CC=/Applications/Xcode_16.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_16.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.4.sdk -arch arm64 -miphoneos-version-min=10.0"
- export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.0.sdk -arch arm64 -miphoneos-version-min=10.0"
- xcrun --sdk iphoneos --show-sdk-path
- ls -l /Applications
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
@@ -89,14 +89,16 @@ task:
type: text/plain
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
image: ghcr.io/cirruslabs/macos-tahoe-xcode:latest
task:
name: AppleM1/LLVM armv7-androidndk xbuild
compile_script:
- brew install --cask android-ndk
- export ANDROID_NDK_HOME="/opt/homebrew/share/android-ndk"
- export CC=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
- make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
- export AR=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar
- export RANLIB=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ranlib
- make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
always:
config_artifacts:
path: "*conf*"
@@ -127,7 +129,7 @@ task:
FreeBSD_task:
name: FreeBSD-gcc
freebsd_instance:
image_family: freebsd-14-2
image_family: freebsd-14-3
install_script:
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
compile_script:
@@ -138,7 +140,7 @@ FreeBSD_task:
FreeBSD_task:
name: freebsd-gcc-ilp64
freebsd_instance:
image_family: freebsd-14-2
image_family: freebsd-14-3
install_script:
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
compile_script:
@@ -148,10 +150,10 @@ FreeBSD_task:
FreeBSD_task:
name: FreeBSD-clang-openmp
freebsd_instance:
image_family: freebsd-14-2
image_family: freebsd-14-3
install_script:
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
- ln -s /usr/local/lib/gcc13/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
- ln -s /usr/local/lib/gcc14/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
compile_script:
- gmake CC=clang FC=gfortran USE_OPENMP=1 CPP_THREAD_SAFETY_TEST=1
+9 -2
View File
@@ -44,7 +44,7 @@ jobs:
elif [ "$RUNNER_OS" == "macOS" ]; then
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
brew reinstall gcc
brew install coreutils cmake ccache
brew install coreutils ccache
brew install llvm
else
echo "::error::$RUNNER_OS not supported"
@@ -87,12 +87,19 @@ jobs:
echo "max_size = 300M" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
ccache -s
- name: Add gfortran runtime to link path
if: matrix.build == 'make' && runner.os == 'macOS'
run: |
GFORTRAN_LIBDIR=$(gfortran -print-file-name=libgfortran.dylib | xargs dirname)
echo "Using gfortran runtime in $GFORTRAN_LIBDIR"
echo "LDFLAGS=-L/opt/homebrew/opt/llvm/lib -L$GFORTRAN_LIBDIR" >> $GITHUB_ENV
- name: Build OpenBLAS
run: |
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
export CC="/opt/homebrew/opt/llvm/bin/clang"
export RANLIB=llvm-ranlib
case "${{ matrix.build }}" in
"make")
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=${{matrix.openmp}} INTERFACE64=${{matrix.ilp64}} FC="ccache ${{ matrix.fortran }}"
+2 -1
View File
@@ -88,13 +88,14 @@ jobs:
run: |
case "${{ matrix.build }}" in
"make")
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
make -j$(nproc) DYNAMIC_ARCH=1 BUILD_BFLOAT16=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
;;
"cmake")
mkdir build && cd build
cmake -DDYNAMIC_ARCH=1 \
-DNOFORTRAN=0 \
-DBUILD_WITHOUT_LAPACK=0 \
-DBUILD_BFLOAT16=1 \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_Fortran_COMPILER=${{ matrix.fortran }} \
+33 -3
View File
@@ -83,9 +83,39 @@ jobs:
- name: test
run: |
export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
qemu-riscv64 ./utest/openblas_utest
qemu-riscv64 ./utest/openblas_utest_ext
run_with_retry() {
local cmd="$1"
local time_out=10
local retries=10
local attempt=0
for ((i=1; i<=retries; i++)); do
attempt=$((i))
if timeout -s 12 --preserve-status $time_out $cmd; then
echo "Command succeeded on attempt $i."
return 0
else
local exit_code=$?
if [ $exit_code -eq 140 ]; then
echo "Attempt $i timed out (retrying...)"
time_out=$((time_out + 5))
else
echo "Attempt $i failed with exit code $exit_code. Aborting workflow."
exit $exit_code
fi
fi
done
echo "All $retries attempts failed, giving up."
echo "Final failure was due to timeout."
echo "Aborting workflow."
exit $exit_code
}
export PATH=$GITHUB_WORKSPACE/qemu-install/bin:$PATH
which qemu-riscv64
export QEMU_BIN=$(which qemu-riscv64)
run_with_retry "$QEMU_BIN ./utest/openblas_utest"
run_with_retry "$QEMU_BIN ./utest/openblas_utest_ext"
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xscblat1
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xdcblat1
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xccblat1
+49 -20
View File
@@ -1,6 +1,6 @@
name: continuous build
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -11,17 +11,24 @@ permissions:
jobs:
build:
if: "github.repository == 'OpenMathLib/OpenBLAS'"
if: "github.repository == 'OpenMathLib/OpenBLAS' || github.event_name == 'workflow_dispatch'"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
cc: [gcc, clang, clang-21]
fortran: [gfortran, flang]
build: [cmake, make]
exclude:
- os: macos-latest
cc: gcc
- os: macos-latest
cc: clang-21
- os: macos-latest
fortran: flang
- os: ubuntu-24.04-arm
fortran: flang
steps:
@@ -42,14 +49,27 @@ jobs:
- name: Install Dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
cat << EOF | sudo tee -a /etc/apt/apt.conf.d/01norecommend
APT::Install-Recommends "0";
APT::Install-Suggests "0";
EOF
sudo apt-get update
sudo apt-get install -y gfortran cmake ccache
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
sudo apt-get install -y ccache
if [ "${{ matrix.cc }}" == "clang-21" ]; then
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21
fi
if [ "${{ matrix.fortran }}" == "flang" ]; then
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
else
sudo apt-get install -y ${{ matrix.fortran }}
fi
elif [ "$RUNNER_OS" == "macOS" ]; then
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
brew reinstall gcc
brew install coreutils cmake ccache
brew install coreutils ccache
else
echo "::error::$RUNNER_OS not supported"
exit 1
@@ -64,12 +84,12 @@ jobs:
# GNU make and cmake call the compilers differently. It looks like
# that causes the cache to mismatch. Keep the ccache for both build
# tools separate to avoid polluting each other.
key: ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
key: ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
# Restore a matching ccache cache entry. Prefer same branch and same Fortran compiler.
restore-keys: |
ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}
ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}
ccache-${{ runner.os }}-${{ matrix.build }}
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}-${{ github.ref }}
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}
- name: Configure ccache
run: |
@@ -90,6 +110,14 @@ jobs:
echo "compression = true" >> ~/.ccache/ccache.conf
ccache -s
- name: Add gfortran runtime to link path
if: matrix.build == 'make' && runner.os == 'macOS'
run: |
GFORTRAN_LIBDIR=$(gfortran -print-file-name=libgfortran.dylib | xargs dirname)
echo "Using gfortran runtime in $GFORTRAN_LIBDIR"
# Preserve whatever LDFLAGS may already contain
echo "LDFLAGS=${LDFLAGS:+$LDFLAGS }-L$GFORTRAN_LIBDIR" >> "$GITHUB_ENV"
- name: Build OpenBLAS
run: |
if [ "${{ matrix.fortran }}" = "flang" ]; then
@@ -102,7 +130,7 @@ jobs:
fi
case "${{ matrix.build }}" in
"make")
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
;;
"cmake")
mkdir build && cd build
@@ -111,6 +139,7 @@ jobs:
-DBUILD_WITHOUT_LAPACK=0 \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_Fortran_COMPILER=${{ matrix.fortran }} \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_Fortran_COMPILER_LAUNCHER=ccache \
@@ -134,13 +163,13 @@ jobs:
"make")
MAKE_FLAGS='DYNAMIC_ARCH=1 USE_OPENMP=0'
echo "::group::Tests in 'test' directory"
make -C test $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
make -C test $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
echo "::endgroup::"
echo "::group::Tests in 'ctest' directory"
make -C ctest $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
make -C ctest $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
echo "::endgroup::"
echo "::group::Tests in 'utest' directory"
make -C utest $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
make -C utest $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
echo "::endgroup::"
;;
"cmake")
@@ -364,15 +393,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc gfortran make
- name: Build OpenBLAS
run: |
make -j${nproc}
make -j${nproc}
make -j${nproc} lapack-test
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
- name: Install libffi6
run: |
wget http://ftp.ca.debian.org/debian/pool/main/libf/libffi/libffi6_3.2.1-9_amd64.deb
wget https://download.nvidia.com/cumulus/apt.cumulusnetworks.com/pool/upstream/libf/libffi/libffi6_3.2.1-9_amd64.deb
sudo dpkg -i libffi6_3.2.1-9_amd64.deb
- name: Install APT deps
+20 -7
View File
@@ -16,8 +16,8 @@ jobs:
env:
triple: riscv64-unknown-linux-gnu
riscv_gnu_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain
riscv_gnu_toolchain_version: 13.2.0
riscv_gnu_toolchain_nightly_download_path: /releases/download/2024.02.02/riscv64-glibc-ubuntu-22.04-llvm-nightly-2024.02.02-nightly.tar.gz
riscv_gnu_toolchain_version: 15.1.0
riscv_gnu_toolchain_nightly_download_path: /releases/download/2025.08.29/riscv64-glibc-ubuntu-22.04-llvm-nightly-2025.08.29-nightly.tar.xz
strategy:
fail-fast: false
matrix:
@@ -26,8 +26,8 @@ jobs:
opts: TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64
qemu_cpu: rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64
- target: RISCV64_ZVL256B
opts: TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64
qemu_cpu: rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64
opts: TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1
qemu_cpu: rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true
- target: DYNAMIC_ARCH=1
opts: TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1
qemu_cpu: rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64
@@ -40,10 +40,13 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install autoconf automake autotools-dev ninja-build make \
libgomp1-riscv64-cross ccache
libgomp1-riscv64-cross ccache qemu-kvm qemu-user libc6-riscv64-cross
wget ${riscv_gnu_toolchain}/${riscv_gnu_toolchain_nightly_download_path}
tar -xvf $(basename ${riscv_gnu_toolchain_nightly_download_path}) -C /opt
wget https://gist.github.com/martin-frbg/bb630e0de34978e578eeb496b1538d4e/raw/7fd8d971f327f7a517b8f5f7989479ff2b36f71f/qemu-riscv64-10.1-ubuntu24 -P /opt/riscv/bin -o riscv64-qemu
mv /opt/riscv/bin/qemu-riscv64-10.1-ubuntu24 /opt/riscv/bin/qemu-riscv64
chmod +x /opt/riscv/bin/qemu-riscv64
- name: Compilation cache
uses: actions/cache@v3
with:
@@ -74,7 +77,7 @@ jobs:
run: |
export PATH="/opt/riscv/bin:$PATH"
make TARGET=${{ matrix.target }} CFLAGS="-DTARGET=${{ matrix.target }}" \
CC='${triple}-gcc' \
CC='ccache clang --rtlib=compiler-rt -target ${triple} --sysroot /opt/riscv/sysroot --gcc-toolchain=/opt/riscv/lib/gcc/riscv64-unknown-linux-gnu/${riscv_gnu_toolchain_version}/' \
AR='ccache ${triple}-ar' AS='ccache ${triple}-gcc' LD='ccache ${triple}-gcc' \
RANLIB='ccache ${triple}-ranlib' \
FC='ccache ${triple}-gfortran' ${{ matrix.opts }} \
@@ -98,6 +101,8 @@ jobs:
shell: bash
run: |
export PATH="/opt/riscv/bin:$PATH"
export LD_LIBRARY_PATH=/opt/riscv/sysroot/lib
sudo ln -s /opt/riscv/sysroot/lib/ld-linux-riscv64-lp64d.so.1 /lib
export QEMU_CPU=${{ matrix.qemu_cpu }}
rm -rf ./test_out
mkdir -p ./test_out
@@ -134,6 +139,14 @@ jobs:
wait
while IFS= read -r -d $'\0' LOG; do cat $LOG ; FAILURES=1 ; done < <(grep -lZ FAIL ./test_out/*)
if [[ ! -z $FAILURES ]]; then echo "==========" ; echo "== FAIL ==" ; echo "==========" ; echo ; exit 1 ; fi
if [ "${{matrix.target}}" == "RISCV64_ZVL256B" ]; then
qemu-riscv64 test/test_sbgemm &
qemu-riscv64 test/test_sbgemv &
qemu-riscv64 test/test_shgemm &
qemu-riscv64 test/test_shgemv &
qemu-riscv64 test/test_bgemm
fi
- name: netlib tests
shell: bash
+84
View File
@@ -0,0 +1,84 @@
name: Windows ARM64 CI
on:
push:
branches:
- develop
pull_request:
branches:
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
if: "github.repository == 'OpenMathLib/OpenBLAS'"
runs-on: windows-11-arm
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install LLVM for Win-ARM64
shell: pwsh
run: |
Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/LLVM-20.1.8-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe
Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
#dir "C:\Program Files\LLVM\include\flang"
#rmdir /Q /S "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/ARM64"
- name: Install CMake and Ninja for Win-ARM64
shell: pwsh
run: |
Invoke-WebRequest https://github.com/Kitware/CMake/releases/download/v3.29.4/cmake-3.29.4-windows-arm64.msi -OutFile cmake-arm64.msi
Start-Process msiexec.exe -ArgumentList "/i cmake-arm64.msi /quiet /norestart" -Wait
echo "C:\Program Files\CMake\bin" >> $env:GITHUB_PATH
Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-winarm64.zip -OutFile ninja-winarm64.zip
Expand-Archive ninja-winarm64.zip -DestinationPath ninja
Copy-Item ninja\ninja.exe -Destination "C:\Windows\System32"
- name: Configure OpenBLAS
shell: cmd
run: |
CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat"
set PATH=C:\Program Files\LLVM\bin;%PATH%
mkdir build
cd build
cmake .. -G Ninja ^
-DCMAKE_BUILD_TYPE=Release ^
-DTARGET=ARMV8 ^
-DBINARY=64 ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_Fortran_COMPILER=flang-new ^
-DBUILD_SHARED_LIBS=ON ^
-DCMAKE_SYSTEM_PROCESSOR=arm64 ^
-DCMAKE_SYSTEM_NAME=Windows ^
-DCMAKE_INSTALL_PREFIX=C:/opt
- name: Build OpenBLAS
shell: cmd
run: |
cd build
ninja -j16
- name: Install OpenBLAS
shell: cmd
run: |
cd build
cmake --install .
- name: Run ctests
shell: pwsh
run: |
$env:PATH = "C:\opt\bin;$env:PATH"
cd build
ctest
+9 -1
View File
@@ -13,8 +13,8 @@ lapack-3.4.1.tgz
lapack-3.4.2
lapack-3.4.2.tgz
lapack-netlib/make.inc
lapack-netlib/lapacke/include/lapacke_mangling.h
lapack-netlib/SRC/la_constants.mod
lapack-netlib/SRC/la_xisnan.mod
lapack-netlib/TESTING/testing_results.txt
lapack-netlib/INSTALL/test*
lapack-netlib/TESTING/xeigtstc
@@ -80,8 +80,12 @@ test/SBLAT3_3M.SUMM
test/ZBLAT2.SUMM
test/ZBLAT3.SUMM
test/ZBLAT3_3M.SUMM
test/SHBLAT2.SUMM
test/SHBLAT3.SUMM
test/SBBLAT2.SUMM
test/SBBLAT3.SUMM
test/BBLAT2.SUMM
test/BBLAT3.SUMM
test/cblat1
test/cblat2
test/cblat3
@@ -95,7 +99,11 @@ test/sblat2
test/sblat3
test/sblat3_3m
test/test_shgemm
test/test_shgemv
test/test_sbgemm
test/test_sbgemv
test/test_bgemm
test/test_bgemv
test/zblat1
test/zblat2
test/zblat3
+58 -10
View File
@@ -9,7 +9,7 @@ project(OpenBLAS C ASM)
set(OpenBLAS_MAJOR_VERSION 0)
set(OpenBLAS_MINOR_VERSION 3)
set(OpenBLAS_PATCH_VERSION 29.dev)
set(OpenBLAS_PATCH_VERSION 32.dev)
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
@@ -62,6 +62,7 @@ option(CPP_THREAD_SAFETY_TEST "Run a massively parallel DGEMM test to confirm th
option(CPP_THREAD_SAFETY_GEMV "Run a massively parallel DGEMV test to confirm thread safety of the library (requires OpenMP)" OFF)
option(BUILD_STATIC_LIBS "Build static library" OFF)
option(BUILD_SHARED_LIBS "Build shared library" OFF)
if(NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
set(BUILD_STATIC_LIBS ON CACHE BOOL "Build static library" FORCE)
endif()
@@ -123,7 +124,12 @@ message(WARNING "CMake support is experimental. It does not yet support all buil
include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
include("${PROJECT_SOURCE_DIR}/cmake/system.cmake")
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE})
string(FIND "${LIBNAMESUFFIX}" "${SUFFIX64_UNDERSCORE}" HAVE64)
if (${HAVE64} GREATER -1)
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX})
else ()
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE})
endif ()
set(BLASDIRS interface driver/level2 driver/level3 driver/others)
@@ -146,6 +152,9 @@ endif ()
if (NOT DEFINED BUILD_BFLOAT16)
set (BUILD_BFLOAT16 false)
endif ()
if (NOT DEFINED BUILD_HFLOAT16)
set (BUILD_HFLOAT16 false)
endif ()
# set which float types we want to build for
if (NOT DEFINED BUILD_SINGLE AND NOT DEFINED BUILD_DOUBLE AND NOT DEFINED BUILD_COMPLEX AND NOT DEFINED BUILD_COMPLEX16)
# if none are defined, build for all
@@ -299,8 +308,8 @@ if (USE_OPENMP)
endif()
endif()
# Fix "Argument list too long" for macOS with Intel CPUs and DYNAMIC_ARCH turned on
if(APPLE AND DYNAMIC_ARCH AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64"))
# Fix "Argument list too long" for macOS - mostly seen with older OS versions on POWERPC or Intel CPUs
if(APPLE)
# Use response files
set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
# Always build static library first
@@ -489,6 +498,11 @@ if (BUILD_SHARED_LIBS OR DELETE_STATIC_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFI
else ()
set (BBF16 0)
endif()
if (${BUILD_HFLOAT16})
set (BHF16 1)
else ()
set (BHF16 0)
endif()
if (${BUILD_SINGLE})
set (BS 1)
else ()
@@ -524,7 +538,7 @@ endif()
#if (USE_PERL)
message(STATUS "adding postbuild instruction to rename syms")
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_static POST_BUILD
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol.pl "win2k" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" "${SYMBOLPREFIX}" "${SYMBOLSUFFIX}" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/renamesyms.def
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol.pl "win2k" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" "${SYMBOLPREFIX}" "${SYMBOLSUFFIX}" "${BLD}" "${BBF16}" "${BHF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/renamesyms.def
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR} -I${PROJECT_BINARY_DIR} -c -o ${PROJECT_BINARY_DIR}/dllinit.o ${PROJECT_SOURCE_DIR}/exports/dllinit.c
COMMAND lld-link -nodefaultlib:libcmt -defaultlib:${CRTLIB} ${CMAKE_LINKER_FLAGS} -errorlimit:0 -def:${PROJECT_BINARY_DIR}/renamesyms.def ${PROJECT_BINARY_DIR}/dllinit.o $<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -wholearchive:$<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -dll -out:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll -implib:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll.a ${PDBOPT}
#COMMAND lld-link -nodefaultlib:libcmt -defaultlib:msvcrt ${CMAKE_LINKER_FLAGS} -errorlimit:0 -def:${PROJECT_BINARY_DIR}/renamesyms.def ${PROJECT_BINARY_DIR}/dllinit.o $<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -wholearchive:$<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -dll -out:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll -implib:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll.a
@@ -534,14 +548,14 @@ message(STATUS "adding postbuild instruction to rename syms")
else ()
if (NOT USE_PERL)
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_shared POST_BUILD
COMMAND sh ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/${OpenBLAS_LIBNAME}.so
COMMAND sh ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BHF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
COMMAND objcopy --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/${OpenBLAS_LIBNAME}.so
COMMENT "renaming symbols"
)
else()
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_shared POST_BUILD
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol.pl "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol.pl "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BHF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
COMMAND objcopy --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
COMMENT "renaming symbols"
)
endif()
@@ -694,6 +708,39 @@ if(NOT NO_LAPACKE)
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/lapack-netlib/LAPACKE/include/lapacke_mangling_with_flags.h.in "${CMAKE_BINARY_DIR}/lapacke_mangling.h"
)
install (FILES ${CMAKE_BINARY_DIR}/lapacke_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if (NOT (x${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "x"))
message (STATUS "Generating lapacke.h in ${CMAKE_INSTALL_INCLUDEDIR}")
set(LAPACKE_H ${CMAKE_BINARY_DIR}/generated/lapacke.h)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/lapack-netlib/LAPACKE/include/lapacke.h LAPACKE_H_CONTENTS)
if (NOT ${SYMBOLPREFIX} STREQUAL "")
string(REGEX REPLACE "(LAPACKE_*)" " ${SYMBOLPREFIX}\\1" LAPACKE_H_CONTENTS_NEW "${LAPACKE_H_CONTENTS}")
string(REPLACE "_ ${SYMBOLPREFIX}LAPACKE_H_" "_LAPACKE_H_" LAPACKE_H_CONTENTS ${LAPACKE_H_CONTENTS_NEW})
string(REPLACE "${SYMBOLPREFIX}LAPACKE_malloc" "LAPACKE_malloc" LAPACKE_H_CONTENTS_NEW ${LAPACKE_H_CONTENTS})
string(REPLACE "${SYMBOLPREFIX}LAPACKE_free" "LAPACKE_free" LAPACKE_H_CONTENTS ${LAPACKE_H_CONTENTS_NEW})
set(LAPACKE_H_CONTENTS_NEW ${LAPACKE_H_CONTENTS})
endif()
if (NOT ${SYMBOLSUFFIX} STREQUAL "")
string(REGEX REPLACE "(${SYMBOLPREFIX}LAPACKE_[a-z1-9]*[^ (]*)" "\\1${SYMBOLSUFFIX}" LAPACKE_H_CONTENTS_NEW "${LAPACKE_H_CONTENTS}")
string(REPLACE "#define${SYMBOLSUFFIX}" "#define" LAPACKE_H_CONTENTS ${LAPACKE_H_CONTENTS_NEW})
string(REPLACE "LAPACKE_malloc${SYMBOLSUFFIX}" "LAPACKE_malloc" LAPACKE_H_CONTENTS_NEW ${LAPACKE_H_CONTENTS})
string(REPLACE "LAPACKE_free${SYMBOLSUFFIX}" "LAPACKE_free" LAPACKE_H_CONTENTS ${LAPACKE_H_CONTENTS_NEW})
set(LAPACKE_H_CONTENTS_NEW ${LAPACKE_H_CONTENTS})
endif()
file(WRITE ${LAPACKE_H} "${LAPACKE_H_CONTENTS_NEW}")
install (FILES ${LAPACKE_H} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
message (STATUS "Generating lapack.h in ${CMAKE_INSTALL_INCLUDEDIR}")
set(LAPACK_H ${CMAKE_BINARY_DIR}/generated/lapack.h)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/lapack-netlib/LAPACKE/include/lapack.h LAPACK_H_CONTENTS)
if (NOT ${SYMBOLPREFIX} STREQUAL "")
string(REGEX REPLACE "(LAPACK_[a-z1-9]*[ \(][.\)]*)" "${SYMBOLPREFIX}\\1" LAPACK_H_CONTENTS_NEW "${LAPACK_H_CONTENTS}")
set(LAPACK_H_CONTENTS ${LAPACK_H_CONTENTS_NEW})
endif()
if (NOT ${SYMBOLSUFFIX} STREQUAL "")
string(REGEX REPLACE "(${SYMBOLPREFIX}LAPACK_[a-z1-9]*)([ \(].\)" "\\1${SYMBOLSUFFIX}\\2" LAPACK_H_CONTENTS_NEW "${LAPACK_H_CONTENTS}")
endif()
file(WRITE ${LAPACK_H} "${LAPACK_H_CONTENTS_NEW}")
install (FILES ${LAPACK_H} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
endif()
# Install pkg-config files
@@ -716,4 +763,5 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
install(EXPORT "${PN}${SUFFIX64}Targets"
NAMESPACE "${PN}${SUFFIX64}::"
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
+22 -1
View File
@@ -29,6 +29,9 @@
* Annop Wongwathanarat <annop.wongwathanarat@arm.com>
* Optimizations and other improvements targeting AArch64
* Anna Mayne <anna.mayne@arm.com>
* Optimizations and other improvements targeting AArch64
## Previous Developers
* Zaheer Chothia <zaheer.chothia@gmail.com>
@@ -251,6 +254,24 @@ In chronological order:
* Ye Tao <ye.tao@arm.com>
* [2025-02-03] Optimize SBGEMM kernel on NEOVERSEV1
* [2025-02-27] Add sbgemv_n_neon kernel
* [2025-05-17] Impl prototype of BGEMM inferface
* Abhishek Kumar <https://github.com/abhishek-iitmadras>
* [2025-04-22] Optimise dot kernel for NEOVERSE V1
* [2025-04-22] Optimise dot kernel for NEOVERSE V1
* [2025-07-23] ARM64-Enable bfloat16 kernels by default
* Sharif Inamdar <sharif.inamdar@arm.com>
* [2025-06-05] Optimize gemv_n_sve_v1x3 kernel
* Guoyuan Li <https://github.com/guoyuanplct>
* [2025-04-11] Optimise gemv kernel for RISCV64_ZVL256B
* [2025-05-01] Optimise zgemv kernel for RISCV64_ZVL256B
* [2025-05-17] Optimise omatcopy/zomatcopy kernel for RISCV64_ZVL256B
* [2025-05-29] Optimise axpby kernel for RISCV64_ZVL256B
* [2025-06-05] Optimise hbmv kernel for RISCV64_ZVL256B
* Anna Mayne <anna.mayne@arm.com>
* [2025-11-19] Update thread throttling profile for SGEMV on NEOVERSEV1 and NEOVERSEV2
* Fadi Arafeh <fadi.arafeh@arm.com>
* [2026-03-05] Accelerate SVE128 SBGEMM/BGEMM
+333
View File
@@ -1,4 +1,337 @@
OpenBLAS ChangeLog
====================================================================
Version 0.3.32
23-Mar-2026
general:
- Moved the preliminary support for a Web Assembly target to its own WASM
architecture and WASM128_GENERIC target
- Fixed a potential performance difference between dedicated compilation for
a target and its representation in DYNAMIC_ARCH builds by making additional
cpu-specific parameters available to the DYNAMIC_ARCH configuration
- Fixed the reimplementation of LAPACK ?GESV to conform to the reference (i.e.
compute the LU factorization even when NRHS is zero)
- Improved the error message that is displayed when the compile-time allocation
of memory buffers is exceeded
- Fixed a problem with non-serialized accesses to parallelized SYRK by concurrent
callers
- Fixed an ABI mismatch in the internal version of CDOT/ZDOT used by the C fallback
versions of the LAPACK source
- Improved the f_check script for detecting the Fortran compiler to handle embedded
dashes in path names
- Fixed several memory access issues in the utests that were detected by Address
Sanitizer
- Fixed Makefile errors in cases where only a subset of precision types was selected
- Fixed missing function errors in Makefile builds without LAPACK or without threads
- Fixed a syntax error in the benchmarks Makefile
- Fixed compiler warnings in the CBLAS testsuite
- Fixed the OpenMP compiler option used with the Intel Ifx compiler
- Updated the README sections on supported cpus and operating systems, and added
notes pertaining to JAVA
- Updated the documentation page for supported BLAS-like extensions
- included fixes from the Reference-LAPACK project:
- Improved step length selection in the fallback path of ?LAED4
(Reference-LAPACK PR 1191)
- Rounding up of LWORK and removal of redundant type conversions in the GVD
functions (Reference-LAPACK PR 1202)
- internal errors were getting ignored in calculation of selected eigenvalues
(Reference-LAPACK PR 1204)
arm64:
- Fixed a potential miscompilation of the SDOT/DDOT/DSDOT kernels
- Fixed DYNAMIC_ARCH compilation with CMake and compilers lacking SVE support
- Improved the performance of BGEMM and SBGEMM kernels for Neoverse V2
- Added optimized SSUM and DSUM kernels for Neoverse N1
- Added preliminary support for Neoverse V3 cpus as NEOVERSEV2
- Added cpu autodetection of Cortex A725 and X925 cpus
- Fixed a CMake build problem with flang on Mac OS
- Fixed build problems with gcc versions 12 and earlier that do not support fp16
- Fixed compilation of GEMM kernels for VORTEXM4/ARMV9SME without multithreading
- Fixed the optimized CDOT/ZDOT kernel to compile with LLVM under Windows on Arm
- Renamed the copy of the DllMain function used in static linking on MS Windows to
OpenBLASDllMain to avoid symbol name conflicts with other libraries
ioongarch64:
- fixed POTRF returning wrong results on LA464 due to a wrong parameter setting
power:
- Fixed compilation problems caused by missing support for half-precision floats (FP16)
- Fixed a potential miscompilation of the POWER10 DGEMV kernel by limiting its optimization
level
- Fixed a SCAL issue on PPCG4/PPC970 running Linux
- Worked around a SCAL issue on PPC970 running FreeBSD by switching to the generic C kernels
riscv64:
- Optimized the CROT/ZROT kernel for vector length 128 in the non-unit stride path
- Improved SBGEMM/SHGEMM and related helper functions for type conversion
- Fixed probing for BFLOAT16 support in DYNAMIC_ARCH cpu detection at runtime
x86_64:
- Fixed a potential miscompilation (by gcc 15.x) of the AVX512 SGEMM kernel for "small"
matrix sizes
- Fixed the SROT and DROT kernels for Haswell to have consistent (FMA) rounding
in the main loop and tail call
- Added automatic detection of Intel Arrow Lake H/U, Panther Lake and Jasper Lake
- Added automatic detection of Intel Emerald Rapids and upcoming cpu models
- Updated the cache size translation table in the cpu model autodetection code
- Improved cpu detection fallback to also include Nehalem as a non-AVX option
- Fixed a Makefile build issue with clang and the SkylakeX SGEMM kernel
- Renamed the copy of the DllMain function used in static linking on MS Windows to
OpenBLASDllMain to avoid symbol name conflicts with other libraries
wasm:
- Added optimized intrinsics kernels for SGEMM and DGEMM as well as DOT, ROT and SUM
====================================================================
Version 0.3.31
15-Jan-2026
general:
- reverted a matrix partitioning optimization from 0.3.30 that could lead to
race conditions and subsequent invalid results in GEMM
- added the bfloat16 extensions BGEMM and BGEMV
- added a BLAS interface for the ?GEMM_BATCH extensions
- added the BLAS extensions ?GEMM_BATCH_STRIDED and their CBLAS interface
- added the basic infrastructure for half-precision float (FP16) format
using SH prefix
- reimplemented the LAPACK SLAED3/DLAED3 function using multithreading, thereby
improving the performance of the SSYEVD/DSYEVD eigensolver for symmetric matrices
on all platforms
- limited the number of retries for initial memory allocation to avoid infinite
hanging on low-memory systems
- fixed a thread lockup situation encountered with python 3.9 or older and numpy
- introduced a problem size threshold for multithreading in STRMV/DTRMV
- introduced a problem size threshold for multithreading in CHER/CHER2/CHPR/CHPR2
and ZHER/ZHER2/ZHPR/ZHPR2
- improved the problem size thresholds for multithreading in SGER/DGER
- improved autodetection of the Fortran compiler
- fixed passing of the INTERFACE64=1 option to the flang-new compiler
- fixed a potential deadlock in multithreaded code after calling fork()
- fixed builds using CMake on FreeBSD
- fixed builds using CMake from within Cygwin on Windows
- fixed builds using CMake and the NVHPC compiler on ARM64
- fixed CMake build error from misdetecting compiler or OpenMP versions
- improved contents of the CMake-generated OpenBLASConfig.cmake file
- added support for cross-compilation to RISCV targets via CMake
- fixed cross-compilation to x86 targets from non-x86 architectures
- fixed failure to install cblas.h if NO_CBLAS=0 was specified
- fixed missing user-defined pre- and postfixes on functions in lapack.h,lapacke.h
- included fixes from the Reference-LAPACK project:
- fix ordering bug in ?LAED/?LASD (Reference-LAPACK PR 1140)
- revert changes in ?GEEV from PR 1129 (Reference-LAPACK PR 1142)
- fix workspace allocation in LAPACKE_?TRSEN (Reference-LAPACK PR 1144)
riscv:
- added optimized SBGEMM kernels for ZVL128B and ZVL256B targets
- added optimized SHGEMM kernels for ZVL128B and ZVL256B targets
- added optimized SBGEMV and SHGEMV kernels for ZVL128B/ZVL256B
- improved performance of the GEMV kernel for ZVL256B
- improved the performance of the CROT and ZROT kernels for ZVL128B and x280
- improved the detection of RVV1.0 capability
- improved performance of the matrix packing helper functions for ZVL128B and ZVL256B
- improved performance of OMATCOPY for ZVL128B and ZVL256B
arm:
- fixed spurious executable stack in the getarch utility
arm64:
- fixed spurious executable stack in the getarch utility
- fixed compiler warnings arising from the timer macro RPCC
- fixed cache size detection for Qualcomm Oryon under Windows on Arm
- fixed argument handling in the default SVE kernel for SDOT/DDOT
- building the BFLOAT16 kernels is now enabled by default
- improved the overall performance of GEMM,SYMM and HEMM on A64FX
- improved the performance of SDOT/DDOT on A64FX
- improved the multithreading performance of SDOT/DDOT on A64FX by
introduction of a throttling table matching thread count to problem size
- improved the performance of SGER/DGER on A64FX and NEOVERSEV1
- improved the multithreading performance of GEMM on A64FX and NEOVERSEV1
- improved the performance of the GEMV kernel for SVE-capable targets
- improved the multithreading performance of SGEMM on NEOVERSEV1 and V2
- added optimized SAXPY/DAXPY SVE kernels for A64FX and NEOVERSEV1
- added optimized BGEMM and BGEMV kernels for NEOVERSEV1
- added an optimized BGEMM kernel for NEOVERSEN2
- added support for the NEOVERSEV2 cpu
- added dedicated support for the Apple M4 cpu as VORTEXM4
- added optimized SGEMM/SSYMM/STRMM/SSYRK/SSYR2K for SME-capable targets
(ARMV9SME and VORTEXM4)
- improved the precision of the SNRM2 kernel
- added cpu autodetection and compiler settings for Ampere One processors
- fixed cpu autodetection for Apple M systems running Linux
- fixed building on MacOS with AppleClang,gfortran and xcode v16 or newer
- fixed several errors in the C code replacements for the complex and double
precision complex LAPACK functions that get used (only) when compiling with
Microsoft C and NOFORTRAN=1 under MS Windows
power:
- added initial support for the POWER11 architecture
- improved performance of DGEMM and DGEMV on POWER10
- fixed the default compiler flags to use "-O3" instead of the possibly unsafe
"-Ofast"
- fixed building under MacOS (for old G4 Macs) with CMake
- fixed potential miscompilation of DGEMV and other assembly kernels by gcc15.1
- fixed compilation with recent versions of flang
loongarch64:
- fixed warnings and potential inaccuracies arising from incorrect saving of registers
- fixed enumeration of logical cores on big NUMA servers
- fixed building with LLVM and the INTERFACE64=1 option
x86:
- fixed building the GEMM3M kernels for the GENERIC target
- fixed several errors in the C code replacements for the complex and double
precision complex LAPACK functions that get used (only) when compiling with
Microsoft C and NOFORTRAN=1 under MS Windows
x86_64:
- added cpu autodetection for Intel Lunar Lake (Core Ultra 200V)
- changed all ?MIN and ?MAX assembly kernels to use unaligned operations
- fixed several errors in the C code replacements for the complex and double
precision complex LAPACK functions that get used (only) when compiling with
Microsoft C and NOFORTRAN=1 under MS Windows
- fixed potential crashes in builds for Cooper Lake, Sapphire Rapids or Zen5 cpus
under MS Windows
zarch:
- added support for building with CMake
sparc:
- fixed a potential crash in the DNRM2 kernel
====================================================================
Version 0.3.30
19-Jun-2025
general:
- fixed an installation problem with the thread safety test in gmake builds
- fixed spurious overwriting of an input array in complex GEMMT/GEMMTR
- fixed naming of GEMMTR in error messages from XERBLA
- fixed compilation of SBGEMMT/SBGEMMTR in CMake builds
- fixed the implementation of ?NRM2 to handle INCX=0 correctly
- removed tests for CSROT and ZDROT that relied on unspecified behavior
- fixed a performance regression in multithreaded GEMM that was particularly
serious on POWER targets
- fixed linking issues when using LLVM's flang-new with gmake
- fixed a potential thread safety problem with C11 atomic operations
- further improved the workload partitioning in parallel GEMM
- fixed omission of LAPACKE interfaces for CGESVDQ,CTRSYL3 and ?GEQPF in
CMake builds
- fixed mishandling of setting NO_LAPACK to FALSE, and incorrect dependencies
for LAPACK function SPMV in CMake builds
- added explicit CMake options for building LAPACKE and shared libraries
- simplified and improved handling of OpenMP options in CMake builds
- reworked Windows DLL generation in CMake builds to ensure correct symbol
renaming (pre/postfixing) and optional generation of PDB files for debugging
- updated the Perl script version of the gensymbol utility for use with
Windows-on-Arm
- Fixed building with (Mingw) gmake on Windows to ensure completeness of the
LAPACK included in the static library (potential race condition due to the
Windows version of the "ln" utility creating snapshot copies rather than links)
- fixed unwanted deletion of the lapacke_mangling.h file by "make clean"
- fixed potential duplication of a _64 suffix on library names in CMake builds
- fixed compilation of the C fallback copies of the LAPACK code with GCC 15
- included fixed from the Reference-LAPACK project:
- fixed a truncated error message in the EIG part of the testsuite
(Reference-LAPACK PR 1119)
- fixed too strict check in LAPACKE_?gesdd_work (PR #1126)
- fixed memory corruption when calling ?GEEV with non-finite data (PR #1128)
- fixed missing initialization of a variable in C/GEQP3RK (PR #1131)
- fixed 2nd dimension chosen in C/ZUNMLQ transposition operation (PR #1135)
x86_64:
- fixed an error in the SBGEMV kernel for Cooper Lake/Sapphire Rapids
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
- improved the compiler identification code for flang-new
- fixed a potential build issue in the ZSUM kernel
- fixed "argument list too long" errors when building on MacOS
- added cpu autodetection support for several new Arrow Lake models
- fixed conditional inclusion of the fast path SGEMM kernel in DYNAMIC_ARCH
- fixed compilation with the MinGW build of GCC 15
arm64:
- fixed cpu type detection of A64FX and some ThunderX models (broken in 0.3.29)
- added support for the AmpereOne/1A cpus in DYNAMIC_ ARCH builds
- added an optimized SBGEMM kernel for NEOVERSEV1
- improved 1xN SBGEMM performance by forwarding to SBGEMV
- introduced a stepwise increase of the thread count used for
SGEMM and SGEMV on NEOVERSEV1/V2 in relation to problem size
- introduced a stepwise increase of the thread count used for
DGEMV on NEOVERSEV1 in relation to problem size
- introduced a stepwise increase of the thread count used for
SDOT and DDOT on NEOVERSEV1 in relation to problem size
- worked around assembler limitations in LLVM for Windows-on-Arm
- enabled cpu type autodetection from the registry on Windows-on-Arm
- improved multithreading threshold for GEMV and GESV on Windows-on-Arm
- fixed overoptimization issues with LLVM's flang in Windows-on-Arm
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
- added a fast path SGEMM kernel for small workloads on SME capable targets
- improved performance of SGEMM and DGEMM kernels for small workloads
- improved performance of SGEMV and DGEMV on SVE-capable targets
- improved performance of SGEMV on NEOVERSEN1 and Apple M
- added optimized SSYMV and DSYMV kernels for NEOVERSEN1, Apple M and all
SVE capable targets
- added optimized SBGEMV kernels for NEOVERSEV1/V2/N2
- improved performance of SGEMM through faster NCOPY kernels
- added compiler options for the NVIDIA HPC Compiler Suite
- fixed compilation on OSX with XCode 16.3 and later
- fixed cpu core type and cache size detection on Apple M4
- updated GEMM parameter settings for Neoverse cpus in cross-builds with CMake
- fixed default compiler options for NEOVERSEN1 and CORTEXX2 in CMake builds
- fixed conditional inclusion of the fast path SGEMM kernel in DYNAMIC_ARCH
- fixed potential miscompilation of the non-SVE SDOT kernel
riscv64:
- added optimized SROTM and DROTM kernels for x280
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
- improved performance of GEMM_TCOPY on RVV1.0 targets with
VLEN of 128 or 256
- improved performance of OMATCOPY on targets with VLEN 256
- greatly improved performance of SGEMV/DGEMV
- improved performance of CGEMV and ZGEMV on C910V and all RVV targets
with VLEN 256
- improved performance of SAXPBY and DAXPBY on C910V and all RVV targets
with VLEN 256
- improved performance of AXPY and DOT on C910V and ZVL256B targets by
falling back to non-vectorized code for very small N. (Thereby fixing
poor performance of CHBMV/ZHBMV for very small K)
- fixed CMake build failures of the TRMM kernels
loongarch64:
- improved performance of the LSX versions of SSYMV/DSYMV
- made the LASX versions of the DSYMV and SSYMV kernels
compatible with hardware changes in LA664 and future targets
- fixed inaccuracies in several LASX kernels
- improved compatibility of LSX kernels with LA264 targets
- fixed handling of deprecated target names in CMake builds
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
power:
- fixed building for PPCG4 with CMake
- fixed SSCAL/DSCAL on PPC970 running FreeBSD
- fixed a potential alignment issue in the POWER8 SGEMV kernel
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
zarch:
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
- fixed unwanted generation of object files with a writable stack
x86:
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
- worked around potential miscompilation of CDOT with very old binutils
arm:
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
- fixed unwanted generation of object files with a writable stack
sparc:
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
alpha:
- fixed build failure caused by spurious Windows-only typecasts
cell:
- fixed probable build issue caused by spurious Windows-only typecasts
====================================================================
Version 0.3.29
12-Jan-2025
Vendored
+5
View File
@@ -10,5 +10,10 @@ pipeline {
sh 'make clean && make'
}
}
stage('CMakeBuild') {
steps {
sh 'sudo apt update && sudo apt install cmake -y && make clean && rm -rf build && mkdir build && cd build && cmake -DDYNAMIC_ARCH=1 .. && make'
}
}
}
}
+21 -6
View File
@@ -1,16 +1,31 @@
pipeline {
agent {
docker {
image 'osuosl/ubuntu-ppc64le:18.04'
}
}
agent none
stages {
stage('Build') {
stage('GCC build') {
agent {
docker {
image 'osuosl/ubuntu-ppc64le:18.04' // gcc 7, gfortran 7
}
}
steps {
checkout scm
sh 'sudo apt update'
sh 'sudo apt install gfortran -y'
sh 'make clean && make'
}
}
stage('Clang build') {
agent {
docker {
image 'osuosl/ubuntu-ppc64le:20.04' // clang 10, gfortran 9
}
}
steps {
checkout scm
sh 'sudo apt update'
sh 'sudo apt install -y clang gfortran'
sh 'make clean && make CC=clang'
}
}
}
}
+65 -3
View File
@@ -1,3 +1,31 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
ifneq ($(C_COMPILER), PGI)
ifeq ($(C_COMPILER), CLANG)
@@ -33,6 +61,11 @@ endif
ifeq ($(CORE), ARMV9SME)
CCOMMON_OPT += -march=armv9-a+sve2+sme
FCOMMON_OPT += -march=armv9-a+sve2
ifdef OS_WINDOWS
ifeq ($(C_COMPILER), CLANG)
CCOMMON_OPT += --aarch64-stack-hazard-size=0
endif
endif
endif
ifeq ($(CORE), CORTEXA53)
@@ -183,10 +216,25 @@ endif
# Detect ARM Neoverse V2.
ifeq ($(CORE), NEOVERSEV2)
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
CCOMMON_OPT += -march=armv9-a -mtune=neoverse-v2
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ13) $(ISCLANG)))
CCOMMON_OPT += -mcpu=neoverse-v2
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv9-a -mtune=neoverse-v2
FCOMMON_OPT += -mcpu=neoverse-v2
endif
else
CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n1
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=neoverse-n1
endif
endif
endif
# Detect Ampere AmpereOne(ampere1,ampere1a) processors.
ifeq ($(CORE), AMPERE1)
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
CCOMMON_OPT += -march=armv8.6-a+crypto+crc+fp16+sha3+rng
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.6-a+crypto+crc+fp16+sha3+rng
endif
endif
endif
@@ -260,6 +308,20 @@ FCOMMON_OPT += -march=armv8.3-a
endif
endif
ifeq ($(CORE), VORTEXM4)
ifneq ($(C_COMPILER), GCC)
ifeq ($(APPLECLANG),1)
CCOMMON_OPT += -march=armv8.4-a+sme
else
CCOMMON_OPT += -march=armv8.4-a+sme
override LDFLAGS += -lclang_rt_builtins-aarch64
endif
else
CCOMMON_OPT += -march=armv8.4-a
endif
FCOMMON_OPT += -march=armv8.4-a
endif
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ9) $(ISCLANG)))
ifeq ($(CORE), TSV110)
CCOMMON_OPT += -march=armv8.2-a -mtune=tsv110
+44 -3
View File
@@ -71,7 +71,7 @@ install : lib.grd
@cat common_interface.h >> "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/f77blas.h"
@echo \#endif >> "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/f77blas.h"
ifndef NO_CBLAS
ifneq ($(NO_CBLAS),1)
@echo Generating cblas.h in $(DESTDIR)$(OPENBLAS_INCLUDE_DIR)
@cp cblas.h cblas.tmp
ifdef SYMBOLPREFIX
@@ -93,9 +93,27 @@ endif
ifneq ($(OSNAME), AIX)
ifneq ($(NO_LAPACKE), 1)
@cp $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke.h lapacke_h.tmp
ifdef SYMBOLPREFIX
@sed 's/LAPACKE_[a-z1-9].[^() ]*/$(SYMBOLPREFIX)&/g' lapacke_h.tmp > lapacke.tmp2
@mv lapacke.tmp2 lapacke_h.tmp
endif
ifdef SYMBOLSUFFIX
@sed 's/LAPACKE_[a-z1-9].[^() ]*/&$(SYMBOLSUFFIX)/g' lapacke_h.tmp > lapacke.tmp2
@mv lapacke.tmp2 lapacke_h.tmp
endif
@-install -m644 lapacke_h.tmp "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke.h"
@echo Copying LAPACKE header files to $(DESTDIR)$(OPENBLAS_INCLUDE_DIR)
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapack.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapack.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke.h"
@cp $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapack.h lapack_h.tmp
ifdef SYMBOLPREFIX
@sed 's/LAPACK_[a-z1-9]*(\.\.\.)/$(SYMBOLPREFIX)&/g' lapack_h.tmp > lapack.tmp2
@mv lapack.tmp2 lapack_h.tmp
endif
ifdef SYMBOLSUFFIX
@sed 's/\(#define $(SYMBOLPREFIX)LAPACK_[a-z1-9].*\)\((...)\)/\1$(SYMBOLSUFFIX)\2/g' lapack_h.tmp > lapack.tmp2
@mv lapack.tmp2 lapack_h.tmp
endif
@-install -m644 lapack_h.tmp "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapack.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_config.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_config.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_mangling_with_flags.h.in "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_mangling.h"
@-install -m644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_utils.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_utils.h"
@@ -189,6 +207,8 @@ endif
#Generating OpenBLASConfig.cmake
ifneq ($(origin _OpenBLAS_ROOT_DIR),"undefined")
@echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
@echo "SET(OpenBLAS_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
@echo "file(REAL_PATH \"../../..\" _OpenBLAS_ROOT_DIR BASE_DIRECTORY \$${CMAKE_CURRENT_LIST_DIR} )" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
@@ -215,6 +235,27 @@ else
#only static
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/lib/$(LIBPREFIX).$(LIBSUFFIX))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
endif
else
echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
@echo "SET(OpenBLAS_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
@echo "SET(OpenBLAS_INCLUDE_DIRS ${OPENBLAS_INCLUDE_DIR})" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
ifneq ($(NO_SHARED),1)
#ifeq logical or
ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD OpenBSD DragonFly))
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX)$(SYMBOLSUFFIX).so)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
endif
ifeq ($(OSNAME), $(filter $(OSNAME),WINNT CYGWIN_NT))
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_BINARY_DIR}/$(LIBDLLNAME))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
ifeq ($(OSNAME), Darwin)
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX).dylib)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
endif
else
#only static
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX).$(LIBSUFFIX))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
endif
endif
endif
#Generating OpenBLASConfigVersion.cmake
@echo Generating $(OPENBLAS_CMAKE_CONFIG_VERSION) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
@echo "set (PACKAGE_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG_VERSION)"
+13 -6
View File
@@ -13,16 +13,16 @@ ifeq ($(CORE), POWER10)
ifneq ($(C_COMPILER), PGI)
ifeq ($(C_COMPILER), GCC)
ifeq ($(GCCVERSIONGTEQ10), 1)
CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
CCOMMON_OPT += -O3 -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
else ifneq ($(GCCVERSIONGT4), 1)
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
CCOMMON_OPT += -O3 -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
else
$(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended)
CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math
CCOMMON_OPT += -O3 -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math
endif
else
CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
CCOMMON_OPT += -O3 -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
endif
ifeq ($(F_COMPILER), IBM)
FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize
@@ -34,7 +34,7 @@ endif
ifeq ($(CORE), POWER9)
ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mvsx -fno-fast-math
CCOMMON_OPT += -O3 -mvsx -fno-fast-math
ifeq ($(C_COMPILER), GCC)
ifneq ($(GCCVERSIONGT4), 1)
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
@@ -70,7 +70,7 @@ endif
ifeq ($(CORE), POWER8)
ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
CCOMMON_OPT += -O3 -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
else
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
endif
@@ -118,6 +118,10 @@ ifeq ($(F_COMPILER), GFORTRAN)
FCOMMON_OPT += -fno-optimize-sibling-calls
endif
ifeq ($(F_COMPILER), FLANGNEW)
override FCOMMON_OPT := $(filter-out -frecursive,$(FCOMMON_OPT))
endif
FLAMEPATH = $(HOME)/flame/lib
#ifeq ($(CORE), CELL)
@@ -147,12 +151,15 @@ endif
ifdef BINARY64
#Skip C/Fortran compiler combination checks in AIX if NO_FORTRAN or ONLY_CBLAS is set
ifeq ($(filter 1,$(NO_FORTRAN) $(ONLY_CBLAS)),)
ifeq ($(C_COMPILER)$(F_COMPILER)$(OSNAME), GCCIBMAIX)
$(error Using GCC and XLF on AIX is not a supported combination.)
endif
ifeq ($(C_COMPILER)$(F_COMPILER)$(OSNAME), CLANGGFORTRANAIX)
$(error Using Clang and gFortran on AIX is not a supported combination.)
endif
endif
ifeq ($(OSNAME), AIX)
ifeq ($(C_COMPILER), GCC)
+11 -4
View File
@@ -6,13 +6,20 @@ ifeq ($(CORE), x280)
CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d -static
endif
RISCV64_OPT = rv64imafdcv
ifeq ($(BUILD_HFLOAT16), 1)
RISCV64_OPT := $(RISCV64_OPT)_zvfh_zfh
endif
ifeq ($(BUILD_BFLOAT16), 1)
RISCV64_OPT := $(RISCV64_OPT)_zvfbfwma
endif
ifeq ($(CORE), RISCV64_ZVL256B)
CCOMMON_OPT += -march=rv64imafdcv_zvl256b -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
CCOMMON_OPT += -march=$(RISCV64_OPT)_zvl256b -mabi=lp64d
FCOMMON_OPT += -march=$(RISCV64_OPT) -mabi=lp64d
endif
ifeq ($(CORE), RISCV64_ZVL128B)
CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
CCOMMON_OPT += -march=$(RISCV64_OPT) -mabi=lp64d
FCOMMON_OPT += -march=$(RISCV64_OPT) -mabi=lp64d
endif
ifeq ($(CORE), RISCV64_GENERIC)
CCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
+3 -1
View File
@@ -3,7 +3,7 @@
#
# This library's version
VERSION = 0.3.29.dev
VERSION = 0.3.32.dev
# If you set this prefix, the library name will be lib$(LIBNAMESUFFIX)openblas.a
# and lib$(LIBNAMESUFFIX)openblas.so, with a matching soname in the shared library
@@ -308,6 +308,8 @@ COMMON_PROF = -pg
# If you want to enable the experimental BFLOAT16 support
# BUILD_BFLOAT16 = 1
# If you want to enable the experimental HFLOAT16 support
# BUILD_HFLOAT16 = 1
# Set the thread number threshold beyond which the job array for the threaded level3 BLAS
# will be allocated on the heap rather than the stack. (This array alone requires
+38 -12
View File
@@ -270,19 +270,22 @@ SMALL_MATRIX_OPT = 1
BUILD_BFLOAT16 = 1
else ifeq ($(ARCH), arm64)
SMALL_MATRIX_OPT = 1
BUILD_BFLOAT16 = 1
endif
ifeq ($(ARCH), loongarch64)
SMALL_MATRIX_OPT = 1
endif
ifeq ($(ARCH), arm64)
GEMM_GEMV_FORWARD = 1
SBGEMM_GEMV_FORWARD = 1
BGEMM_GEMV_FORWARD = 1
endif
ifeq ($(ARCH), riscv)
GEMM_GEMV_FORWARD = 1
endif
ifeq ($(ARCH), power)
GEMM_GEMV_FORWARD = 1
GEMM_GEMV_FORWARD_BF16 = 1
SBGEMM_GEMV_FORWARD = 1
endif
ifeq ($(SMALL_MATRIX_OPT), 1)
@@ -292,8 +295,11 @@ ifneq ($(ONLY_CBLAS), 1)
ifeq ($(GEMM_GEMV_FORWARD), 1)
CCOMMON_OPT += -DGEMM_GEMV_FORWARD
endif
ifeq ($(GEMM_GEMV_FORWARD_BF16), 1)
CCOMMON_OPT += -DGEMM_GEMV_FORWARD_BF16
ifeq ($(SBGEMM_GEMV_FORWARD), 1)
CCOMMON_OPT += -DSBGEMM_GEMV_FORWARD
endif
ifeq ($(BGEMM_GEMV_FORWARD), 1)
CCOMMON_OPT += -DBGEMM_GEMV_FORWARD
endif
endif
@@ -325,6 +331,7 @@ HAVE_SSE5=
HAVE_AVX=
HAVE_AVX2=
HAVE_FMA3=
HAVE_SME=
include $(TOPDIR)/Makefile_kernel.conf
endif
@@ -392,6 +399,8 @@ GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
GCCVERSIONGTEQ10 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 10)
GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
GCCVERSIONGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
GCCVERSIONGTEQ13 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 13)
GCCVERSIONGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
# Note that the behavior of -dumpversion is compile-time-configurable for
# gcc-7.x and newer. Use -dumpfullversion there
ifeq ($(GCCVERSIONGTEQ7),1)
@@ -418,10 +427,8 @@ ifeq ($(OSNAME), Darwin)
ifndef MACOSX_DEPLOYMENT_TARGET
ifeq ($(ARCH), arm64)
export MACOSX_DEPLOYMENT_TARGET=11.0
ifeq ($(C_COMPILER), GCC)
export NO_SVE = 1
export NO_SME = 1
endif
# export NO_SME = 1
else
export MACOSX_DEPLOYMENT_TARGET=10.8
endif
@@ -435,12 +442,10 @@ ifeq (x$(XCVER), x 15)
CCOMMON_OPT += -Wl,-ld_classic
FCOMMON_OPT += -Wl,-ld_classic
endif
ifeq (x$(XCVER), x 16)
ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(shell [ $(XCVER) -ge 16 ] && echo yes),yes)
override CEXTRALIB := $(filter-out(-lto_library, $(CEXTRALIB)))
endif
endif
endif
ifneq (,$(findstring $(OSNAME), FreeBSD OpenBSD DragonFly))
MD5SUM = md5 -r
@@ -717,6 +722,11 @@ DYNAMIC_CORE += A64FX
endif
ifneq ($(NO_SME), 1)
DYNAMIC_CORE += ARMV9SME
ifeq ($(OSNAME), Darwin)
ifneq ($(C_COMPILER), GCC)
DYNAMIC_CORE += VORTEXM4
endif
endif
endif
DYNAMIC_CORE += THUNDERX
DYNAMIC_CORE += THUNDERX2T99
@@ -883,7 +893,7 @@ NO_BINARY_MODE = 1
BINARY_DEFINED = 1
ifdef INTERFACE64
ifneq ($(INTERFACE64), 0)
ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(F_COMPILER), $(filter $(F_COMPILER),GFORTRAN FLANGNEW))
FCOMMON_OPT += -fdefault-integer-8
endif
ifeq ($(F_COMPILER), FLANG)
@@ -898,7 +908,7 @@ NO_BINARY_MODE = 1
BINARY_DEFINED = 1
ifdef INTERFACE64
ifneq ($(INTERFACE64), 0)
ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(F_COMPILER), $(filter $(F_COMPILER),GFORTRAN FLANGNEW))
FCOMMON_OPT += -fdefault-integer-8
endif
ifeq ($(F_COMPILER), FLANG)
@@ -913,7 +923,7 @@ NO_BINARY_MODE = 1
BINARY_DEFINED = 1
ifdef INTERFACE64
ifneq ($(INTERFACE64), 0)
ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(F_COMPILER), $(filter $(F_COMPILER),GFORTRAN FLANGNEW))
FCOMMON_OPT += -fdefault-integer-8
endif
ifeq ($(F_COMPILER), FLANG)
@@ -1190,6 +1200,13 @@ endif
else ifeq ($(ARCH), $(filter $(ARCH),mips))
FCOMMON_OPT += -mabi=32
endif
ifeq ($(ARCH), $(filter $(ARCH),loongarch64))
ifdef INTERFACE64
ifneq ($(INTERFACE64), 0)
FCOMMON_OPT += -fdefault-integer-8
endif
endif
endif
else
ifdef BINARY64
ifneq ($(OSNAME), AIX)
@@ -1546,6 +1563,9 @@ endif
ifeq ($(BUILD_BFLOAT16), 1)
CCOMMON_OPT += -DBUILD_BFLOAT16
endif
ifeq ($(BUILD_HFLOAT16), 1)
CCOMMON_OPT += -DBUILD_HFLOAT16
endif
ifeq ($(BUILD_SINGLE), 1)
CCOMMON_OPT += -DBUILD_SINGLE=1
endif
@@ -1882,17 +1902,23 @@ ifndef NO_MSA
export HAVE_MSA
export MSA_FLAGS
endif
export HAVE_SME
export KERNELDIR
export FUNCTION_PROFILE
export TARGET_CORE
export NO_AVX512
export NO_AVX2
export BUILD_BFLOAT16
export BUILD_HFLOAT16
export NO_LSX
export NO_LASX
export BGEMM_UNROLL_M
export BGEMM_UNROLL_N
export SBGEMM_UNROLL_M
export SBGEMM_UNROLL_N
export SHGEMM_UNROLL_M
export SHGEMM_UNROLL_N
export SGEMM_UNROLL_M
export SGEMM_UNROLL_N
export DGEMM_UNROLL_M
+36 -2
View File
@@ -1,4 +1,34 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
BBLASOBJS_P = $(BBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
SBBLASOBJS_P = $(SBBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
SHBLASPBJS_P = $(SHBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
SBLASOBJS_P = $(SBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
DBLASOBJS_P = $(DBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
QBLASOBJS_P = $(QBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
@@ -11,8 +41,8 @@ COMMONOBJS_P = $(COMMONOBJS:.$(SUFFIX)=.$(PSUFFIX))
HPLOBJS_P = $(HPLOBJS:.$(SUFFIX)=.$(PSUFFIX))
BLASOBJS = $(SBEXTOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(CBAUXOBJS)
BLASOBJS_P = $(SBEXTOBJS_P) $(SBBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) $(CBAUXOBJS_P)
BLASOBJS = $(SHBLASOBJS) $(BBLASOBJS) $(SBEXTOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(CBAUXOBJS)
BLASOBJS_P = $(SHBLASPBJS_P) $(BBLASOBJS_P) $(SBEXTOBJS_P) $(SBBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) $(CBAUXOBJS_P)
ifdef EXPRECISION
BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
@@ -24,6 +54,8 @@ BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
BLASOBJS_P += $(QBLASOBJS_P) $(XBLASOBJS_P)
endif
$(SHBLASOBJS) $(SHBLASOBJS_P) : override CFLAGS += -DHFLOAT16 -UDOUBLE -UCOMPLEX
$(BBLASOBJS) $(BBLASOBJS_P) : override CFLAGS += -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX
$(SBBLASOBJS) $(SBBLASOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
$(SBLASOBJS) $(SBLASOBJS_P) : override CFLAGS += -UDOUBLE -UCOMPLEX
$(DBLASOBJS) $(DBLASOBJS_P) : override CFLAGS += -DDOUBLE -UCOMPLEX
@@ -33,6 +65,8 @@ $(ZBLASOBJS) $(ZBLASOBJS_P) : override CFLAGS += -DDOUBLE -DCOMPLEX
$(XBLASOBJS) $(XBLASOBJS_P) : override CFLAGS += -DXDOUBLE -DCOMPLEX
$(SBEXTOBJS) $(SBEXTOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
$(SHBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(BBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(SBBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(SBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
$(DBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
+1
View File
@@ -0,0 +1 @@
CCOMMON_OPT += -msimd128
+5
View File
@@ -61,6 +61,9 @@ endif
ifeq ($(CORE), SKYLAKEX)
ifndef NO_AVX512
CCOMMON_OPT += -march=skylake-avx512
ifeq ($(C_COMPILER), CLANG)
CCOMMON_OPT += -mllvm -exhaustive-register-search
endif
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=skylake-avx512
endif
@@ -93,6 +96,7 @@ ifeq ($(C_COMPILER), GCC)
endif
endif
else ifeq ($(C_COMPILER), CLANG)
CCOMMON_OPT += -mllvm -exhaustive-register-search
# cooperlake support was added in clang 9
ifeq ($(CLANGVERSIONGTEQ9), 1)
CCOMMON_OPT += -march=cooperlake
@@ -135,6 +139,7 @@ ifeq ($(C_COMPILER), GCC)
endif
endif
else ifeq ($(C_COMPILER), CLANG)
CCOMMON_OPT += -mllvm -exhaustive-register-search
# sapphire rapids support was added in clang 12
ifeq ($(CLANGVERSIONGTEQ12), 1)
CCOMMON_OPT += -march=sapphirerapids
+25 -7
View File
@@ -29,6 +29,7 @@ For a general introduction to the BLAS routines, please refer to the extensive d
We provide official binary packages for the following platform:
* Windows x86/x86_64
* Windows arm64 (woa)
You can download them from [file hosting on sourceforge.net](https://sourceforge.net/projects/openblas/files/) or from the [Releases section of the GitHub project page](https://github.com/OpenMathLib/OpenBLAS/releases).
@@ -147,11 +148,12 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
- **Intel Haswell**: Optimized Level-3 and Level-2 BLAS with AVX2 and FMA on x86-64.
- **Intel Skylake-X**: Optimized Level-3 and Level-2 BLAS with AVX512 and FMA on x86-64.
- **Intel Cooper Lake**: as Skylake-X with improved BFLOAT16 support.
- **Intel Sapphire Rapids**: as Cooper Lake with improved BFLOAT16 SBGEMM kernel.
- **AMD Bobcat**: Used GotoBLAS2 Barcelona codes.
- **AMD Bulldozer**: x86-64 ?GEMM FMA4 kernels. (Thanks to Werner Saar)
- **AMD PILEDRIVER**: Uses Bulldozer codes with some optimizations.
- **AMD STEAMROLLER**: Uses Bulldozer codes with some optimizations.
- **AMD ZEN**: Uses Haswell codes with some optimizations for Zen 2/3 (use SkylakeX for Zen4)
- **AMD ZEN**: Uses Haswell codes with some optimizations for Zen 2/3, SkylakeX for Zen4, Cooperlake for Zen5
#### MIPS32
@@ -185,9 +187,13 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
- **EMAG 8180**: preliminary support based on A57
- **Neoverse N1**: (AWS Graviton2) preliminary support
- **Neoverse V1**: (AWS Graviton3) optimized Level-3 BLAS
- **Neoverse N2**: preliminary support
- **Neoverse V2**: preliminary support
- **Apple Vortex**: preliminary support based on ThunderX2/3
- **Apple VortexM4**: preliminary support based on ThunderX2/3, SME kernels for SGEMM,SSYMM,STRMM,SSYRK,SSYR2K
- **A64FX**: preliminary support, optimized Level-3 BLAS
- **ARMV8SVE**: any ARMV8 cpu with SVE extensions
- **ARMV9SME**: any ARMV9 cpu with SVE and SME extensions
#### PPC/PPC64
@@ -248,9 +254,15 @@ e.g.:
```
The old-style TARGET=LOONGSON3R5 is still supported
#### WASM
Not a cpu target in the strict sense, but portable WebAssembly for browser-based applications and the like. See emscripten.org for the compiler and related information
- **WASM128_GENERIC**: Optimized SGEMM,DGEMM, DAXPY, SSUM/DSUM, SDOT/DDOT and SROT/DROT
### Support for multiple targets in a single library
OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying `DYNAMIC_ARCH=1` in Makefile.rule, on the gmake command line or as `-DDYNAMIC_ARCH=TRUE` in cmake.
OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifying `DYNAMIC_ARCH=1` in Makefile.rule, on the gmake command line or as `-DDYNAMIC_ARCH=TRUE` in cmake.
For **x86_64**, the list of targets this activates contains Prescott, Core2, Nehalem, Barcelona, Sandybridge, Bulldozer, Piledriver, Steamroller, Excavator, Haswell, Zen, SkylakeX, Cooper Lake, Sapphire Rapids. For cpu generations not included in this list, the corresponding older model is used. If you also specify `DYNAMIC_OLDER=1`, specific support for Penryn, Dunnington, Opteron, Opteron/SSE3, Bobcat, Atom and Nano is added. Finally there is an option `DYNAMIC_LIST` that allows to specify an individual list of targets to include instead of the default.
@@ -276,23 +288,29 @@ Please note that it is not possible to combine support for different architectur
### Supported OS
- **GNU/Linux**
- **MinGW or Visual Studio (CMake)/Windows**: Please read <https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio>.
- **Darwin/macOS/OSX/iOS**: Experimental. Although GotoBLAS2 already supports Darwin, we are not OSX/iOS experts.
- **MinGW or Visual Studio (CMake)/Windows**: Please read <https://github.com/OpenMathLib/OpenBLAS/docs/nstall.md#visual-studio-native-windows-abi>.
- **Darwin/macOS/OSX/iOS**: Already supported on PPC and x86 by the original GotoBLAS, now also on ARM64 but we are not OSX/iOS experts.
- **FreeBSD**: Supported by the community. We don't actively test the library on this OS.
- **OpenBSD**: Supported by the community. We don't actively test the library on this OS.
- **NetBSD**: Supported by the community. We don't actively test the library on this OS.
- **DragonFly BSD**: Supported by the community. We don't actively test the library on this OS.
- **Android**: Supported by the community. Please read <https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android>.
- **AIX**: Supported on PPC up to POWER10
- **Android**: Supported by the community. Please read <https://github.com/OpenMathLib/OpenBLAS/docs/install.md#android>.
- **AIX**: Supported on PPC up to POWER10 but testing is increasingly problematic due to lack of publicly available systems
- **Haiku**: Supported by the community. We don't actively test the library on this OS.
- **SunOS**: Supported by the community. We don't actively test the library on this OS.
- **Cortex-M**: Supported by the community. Please read <https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-on-Cortex-M>.
- **Cortex-M**: Supported by the community. Please read <https://github.com/OpenMathLib/OpenBLAS/docs/install.md#cortex-m>.
## Usage
Statically link with `libopenblas.a` or dynamically link with `-lopenblas` if OpenBLAS was
compiled as a shared library.
### Considerations for using the library from Java
The default stack size of only 1MB may be too small, especially if you built OpenBLAS to support larger matrix sizes than provided for by the default settings. Use the -Xss option to request a larger stack size if you encounter problems.
When a Windows build of OpenBLAS was created using the MINGW gfortran (for the LAPACK parts), the java application may hang on startup due to a deadlock between the gfortran runtime library initialization and any pipes created by a Win11/SBT/Play Framework environment. Use -Djdk.console=jdk.internal.le to work around this.
### Setting the number of threads using environment variables
Environment variables are used to specify a maximum number of threads.
+7
View File
@@ -52,6 +52,7 @@ POWER7
POWER8
POWER9
POWER10
POWER11
PPCG4
PPC970
PPC970MP
@@ -101,6 +102,7 @@ CORTEXX2
NEOVERSEN1
NEOVERSEV1
NEOVERSEN2
NEOVERSEV2
CORTEXA55
EMAG8180
FALKOR
@@ -109,6 +111,7 @@ THUNDERX2T99
TSV110
THUNDERX3T110
VORTEX
VORTEXM4
A64FX
ARMV8SVE
ARMV9SME
@@ -150,3 +153,7 @@ EV6
14.CSKY
CSKY
CK860FV
15. WebAssembly/Emscripten:
WASM128_GENERIC
+46 -26
View File
@@ -25,14 +25,28 @@ jobs:
echo "FROM quay.io/pypa/manylinux1_x86_64
COPY . /tmp/openblas
RUN cd /tmp/openblas && \
COMMON_FLAGS='DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32' && \
BTYPE='BINARY=64' CC=gcc && \
make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE && \
make -C test $COMMON_FLAGS $BTYPE && \
make -C ctest $COMMON_FLAGS $BTYPE && \
make -C utest $COMMON_FLAGS $BTYPE" > Dockerfile
CC=gcc && \
make QUIET_MAKE=1 BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
make -C test BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
make -C ctest BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
make -C utest BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32" > Dockerfile
docker build .
displayName: Run manylinux1 docker build
- job: manylinux_32bit
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
echo "FROM quay.io/pypa/manylinux2014_i686
COPY . /tmp/openblas
RUN cd /tmp/openblas && \
CC=gcc && \
make QUIET_MAKE=1 BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
make -C test BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
make -C ctest BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
make -C utest BINARY=32 TARGET=NEHALEM NUM_THREADS=32" > Dockerfile
docker build .
displayName: Run manylinux 32bit docker build
- job: Intel_SDE_skx
pool:
vmImage: 'ubuntu-latest'
@@ -77,11 +91,12 @@ jobs:
openblas_utest.exe
- job: Windows_mingw_gmake
timeoutInMinutes: 100
pool:
vmImage: 'windows-latest'
steps:
- script: |
mingw32-make CC=gcc FC=gfortran DYNAMIC_ARCH=1 DYNAMIC_LIST="SANDYBRIDGE"
mingw32-make CC=gcc NOLAPACK=1 DYNAMIC_ARCH=1 DYNAMIC_LIST="SANDYBRIDGE"
- job: Windows_clang_cmake
pool:
@@ -141,7 +156,7 @@ jobs:
- job: OSX_OpenMP
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
steps:
- script: |
brew update
@@ -151,19 +166,19 @@ jobs:
- job: OSX_GCC_Nothreads
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
steps:
- script: |
brew update
make USE_THREADS=0 CC=gcc-13 FC=gfortran-13
- job: OSX_GCC12
- job: OSX_GCC15
pool:
vmImage: 'macOS-latest'
steps:
- script: |
brew update
make CC=gcc-12 FC=gfortran-12
make CC=gcc-15 FC=gfortran-15
- job: OSX_LLVM_flangnew
pool:
@@ -171,6 +186,7 @@ jobs:
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
RANLIB: touch
steps:
- script: |
brew update
@@ -183,11 +199,12 @@ jobs:
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
RANLIB: touch
steps:
- script: |
brew update
brew install llvm libomp
make TARGET=CORE2 USE_OPENMP=1 DYNAMIC_ARCH=1 CC=/usr/local/opt/llvm/bin/clang NOFORTRAN=1
make TARGET=CORE2 USE_OPENMP=1 DYNAMIC_ARCH=1 DYNAMIC_LIST='NEHALEM HASWELL SKYLAKEX' CC=/usr/local/opt/llvm/bin/clang NOFORTRAN=1
- job: OSX_OpenMP_Clang_cmake
pool:
@@ -201,13 +218,13 @@ jobs:
brew install llvm libomp
mkdir build
cd build
cmake -DTARGET=CORE2 -DUSE_OPENMP=1 -DINTERFACE64=1 -DDYNAMIC_ARCH=1 -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DNOFORTRAN=1 -DNO_AVX512=1 ..
cmake -DTARGET=CORE2 -DUSE_OPENMP=1 -DINTERFACE64=1 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM HASWELL SKYLAKEX' -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DNOFORTRAN=1 -DNO_AVX512=1 ..
make
ctest
- job: OSX_dynarch_cmake
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
@@ -226,6 +243,7 @@ jobs:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/edb4dc2f-266f-47f2-8d56-21bc7764e119/m_HPCKit_p_2023.2.0.49443.dmg
LIBRARY_PATH: /usr/local/opt/llvm/lib
RANLIB: touch
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler
steps:
- script: |
@@ -254,7 +272,7 @@ jobs:
- job: OSX_NDK_ARMV7
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
steps:
- script: |
brew update
@@ -264,35 +282,37 @@ jobs:
- job: OSX_IOS_ARMV8
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -arch arm64 -miphoneos-version-min=10.0
CC: /Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_16.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.2.sdk -arch arm64 -miphoneos-version-min=10.0
steps:
- script: |
ls /Applications/Xcode_16.2.app/Contents/Developer/Platforms/
ls /Applications/Xcode_16.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
- job: OSX_IOS_ARMV7
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -arch armv7 -miphoneos-version-min=5.1
CC: /Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode_16.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.2.sdk -arch armv7 -miphoneos-version-min=5.1
steps:
- script: |
make TARGET=ARMV7 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
- job: OSX_xbuild_DYNAMIC_ARM64
pool:
vmImage: 'macOS-13'
vmImage: 'macOS-14'
variables:
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -arch arm64
CC: /Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_16.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk -arch arm64
steps:
- script: |
ls /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
ls /Applications/Xcode_16.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
/Applications/Xcode_12.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 --print-supported-cpus
/Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version
/Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
- job: ALPINE_MUSL
+64 -5
View File
@@ -1,3 +1,31 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
TOPDIR = ..
include $(TOPDIR)/Makefile.system
@@ -56,9 +84,15 @@ GOTO_LAPACK_TARGETS=
endif
ifeq ($(BUILD_BFLOAT16),1)
GOTO_HALF_TARGETS=sbgemm.goto
GOTO_BFLOAT_TARGETS=bgemm.goto sbgemm.goto bgemv.goto sbgemv.goto
else
GOTO_HALF_TARGETS=
GOTO_BFLOAT_TARGETS=
endif
ifeq ($(BUILD_HFLOAT16),1)
GOTO_HFLOAT_TARGETS=shgemm.goto
else
GOTO_HFLOAT_TARGETS=
endif
ifeq ($(OSNAME), WINNT)
@@ -104,7 +138,7 @@ goto :: slinpack.goto dlinpack.goto clinpack.goto zlinpack.goto \
spotrf.goto dpotrf.goto cpotrf.goto zpotrf.goto \
ssymm.goto dsymm.goto csymm.goto zsymm.goto \
somatcopy.goto domatcopy.goto comatcopy.goto zomatcopy.goto \
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto $(GOTO_HALF_TARGETS)
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto $(GOTO_BFLOAT_TARGETS) $(GOTO_HFLOAT_TARGETS)
acml :: slinpack.acml dlinpack.acml clinpack.acml zlinpack.acml \
scholesky.acml dcholesky.acml ccholesky.acml zcholesky.acml \
@@ -278,7 +312,7 @@ goto :: sgemm.goto dgemm.goto cgemm.goto zgemm.goto \
smin.goto dmin.goto \
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto \
somatcopy.goto domatcopy.goto comatcopy.goto zomatcopy.goto \
snrm2.goto dnrm2.goto scnrm2.goto dznrm2.goto $(GOTO_LAPACK_TARGETS) $(GOTO_HALF_TARGETS)
snrm2.goto dnrm2.goto scnrm2.goto dznrm2.goto $(GOTO_LAPACK_TARGETS) $(GOTO_BFLOAT_TARGETS) $(GOTO_HFLOAT_TARGETS)
acml :: slinpack.acml dlinpack.acml clinpack.acml zlinpack.acml \
scholesky.acml dcholesky.acml ccholesky.acml zcholesky.acml \
@@ -629,8 +663,19 @@ zcholesky.essl : zcholesky.$(SUFFIX)
##################################### Sgemm ####################################################
ifeq ($(BUILD_BFLOAT16),1)
bgemm.goto : bgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
sbgemm.goto : sbgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
bgemv.goto : bgemv.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
sbgemv.goto : sbgemv.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
endif
ifeq ($(BUILD_HFLOAT16),1)
shgemm.goto : shgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
endif
sgemm.goto : sgemm.$(SUFFIX) ../$(LIBNAME)
@@ -2959,8 +3004,15 @@ zcholesky.$(SUFFIX) : cholesky.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
ifeq ($(BUILD_BFLOAT16),1)
bgemm.$(SUFFIX) : gemm.c
$(CC) $(CFLAGS) -c -DBFLOAT16 -DBGEMM -UCOMPLEX -UDOUBLE -o $(@F) $^
sbgemm.$(SUFFIX) : gemm.c
$(CC) $(CFLAGS) -c -DHALF -UCOMPLEX -UDOUBLE -o $(@F) $^
$(CC) $(CFLAGS) -c -DBFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
endif
ifeq ($(BUILD_HFLOAT16),1)
shgemm.$(SUFFIX) : gemm.c
$(CC) $(CFLAGS) -c -DHFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
endif
sgemm.$(SUFFIX) : gemm.c
@@ -3098,6 +3150,13 @@ dgemv.$(SUFFIX) : gemv.c
cgemv.$(SUFFIX) : gemv.c
$(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^
ifeq ($(BUILD_BFLOAT16),1)
bgemv.$(SUFFIX) : gemv.c
$(CC) $(CFLAGS) -c -DBFLOAT16 -DBGEMM -UCOMPLEX -UDOUBLE -o $(@F) $^
sbgemv.$(SUFFIX) : gemv.c
$(CC) $(CFLAGS) -c -DBFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
endif
zgemv.$(SUFFIX) : gemv.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
+20 -1
View File
@@ -33,10 +33,19 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef DOUBLE
#define GEMM BLASFUNC(dgemm)
#elif defined(HALF)
#elif defined(BFLOAT16) && defined(BGEMM)
#define GEMM BLASFUNC(bgemm)
#elif defined(BFLOAT16)
#define GEMM BLASFUNC(sbgemm)
#undef IFLOAT
#define IFLOAT bfloat16
#elif defined(HFLOAT16)
#define GEMM BLASFUNC(shgemm)
#undef IFLOAT
#define IFLOAT hfloat16
#else
#define GEMM BLASFUNC(sgemm)
#define IFLOAT float
#endif
#else
@@ -53,8 +62,18 @@ int main(int argc, char *argv[]){
IFLOAT *a, *b;
FLOAT *c;
#ifdef BGEMM
blasint one=1;
blasint two=2;
float alpha_in[] = {1.0, 0.0};
float beta_in[] = {0.0, 0.0};
FLOAT alpha[2], beta[2];
sbstobf16_(&two, alpha_in, &one, alpha, &one);
sbstobf16_(&two, beta_in, &one, beta, &one);
#else
FLOAT alpha[] = {1.0, 0.0};
FLOAT beta [] = {0.0, 0.0};
#endif
char transa = 'N';
char transb = 'N';
blasint m, n, k, i, j, lda, ldb, ldc;
+25 -8
View File
@@ -1,5 +1,5 @@
/***************************************************************************
Copyright (c) 2014, The OpenBLAS Project
Copyright (c) 2014, 2025 The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +34,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef DOUBLE
#define GEMV BLASFUNC(dgemv)
#elif defined(BFLOAT16) && defined(BGEMM)
#define GEMV BLASFUNC(bgemv)
#elif defined(BFLOAT16)
#define GEMV BLASFUNC(sbgemv)
#undef IFLOAT
#define IFLOAT bfloat16
#else
#define GEMV BLASFUNC(sgemv)
#endif
@@ -49,9 +55,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
int main(int argc, char *argv[]){
FLOAT *a, *x, *y;
FLOAT alpha[] = {1.0, 1.0};
FLOAT beta [] = {1.0, 0.0};
IFLOAT *a, *x;
FLOAT *y;
#ifdef BGEMM
blasint one=1;
blasint two=2;
float alpha_in[] = {1.0, 0.0};
float beta_in[] = {0.0, 0.0};
FLOAT alpha[2], beta[2];
sbstobf16_(&two, alpha_in, &one, alpha, &one);
sbstobf16_(&two, beta_in, &one, beta, &one);
#else
FLOAT alpha[] = {1.0, 0.0};
FLOAT beta [] = {0.0, 0.0};
#endif
char trans='N';
blasint m, i, j;
blasint inc_x=1,inc_y=1;
@@ -97,11 +114,11 @@ int main(int argc, char *argv[]){
fprintf(stderr, "From : %3d To : %3d Step = %3d Trans = '%c' Inc_x = %d Inc_y = %d Loops = %d\n", from, to, step,trans,inc_x,inc_y,loops);
if (( a = (FLOAT *)malloc(sizeof(FLOAT) * tomax * tomax * COMPSIZE)) == NULL){
if (( a = (IFLOAT *)malloc(sizeof(IFLOAT) * tomax * tomax * COMPSIZE)) == NULL){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
if (( x = (FLOAT *)malloc(sizeof(FLOAT) * tomax * abs(inc_x) * COMPSIZE)) == NULL){
if (( x = (IFLOAT *)malloc(sizeof(IFLOAT) * tomax * abs(inc_x) * COMPSIZE)) == NULL){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
@@ -125,7 +142,7 @@ int main(int argc, char *argv[]){
fprintf(stderr, " %6dx%d : ", (int)m,(int)n);
for(j = 0; j < m; j++){
for(i = 0; i < n * COMPSIZE; i++){
a[(long)i + (long)j * (long)m * COMPSIZE] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
a[(long)i + (long)j * (long)m * COMPSIZE] = ((IFLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
}
@@ -133,7 +150,7 @@ int main(int argc, char *argv[]){
{
for(i = 0; i < n * COMPSIZE * abs(inc_x); i++){
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
x[i] = ((IFLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
+16 -1
View File
@@ -23,6 +23,7 @@ config="$2"
compiler_name="$3"
shift 3
flags="$*"
is_ios=false
# First, we need to know the target OS and compiler name
{
@@ -78,6 +79,7 @@ case "$data" in *OS_CYGWIN_NT*) os=CYGWIN_NT ;; esac
case "$data" in *OS_INTERIX*) os=Interix ;; esac
case "$data" in *OS_ANDROID*) os=Android ;; esac
case "$data" in *OS_HAIKU*) os=Haiku ;; esac
case "$data" in *OS_IOS*) is_ios=true ;; esac
case "$data" in
*ARCH_X86_64*) architecture=x86_64 ;;
@@ -95,6 +97,7 @@ case "$data" in
*ARCH_RISCV64*) architecture=riscv64 ;;
*ARCH_LOONGARCH64*) architecture=loongarch64 ;;
*ARCH_CSKY*) architecture=csky ;;
*ARCH_WASM*) architecture=wasm ;;
esac
defined=0
@@ -128,7 +131,7 @@ case "$architecture" in
defined=1
;;
arm|arm64) defined=1 ;;
zarch|e2k|alpha|ia64|riscv64|loonarch64)
zarch|e2k|alpha|ia64|riscv64|loongarch64|wasm)
defined=1
BINARY=64
;;
@@ -252,6 +255,7 @@ case "$data" in
*ARCH_ZARCH*) architecture=zarch ;;
*ARCH_LOONGARCH64*) architecture=loongarch64 ;;
*ARCH_CSKY*) architecture=csky ;;
*ARCH_WASM*) architecture=wasm ;;
esac
binformat='bin32'
@@ -335,7 +339,14 @@ if [ "$architecture" = "arm64" ]; then
fi
no_sme=0
is_appleclang=0
if [ "$architecture" = "arm64" ]; then
if [ "$compiler" = "CLANG" ]; then
data=`$compiler_name --version`
case "$data" in Apple*)
is_appleclang=1
esac
fi
tmpd=$(mktemp -d 2>/dev/null || mktemp -d -t 'OBC')
tmpf="$tmpd/a.S"
printf ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n">> "$tmpf"
@@ -410,6 +421,8 @@ fi
[ "$os" = "Android" ] && [ "$hostos" = "Linux" ] && [ -n "$TERMUX_APP_PID" ] \
&& cross=0
[ "$is_ios" = true ] && cross=1
[ "$USE_OPENMP" != 1 ] && openmp=''
linker_L=""
@@ -469,6 +482,7 @@ done
[ "$no_avx512bf" -eq 1 ] && printf "NO_AVX512BF16=1\n"
[ "$no_avx2" -eq 1 ] && printf "NO_AVX2=1\n"
[ "$oldgcc" -eq 1 ] && printf "OLDGCC=1\n"
[ "$is_appleclang" -eq 1 ] && printf "APPLECLANG=1\n"
exit 0
}
@@ -499,6 +513,7 @@ done
[ "$no_avx512bf" -eq 1 ] && printf "NO_AVX512BF16=1\n"
[ "$no_avx2" -eq 1 ] && printf "NO_AVX2=1\n"
[ "$oldgcc" -eq 1 ] && printf "OLDGCC=1\n"
[ "$is_appleclang" -eq 1 ] && printf "APPLECLANG=1\n"
[ "$no_lsx" -eq 1 ] && printf "NO_LSX=1\n"
[ "$no_lasx" -eq 1 ] && printf "NO_LASX=1\n"
} >> "$makefile"
+44
View File
@@ -1,3 +1,31 @@
/***************************************************************************
* Copyright (c) 2025, The OpenBLAS Project
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name of the OpenBLAS project nor the names of
* its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *****************************************************************************/
#ifndef CBLAS_H
#define CBLAS_H
@@ -428,6 +456,14 @@ void cblas_cgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enu
void cblas_zgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST void * alpha_array, OPENBLAS_CONST void ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST void ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST void * beta_array, void ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_sgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST float * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST float beta, float * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
void cblas_dgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double alpha, OPENBLAS_CONST double * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST double * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST double beta, double * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
void cblas_cgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void * alpha, OPENBLAS_CONST void * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST void * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST void * beta, void * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
void cblas_zgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void * alpha, OPENBLAS_CONST void * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST void * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST void * beta, void * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
/*** BFLOAT16 and INT8 extensions ***/
/* convert float array to BFLOAT16 array by rounding */
void cblas_sbstobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
@@ -437,15 +473,23 @@ void cblas_sbdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPEN
void cblas_sbf16tos(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, float *out, OPENBLAS_CONST blasint incout);
/* convert BFLOAT16 array to double array */
void cblas_dbf16tod(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, double *out, OPENBLAS_CONST blasint incout);
void cblas_bgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 beta, bfloat16 *y, OPENBLAS_CONST blasint incy);
/* dot production of BFLOAT16 input arrays, and output as float */
float cblas_sbdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 *y, OPENBLAS_CONST blasint incy);
void cblas_sbgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
void cblas_bgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST bfloat16 beta, bfloat16 *C, OPENBLAS_CONST blasint ldc);
void cblas_sbgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_sbgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST float * alpha_array, OPENBLAS_CONST bfloat16 ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST bfloat16 ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST float * beta_array, float ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_sbgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST bfloat16 * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST float beta, float * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
/*** FLOAT16 extensions ***/
void cblas_shgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST hfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST hfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
#ifdef __cplusplus
}
#endif /* __cplusplus */
+14 -14
View File
@@ -50,30 +50,30 @@ set(PN OpenBLAS)
# need to check that the @USE_*@ evaluate to something cmake can perform boolean logic upon
if(@USE_OPENMP@)
set(${PN}_openmp_FOUND 1)
set(${PN}@SUFFIX64@_openmp_FOUND 1)
elseif(@USE_THREAD@)
set(${PN}_pthread_FOUND 1)
set(${PN}@SUFFIX64@_pthread_FOUND 1)
else()
set(${PN}_serial_FOUND 1)
set(${PN}@SUFFIX64@_serial_FOUND 1)
endif()
check_required_components(${PN})
check_required_components(${PN}@SUFFIX64@)
#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
# project which has already built this as a subproject
#-----------------------------------------------------------------------------
if(NOT TARGET ${PN}::OpenBLAS)
include("${CMAKE_CURRENT_LIST_DIR}/${PN}Targets.cmake")
if(NOT TARGET ${PN}@SUFFIX64@::OpenBLAS)
include("${CMAKE_CURRENT_LIST_DIR}/${PN}@SUFFIX64@Targets.cmake")
get_property(_loc TARGET ${PN}::OpenBLAS PROPERTY LOCATION)
set(${PN}_LIBRARY ${_loc})
get_property(_ill TARGET ${PN}::OpenBLAS PROPERTY INTERFACE_LINK_LIBRARIES)
set(${PN}_LIBRARIES ${_ill})
get_property(_loc TARGET ${PN}@SUFFIX64@::OpenBLAS PROPERTY LOCATION)
set(${PN}@SUFFIX64@_LIBRARY ${_loc})
get_property(_ill TARGET ${PN}@SUFFIX64@::OpenBLAS PROPERTY INTERFACE_LINK_LIBRARIES)
set(${PN}@SUFFIX64@_LIBRARIES ${_ill})
get_property(_id TARGET ${PN}::OpenBLAS PROPERTY INCLUDE_DIRECTORIES)
set(${PN}_INCLUDE_DIR ${_id})
get_property(_iid TARGET ${PN}::OpenBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
set(${PN}_INCLUDE_DIRS ${_iid})
get_property(_id TARGET ${PN}@SUFFIX64@::OpenBLAS PROPERTY INCLUDE_DIRECTORIES)
set(${PN}@SUFFIX64@_INCLUDE_DIR ${_id})
get_property(_iid TARGET ${PN}@SUFFIX64@::OpenBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
set(${PN}@SUFFIX64@_INCLUDE_DIRS ${_iid})
endif()
+14 -3
View File
@@ -40,14 +40,19 @@ if (DYNAMIC_ARCH)
endif ()
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 14) # SME ACLE supported in GCC >= 14
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
endif()
if (${CMAKE_C_COMPILER_ID} MATCHES "Clang" AND ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(DYNAMIC_CORE ${DYNAMIC_CORE} VORTEXM4)
endif()
elseif (${CMAKE_C_COMPILER_ID} MATCHES "Clang")
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 11) # SVE ACLE supported in LLVM >= 11
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
endif ()
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19) # SME ACLE supported in LLVM >= 19
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19 OR (${CMAKE_C_COMPILER_ID} MATCHES AppleClang AND ${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17) ) # SME ACLE supported in LLVM >= 19 and AppleClang >= 17
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME VORTEXM4)
endif()
endif()
endif ()
if (DYNAMIC_LIST)
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
@@ -94,7 +99,13 @@ if (DYNAMIC_ARCH)
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
endif ()
endif ()
if (ZARCH)
set(DYNAMIC_CORE Z13 Z14 ZARCH_GENERIC)
set(DYN_Z13 1)
set(DYN_Z14 1)
endif ()
if (LOONGARCH64)
set(DYNAMIC_CORE LA64_GENERIC LA264 LA464)
endif ()
+118 -16
View File
@@ -1,3 +1,30 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
##
## Author: Hank Anderson <hank@statease.com>
## Description: Ported from portion of OpenBLAS/Makefile.system
@@ -59,6 +86,10 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "LS
set(BINARY_DEFINED 1)
endif ()
if (ZARCH)
set (BINARY_DEFINED 1)
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
set(BINARY_DEFINED 1)
endif ()
@@ -182,7 +213,7 @@ endif ()
if (${CORE} STREQUAL A64FX)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=a64fx")
elseif (${GCC_VERSION} VERSION_GREATER 11.0 OR ${GCC_VERSION} VERSION_EQUAL 11.0)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve -mtune=a64fx")
@@ -192,17 +223,35 @@ if (${CORE} STREQUAL A64FX)
endif ()
endif ()
if (${CORE} STREQUAL NEOVERSEV2)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-v2")
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v2")
else ()
if (${GCC_VERSION} VERSION_GREATER 13.0 OR ${GCC_VERSION} VERSION_EQUAL 13.0)
set (CCOMMON_OPT "${CCOMMON_OPT} -mcpu=neoverse-v2")
elseif (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
endif()
endif ()
endif ()
endif ()
if (${CORE} STREQUAL NEOVERSEN2)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v2")
else ()
if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
if (${GCC_VERSION} VERSION_GREATER 11.1 OR ${GCC_VERSION} VERSION_EQUAL 11.1)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
endif()
endif ()
endif ()
@@ -211,14 +260,14 @@ endif ()
if (${CORE} STREQUAL NEOVERSEV1)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.4-a+sve -mtune=neoverse-v1")
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v1")
else ()
if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve -mtune=neoverse-v1")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
endif()
endif()
endif ()
@@ -226,12 +275,24 @@ endif ()
if (${CORE} STREQUAL NEOVERSEN1)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-n1")
elseif (${GCC_VERSION} VERSION_GREATER 9.4 OR ${GCC_VERSION} VERSION_EQUAL 9.4)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve -mtune=neoverse-n1")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a -mtune=neoverse-n1")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a")
endif()
endif ()
endif ()
if (${CORE} STREQUAL AMPEREONE)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC")
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-n1")
elseif (${GCC_VERSION} VERSION_GREATER 12.1)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.6-a+crypto+crc+fp16+sha3+rng -mtune=ampereone")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.6-a+fp16")
endif()
endif ()
endif ()
@@ -240,7 +301,7 @@ if (${CORE} STREQUAL ARMV8SVE)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8-a+sve")
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
@@ -250,23 +311,40 @@ endif ()
if (${CORE} STREQUAL ARMV9SME)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv9-a+sme")
if (${OSNAME} STREQUAL Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "Clang" )
set (CCOMMON_OPT "${CCOMMON_OPT} --aarch64-stack-hazard-size=0")
endif ()
endif ()
endif ()
endif ()
if (${CORE} STREQUAL VORTEXM4)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
else ()
if (${CMAKE_C_COMPILER_ID} STREQUAL "AppleClang")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sme -mcpu=apple-m4")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a -mcpu=apple-m4")
endif ()
endif ()
endif ()
endif ()
if (${CORE} STREQUAL CORTEXA510)
if (NOT DYNAMIC_ARCH)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
endif ()
endif ()
if (${CORE} STREQUAL CORTEXA710)
if (NOT DYNAMIC_ARCH)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
endif ()
endif ()
@@ -278,7 +356,7 @@ endif ()
if (${CORE} STREQUAL CORTEXX2)
if (NOT DYNAMIC_ARCH)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
endif ()
endif ()
@@ -330,6 +408,30 @@ if (${CORE} STREQUAL PPCG4)
endif ()
endif ()
if ((${CORE} STREQUAL RISCV64_ZVL128B) OR (${CORE} STREQUAL RISCV64_ZVL256B))
set (RISCV64_OPT "rv64imafdcv")
if (BUILD_BFLOAT16)
set (RISCV64_OPT "${RISCV64_OPT}_zvfbfwma")
endif()
if (BUILD_HFLOAT16)
set (RISCV64_OPT "${RISCV64_OPT}_zvfh_zfh")
endif()
if (${CORE} STREQUAL RISCV64_ZVL256B)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=${RISCV64_OPT}_zvl256b -mabi=lp64d")
endif()
if (${CORE} STREQUAL RISCV64_ZVL128B)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=${RISCV64_OPT}_zvl128b -mabi=lp64d")
endif()
endif()
if (${CORE} STREQUAL RISCV64_GENERIC)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=rv64imafdc -mabi=lp64d")
endif()
if (${CORE} STREQUAL x280)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d")
endif()
if (NOT DYNAMIC_ARCH)
if (HAVE_AVX2)
set (CCOMMON_OPT "${CCOMMON_OPT} -mavx2")
+1 -1
View File
@@ -128,7 +128,7 @@ if (${F_COMPILER} STREQUAL "INTEL" OR CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
endif ()
set(FCOMMON_OPT "${FCOMMON_OPT} -recursive -fp-model=consistent")
if (USE_OPENMP)
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
set(OpenMP_Fortran_FLAGS "-qopenmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
+63 -1
View File
@@ -1,3 +1,31 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
# helper functions for the kernel CMakeLists.txt
function(SetFallback KERNEL SOURCE_PATH)
@@ -82,6 +110,7 @@ macro(SetDefaultL1)
SetFallback(SROTMKERNEL rotm.S)
SetFallback(DROTMKERNEL rotm.S)
SetFallback(QROTMKERNEL rotm.S)
SetFallback(BSCALKERNEL ../generic/scal.c)
SetFallback(SSCALKERNEL scal.S)
SetFallback(DSCALKERNEL scal.S)
SetFallback(CSCALKERNEL zscal.S)
@@ -141,9 +170,15 @@ if (BUILD_BFLOAT16)
SetFallback(SHSWAPKERNEL ../arm/swap.c)
SetFallback(TOBF16KERNEL ../x86_64/tobf16.c)
SetFallback(BF16TOKERNEL ../x86_64/bf16to.c)
SetFallback(BGEMVNKERNEL ../generic/gemv_n.c)
SetFallback(BGEMVTKERNEL ../generic/gemv_t.c)
SetFallback(SBGEMVNKERNEL ../x86_64/sbgemv_n.c)
SetFallback(SBGEMVTKERNEL ../x86_64/sbgemv_t.c)
endif ()
if (BUILD_HFLOAT16)
SetFallback(SHGEMVNKERNEL ../generic/gemv_n.c)
SetFallback(SHGEMVTKERNEL ../generic/gemv_t.c)
endif ()
endmacro ()
macro(SetDefaultL2)
@@ -193,8 +228,14 @@ macro(SetDefaultL2)
SetFallback(XHEMV_V_KERNEL ../generic/zhemv_k.c)
SetFallback(XHEMV_M_KERNEL ../generic/zhemv_k.c)
if (BUILD_BFLOAT16)
SetFallback(BGEMVNKERNEL ../generic/gemv_n.c)
SetFallback(BGEMVTKERNEL ../generic/gemv_t.c)
SetFallback(SBGEMVNKERNEL ../x86_64/sbgemv_n.c)
SetFallback(SBGEMVTKERNEL ../x86_64/sbgemv_t.c)
endif ()
if (BUILD_HFLOAT16)
SetFallback(SHGEMVNKERNEL ../generic/gemv_n.c)
SetFallback(SHGEMVTKERNEL ../generic/gemv_t.c)
SetFallback(SHGERKERNEL ../generic/ger.c)
endif ()
endmacro ()
@@ -206,6 +247,16 @@ macro(SetDefaultL3)
SetFallback(ZGEADD_KERNEL ../generic/zgeadd.c)
if (BUILD_BFLOAT16)
SetFallback(SHGEADD_KERNEL ../generic/geadd.c)
SetFallback(BGEMMKERNEL ../generic/gemmkernel_2x2.c)
SetFallback(BGEMM_BETA ../generic/gemm_beta.c)
SetFallback(BGEMMINCOPY ../generic/gemm_ncopy_2.c)
SetFallback(BGEMMITCOPY ../generic/gemm_tcopy_2.c)
SetFallback(BGEMMONCOPY ../generic/gemm_ncopy_2.c)
SetFallback(BGEMMOTCOPY ../generic/gemm_tcopy_2.c)
SetFallback(BGEMMINCOPYOBJ bgemm_incopy.o)
SetFallback(BGEMMITCOPYOBJ bgemm_itcopy.o)
SetFallback(BGEMMONCOPYOBJ bgemm_oncopy.o)
SetFallback(BGEMMOTCOPYOBJ bgemm_otcopy.o)
SetFallback(SBGEMMKERNEL ../generic/gemmkernel_2x2.c)
SetFallback(SBGEMM_BETA ../generic/gemm_beta.c)
SetFallback(SBGEMMINCOPY ../generic/gemm_ncopy_2.c)
@@ -217,5 +268,16 @@ if (BUILD_BFLOAT16)
SetFallback(SBGEMMONCOPYOBJ sbgemm_oncopy.o)
SetFallback(SBGEMMOTCOPYOBJ sbgemm_otcopy.o)
endif ()
if (BUILD_HFLOAT16)
SetFallback(SHGEMMKERNEL ../generic/gemmkernel_2x2.c)
SetFallback(SHGEMM_BETA ../generic/gemm_beta.c)
SetFallback(SHGEMMINCOPY ../generic/gemm_ncopy_2.c)
SetFallback(SHGEMMITCOPY ../generic/gemm_tcopy_2.c)
SetFallback(SHGEMMONCOPY ../generic/gemm_ncopy_2.c)
SetFallback(SHGEMMOTCOPY ../generic/gemm_tcopy_2.c)
SetFallback(SHGEMMINCOPYOBJ shgemm_incopy.o)
SetFallback(SHGEMMITCOPYOBJ shgemm_itcopy.o)
SetFallback(SHGEMMONCOPYOBJ shgemm_oncopy.o)
SetFallback(SHGEMMOTCOPYOBJ shgemm_otcopy.o)
endif ()
endmacro ()
+12 -10
View File
@@ -11,7 +11,7 @@ set(SCLAUX
la_constants.f90
sbdsdc.f
sbdsqr.f sdisna.f slabad.f slacpy.f sladiv.f slae2.f slaebz.f
slaed0.f slaed1.f slaed2.f slaed3.f slaed4.f slaed5.f slaed6.f
slaed0.f slaed1.f slaed2.f slaed4.f slaed5.f slaed6.f
slaed7.f slaed8.f slaed9.f slaeda.f slaev2.f slagtf.f
slagts.f slamrg.f slanst.f
slapy2.f slapy3.f slarnv.f
@@ -31,7 +31,7 @@ set(DZLAUX
dbdsdc.f
dbdsvdx.f dstevx.f dstein.f
dbdsqr.f ddisna.f dlabad.f dlacpy.f dladiv.f dlae2.f dlaebz.f
dlaed0.f dlaed1.f dlaed2.f dlaed3.f dlaed4.f dlaed5.f dlaed6.f
dlaed0.f dlaed1.f dlaed2.f dlaed4.f dlaed5.f dlaed6.f
dlaed7.f dlaed8.f dlaed9.f dlaeda.f dlaev2.f dlagtf.f
dlagts.f dlamrg.f dlanst.f
dlapy2.f dlapy3.f dlarnv.f
@@ -71,7 +71,7 @@ set(SLASRC
slaqr0.f slaqr1.f slaqr2.f slaqr3.f slaqr4.f slaqr5.f
slaqtr.f slar1v.f slar2v.f ilaslr.f ilaslc.f
slarf.f slarfb.f slarfb_gett.f slarfg.f slarfgp.f slarft.f slarfx.f slarfy.f slargv.f
slarrv.f slartv.f
slarf1f.f slarf1l.f slarrv.f slartv.f
slarz.f slarzb.f slarzt.f slasy2.f
slasyf.f slasyf_rook.f slasyf_rk.f slasyf_aa.f
slatbs.f slatdf.f slatps.f slatrd.f slatrs.f slatrz.f
@@ -178,6 +178,7 @@ set(CLASRC
claqz0.f claqz1.f claqz2.f claqz3.f
claqsp.f claqsy.f clar1v.f clar2v.f ilaclr.f ilaclc.f
clarf.f clarfb.f clarfb_gett.f clarfg.f clarfgp.f clarft.f
clarf1f.f clarf1l.f
clarfx.f clarfy.f clargv.f clarnv.f clarrv.f clartg.f90 clartv.f
clarz.f clarzb.f clarzt.f clascl.f claset.f clasr.f classq.f90
clasyf.f clasyf_rook.f clasyf_rk.f clasyf_aa.f
@@ -262,7 +263,7 @@ set(DLASRC
dlaqr0.f dlaqr1.f dlaqr2.f dlaqr3.f dlaqr4.f dlaqr5.f
dlaqtr.f dlar1v.f dlar2v.f iladlr.f iladlc.f
dlarf.f dlarfb.f dlarfb_gett.f dlarfg.f dlarfgp.f dlarft.f dlarfx.f dlarfy.f
dlargv.f dlarrv.f dlartv.f
dlarf1f.f dlarf1l.f dlargv.f dlarrv.f dlartv.f
dlarz.f dlarzb.f dlarzt.f dlasy2.f
dlasyf.f dlasyf_rook.f dlasyf_rk.f dlasyf_aa.f
dlatbs.f dlatdf.f dlatps.f dlatrd.f dlatrs.f dlatrz.f
@@ -371,7 +372,7 @@ set(ZLASRC
zlaqr0.f zlaqr1.f zlaqr2.f zlaqr3.f zlaqr4.f zlaqr5.f
zlaqsp.f zlaqsy.f zlar1v.f zlar2v.f ilazlr.f ilazlc.f
zlarcm.f zlarf.f zlarfb.f zlarfb_gett.f
zlarfg.f zlarfgp.f zlarft.f
zlarfg.f zlarfgp.f zlarft.f zlarf1f.f zlarf1l.f
zlarfx.f zlarfy.f zlargv.f zlarnv.f zlarrv.f zlartg.f90 zlartv.f
zlarz.f zlarzb.f zlarzt.f zlascl.f zlaset.f zlasr.f
zlassq.f90 zlasyf.f zlasyf_rook.f zlasyf_rk.f zlasyf_aa.f
@@ -517,7 +518,7 @@ set(SCLAUX
scombssq.c sbdsvdx.c sstevx.c sstein.c
sbdsdc.c
sbdsqr.c sdisna.c slabad.c slacpy.c sladiv.c slae2.c slaebz.c
slaed0.c slaed1.c slaed2.c slaed3.c slaed4.c slaed5.c slaed6.c
slaed0.c slaed1.c slaed2.c slaed4.c slaed5.c slaed6.c
slaed7.c slaed8.c slaed9.c slaeda.c slaev2.c slagtf.c
slagts.c slamrg.c slanst.c
slapy2.c slapy3.c slarnv.c
@@ -536,7 +537,7 @@ set(DZLAUX
dbdsdc.c
dbdsvdx.c dstevx.c dstein.c
dbdsqr.c ddisna.c dlabad.c dlacpy.c dladiv.c dlae2.c dlaebz.c
dlaed0.c dlaed1.c dlaed2.c dlaed3.c dlaed4.c dlaed5.c dlaed6.c
dlaed0.c dlaed1.c dlaed2.c dlaed4.c dlaed5.c dlaed6.c
dlaed7.c dlaed8.c dlaed9.c dlaeda.c dlaev2.c dlagtf.c
dlagts.c dlamrg.c dlanst.c
dlapy2.c dlapy3.c dlarnv.c
@@ -575,7 +576,7 @@ set(SLASRC
slaqr0.c slaqr1.c slaqr2.c slaqr3.c slaqr4.c slaqr5.c
slaqtr.c slar1v.c slar2v.c ilaslr.c ilaslc.c
slarf.c slarfb.c slarfb_gett.c slarfg.c slarfgp.c slarft.c slarfx.c slarfy.c slargv.c
slarrv.c slartv.c
slarf1f.c slarf1l.c slarrv.c slartv.c
slarz.c slarzb.c slarzt.c slasy2.c
slasyf.c slasyf_rook.c slasyf_rk.c slasyf_aa.c
slatbs.c slatdf.c slatps.c slatrd.c slatrs.c slatrz.c
@@ -681,6 +682,7 @@ set(CLASRC
claqr0.c claqr1.c claqr2.c claqr3.c claqr4.c claqr5.c
claqsp.c claqsy.c clar1v.c clar2v.c ilaclr.c ilaclc.c
clarf.c clarfb.c clarfb_gett.c clarfg.c clarfgp.c clarft.c
clarf1f.c clarf1l.c
clarfx.c clarfy.c clargv.c clarnv.c clarrv.c clartg.c clartv.c
clarz.c clarzb.c clarzt.c clascl.c claset.c clasr.c classq.c
clasyf.c clasyf_rook.c clasyf_rk.c clasyf_aa.c
@@ -764,7 +766,7 @@ set(DLASRC
dlaqr0.c dlaqr1.c dlaqr2.c dlaqr3.c dlaqr4.c dlaqr5.c
dlaqtr.c dlar1v.c dlar2v.c iladlr.c iladlc.c
dlarf.c dlarfb.c dlarfb_gett.c dlarfg.c dlarfgp.c dlarft.c dlarfx.c dlarfy.c
dlargv.c dlarrv.c dlartv.c
dlarf1f.c dlarf1l.c dlargv.c dlarrv.c dlartv.c
dlarz.c dlarzb.c dlarzt.c dlasy2.c
dlasyf.c dlasyf_rook.c dlasyf_rk.c dlasyf_aa.c
dlatbs.c dlatdf.c dlatps.c dlatrd.c dlatrs.c dlatrz.c
@@ -871,7 +873,7 @@ set(ZLASRC
zlaqhb.c zlaqhe.c zlaqhp.c zlaqp2.c zlaqp2rk.c zlaqp3rk.c zlaqps.c zlaqsb.c
zlaqr0.c zlaqr1.c zlaqr2.c zlaqr3.c zlaqr4.c zlaqr5.c
zlaqsp.c zlaqsy.c zlar1v.c zlar2v.c ilazlr.c ilazlc.c
zlarcm.c zlarf.c zlarfb.c zlarfb_gett.c
zlarcm.c zlarf.c zlarfb.c zlarfb_gett.c zlarf1f.c zlarf1l.c
zlarfg.c zlarfgp.c zlarft.c
zlarfx.c zlarfy.c zlargv.c zlarnv.c zlarrv.c zlartg.c zlartv.c
zlarz.c zlarzb.c zlarzt.c zlascl.c zlaset.c zlasr.c
+151 -4
View File
@@ -1,3 +1,31 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
##
## Author: Hank Anderson <hank@statease.com>
## Description: Ported from OpenBLAS/Makefile.prebuild
@@ -70,8 +98,11 @@ if (${COMPILER_ID} STREQUAL "GNU")
set(COMPILER_ID "GCC")
endif ()
string(TOUPPER ${ARCH} UC_ARCH)
if (HOST_OS STREQUAL "EMSCRIPTEN")
set (ARCH wasm)
endif()
string(TOUPPER ${ARCH} UC_ARCH)
file(WRITE ${TARGET_CONF_TEMP}
"#define OS_${HOST_OS}\t1\n"
"#define ARCH_${UC_ARCH}\t1\n"
@@ -83,6 +114,10 @@ if (${HOST_OS} STREQUAL "WINDOWSSTORE")
file(APPEND ${TARGET_CONF_TEMP}
"#define OS_WINNT\t1\n")
endif ()
if (${HOST_OS} STREQUAL CYGWIN)
file(APPEND ${TARGET_CONF_TEMP}
"#define OS_CYGWIN_NT\t1\n")
endif ()
# f_check
if (NOT NOFORTRAN)
@@ -131,6 +166,8 @@ if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSS
set(HAVE_SSE2 1)
set(HAVE_SSE3 1)
set(HAVE_SSSE3 1)
set(BGEMM_UNROLL_M 8)
set(BGEMM_UNROLL_N 4)
set(SBGEMM_UNROLL_M 8)
set(SBGEMM_UNROLL_N 4)
set(SGEMM_UNROLL_M 8)
@@ -1195,7 +1232,34 @@ endif ()
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "VORTEX")
elseif ("${TCORE}" STREQUAL "AMPEREONE")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_CODE_SIZE\t16384\n"
"#define L1_CODE_LINESIZE\t64\n"
"#define L1_CODE_ASSOCIATIVE\t4\n"
"#define L1_DATA_SIZE\t65536\n"
"#define L1_DATA_LINESIZE\t64\n"
"#define L1_DATA_ASSOCIATIVE\t4\n"
"#define L2_SIZE\t2097152\n\n"
"#define L2_LINESIZE\t64\n"
"#define L2_ASSOCIATIVE\t8\n"
"#define DTB_DEFAULT_ENTRIES\t64\n"
"#define DTB_SIZE\t4096\n"
"#define HAVE_VFPV4\n"
"#define HAVE_VFPV3\n"
"#define HAVE_VFP\n"
"#define HAVE_NEON\n"
"#define ARMV8\n")
set(SGEMM_UNROLL_M 16)
set(SGEMM_UNROLL_N 4)
set(DGEMM_UNROLL_M 8)
set(DGEMM_UNROLL_N 4)
set(CGEMM_UNROLL_M 8)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "VORTEX" OR "${TCORE}" STREQUAL "VORTEXM4")
file(APPEND ${TARGET_CONF_TEMP}
"#define ARMV8\n"
"#define L1_CODE_SIZE\t32768\n"
@@ -1253,7 +1317,7 @@ endif ()
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE\t32768\n"
"#define L1_DATA_LINESIZE\t64\n"
"#define L2_SIZE\t262144\n"
"#define L2_SIZE\t1048576\n"
"#define L2_LINESIZE\t64\n"
"#define DTB_DEFAULT_ENTRIES\t64\n"
"#define DTB_SIZE\t4096\n"
@@ -1350,6 +1414,78 @@ endif ()
set(ZGEMM_UNROLL_M 8)
set(ZGEMM_UNROLL_N 2)
set(SYMV_P 8)
elseif ("${TCORE}" STREQUAL "C910V")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE 32768\n"
"#define L1_DATA_LINESIZE 32\n"
"#define L2_SIZE 1048576\n"
"#define L2_LINESIZE 32 \n"
"#define DTB_DEFAULT_ENTRIES 128\n"
"#define DTB_SIZE 4096\n"
"#define L2_ASSOCIATIVE 4\n")
set(SGEMM_UNROLL_M 16)
set(SGEMM_UNROLL_N 4)
set(DGEMM_UNROLL_M 8)
set(DGEMM_UNROLL_N 4)
set(CGEMM_UNROLL_M 2)
set(CGEMM_UNROLL_N 2)
set(ZGEMM_UNROLL_M 2)
set(ZGEMM_UNROLL_N 2)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "x280")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE 65536\n"
"#define L1_LINESIZE 32 \n"
"#define L2_SIZE 2097152\n"
"#define L2_LINESIZE 32 \n"
"#define DTB_DEFAULT_ENTRIES 128\n"
"#define DTB_SIZE 4096\n"
"#define L2_ASSOCIATIVE 4\n")
set(SGEMM_UNROLL_M 16)
set(SGEMM_UNROLL_N 8)
set(DGEMM_UNROLL_M 16)
set(DGEMM_UNROLL_N 8)
set(CGEMM_UNROLL_M 8)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 8)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "RISCV64_ZVL128B")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE 32768\n"
"#define L1_DATA_LINESIZE 32\n"
"#define L2_SIZE 1048576\n"
"#define L2_LINESIZE 32 \n"
"#define DTB_DEFAULT_ENTRIES 128\n"
"#define DTB_SIZE 4096\n"
"#define L2_ASSOCIATIVE 4\n")
set(SGEMM_UNROLL_M 8)
set(SGEMM_UNROLL_N 8)
set(DGEMM_UNROLL_M 8)
set(DGEMM_UNROLL_N 4)
set(CGEMM_UNROLL_M 8)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "RISCV64_ZVL256B")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE 65536\n"
"#define L1_DATA_LINESIZE 32\n"
"#define L2_SIZE 2097152\n"
"#define L2_LINESIZE 32 \n"
"#define DTB_DEFAULT_ENTRIES 128\n"
"#define DTB_SIZE 4096\n"
"#define L2_ASSOCIATIVE 4\n")
set(SGEMM_UNROLL_M 16)
set(SGEMM_UNROLL_N 8)
set(DGEMM_UNROLL_M 8)
set(DGEMM_UNROLL_N 8)
set(CGEMM_UNROLL_M 8)
set(CGEMM_UNROLL_N 8)
set(ZGEMM_UNROLL_M 8)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "GENERIC")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE 32768\n"
@@ -1361,7 +1497,16 @@ endif ()
"#define L2_ASSOCIATIVE 8\n")
elseif ("${TCORE}" STREQUAL "RISCV64_GENERIC")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE 32768\n"
"#define L1_DATA_SIZE 32768\n"
"#define L1_DATA_LINESIZE 32\n"
"#define L2_SIZE 1048576\n"
"#define L2_LINESIZE 32 \n"
"#define DTB_DEFAULT_ENTRIES 128\n"
"#define DTB_SIZE 4096\n"
"#define L2_ASSOCIATIVE 4\n")
elseif ("${TCORE}" STREQUAL "WASM128_GENERIC")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE 32768\n"
"#define L1_DATA_LINESIZE 32\n"
"#define L2_SIZE 1048576\n"
"#define L2_LINESIZE 32 \n"
@@ -1507,6 +1652,8 @@ else(NOT CMAKE_CROSSCOMPILING)
unset (HAVE_VFP)
unset (HAVE_VFPV3)
unset (HAVE_VFPV4)
unset (HAVE_SVE)
unset (HAVE_SME)
message(STATUS "Running getarch")
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
+122 -18
View File
@@ -1,3 +1,30 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
##
## Author: Hank Anderson <hank@statease.com>
## Description: Ported from OpenBLAS/Makefile.system
@@ -289,12 +316,19 @@ if (DEFINED TARGET)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math")
endif()
if (${TARGET} STREQUAL Z13)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=z13 -mzvector")
endif()
if (${TARGET} STREQUAL Z14)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=z14 -mzvector")
endif()
if (${TARGET} STREQUAL NEOVERSEV1)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve_intrinsics -march=armv8.4-a+sve -mtune=neoverse-v1")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve_intrinsics -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
else ()
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.4 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.4)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve -mtune=neoverse-v1")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
else ()
message(FATAL_ERROR "Compiler ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_VERSION} does not support Neoverse V1.")
endif()
@@ -311,6 +345,19 @@ if (${TARGET} STREQUAL NEOVERSEV1)
endif()
endif()
endif()
if (${TARGET} STREQUAL NEOVERSEV2)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv9-a+sve+sve2+bf16 -mtune=neoverse-v2")
else ()
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.0 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 13.0)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=neoverse-v2")
elseif (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.4 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.4)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
else ()
message(FATAL_ERROR "Compiler $${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_VERSION} does not support Neoverse V2.")
endif()
endif()
endif()
if (${TARGET} STREQUAL ARMV8SVE)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv8.2-a+sve")
@@ -320,11 +367,21 @@ if (${TARGET} STREQUAL NEOVERSEV1)
endif()
if (${TARGET} STREQUAL ARMV9SME)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv9-a+sme -O3")
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "Clang")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} --aarch64-stack-hazard-size=0")
endif()
endif()
if (${TARGET} STREQUAL VORTEXM4)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sme -O3")
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "Clang")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} --aarch64-stack-hazard-size=0")
endif()
endif()
if (${TARGET} STREQUAL A64FX)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv8.2-a+sve -mtune=a64fx")
else ()
set (GCC_VERSION 0.0)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.2-a+sve -mtune=a64fx")
@@ -334,6 +391,28 @@ if (${TARGET} STREQUAL NEOVERSEV1)
endif()
endif()
if ((${TARGET} STREQUAL RISCV64_ZVL128B) OR (${TARGET} STREQUAL RISCV64_ZVL256B))
set (RISCV64_OPT "rv64imafdcv")
if (BUILD_BFLOAT16)
set (RISCV64_OPT "${RISCV64_OPT}_zvfbfwma")
endif()
if (BUILD_HFLOAT16)
set (RISCV64_OPT "${RISCV64_OPT}_zvfh_zfh")
endif()
if (${TARGET} STREQUAL RISCV64_ZVL256B)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=${RISCV64_OPT}_zvl256b -mabi=lp64d")
endif()
if (${TARGET} STREQUAL RISCV64_ZVL128B)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=${RISCV64_OPT}_zvl128b -mabi=lp64d")
endif()
endif()
if (${TARGET} STREQUAL RISCV64_GENERIC)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=rv64imafdc -mabi=lp64d")
endif()
if (${TARGET} STREQUAL x280)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d")
endif()
endif()
if (DEFINED BINARY)
@@ -378,10 +457,16 @@ if (USE_OPENMP)
if (NOT NOFORTRAN)
find_package(OpenMP COMPONENTS Fortran REQUIRED)
# Avoid mixed OpenMP linkage
get_target_property(OMP_C_LIB OpenMP::OpenMP_C INTERFACE_LINK_LIBRARIES)
get_target_property(OMP_Fortran_LIB OpenMP::OpenMP_Fortran INTERFACE_LINK_LIBRARIES)
if (NOT OMP_C_LIB STREQUAL OMP_Fortran_LIB)
message(FATAL_ERROR "Multiple OpenMP runtime libraries detected. Mixed OpenMP runtime linkage is dangerous. You may pass -DOpenMP_LANG_LIB_NAMES and -DOpenMP_omp_LIBRARY to manually choose the OpenMP library.")
get_target_property(OMP_C_LIBS OpenMP::OpenMP_C INTERFACE_LINK_LIBRARIES)
get_target_property(OMP_F_LIBS OpenMP::OpenMP_Fortran INTERFACE_LINK_LIBRARIES)
if (NOT OMP_C_LIBS STREQUAL OMP_F_LIBS)
message(NOTICE
"CMake detected different OpenMP libraries for C and Fortran:\n"
"C=${OMP_C_LIBS}\n"
"Fortran=${OMP_F_LIBS}\n"
"In case you encounter issues, please check that this is correct.\n"
"You may pass -DOpenMP_<lang>_LIB_NAMES and -DOpenMP_<libname>_LIBRARY to cmake to manually force the OpenMP library."
)
endif()
endif ()
endif ()
@@ -420,20 +505,32 @@ if (X86_64 OR ${CORE} STREQUAL POWER10 OR ARM64 OR LOONGARCH64)
endif ()
if (ARM64)
set(GEMM_GEMV_FORWARD TRUE)
set(SBGEMM_GEMV_FORWARD TRUE)
set(BGEMM_GEMV_FORWARD TRUE)
endif ()
if (POWER)
set(GEMM_GEMV_FORWARD TRUE)
set(SBGEMM_GEMV_FORWARD TRUE)
endif ()
if (RISCV64)
set(GEMM_GEMV_FORWARD TRUE)
endif ()
if (GEMM_GEMV_FORWARD AND NOT ONLY_CBLAS)
if (GEMM_GEMV_FORWARD)
set(CCOMMON_OPT "${CCOMMON_OPT} -DGEMM_GEMV_FORWARD")
endif ()
if (GEMM_GEMV_FORWARD_BF16 AND NOT ONLY_CBLAS)
set(CCOMMON_OPT "${CCOMMON_OPT} -DGEMM_GEMV_FORWARD_BF16")
if (SBGEMM_GEMV_FORWARD)
set(CCOMMON_OPT "${CCOMMON_OPT} -DSBGEMM_GEMV_FORWARD")
endif ()
if (BGEMM_GEMV_FORWARD)
set(CCOMMON_OPT "${CCOMMON_OPT} -DBGEMM_GEMV_FORWARD")
endif ()
if (SMALL_MATRIX_OPT)
set(CCOMMON_OPT "${CCOMMON_OPT} -DSMALL_MATRIX_OPT")
endif ()
if (DYNAMIC_ARCH)
if (X86 OR X86_64 OR ARM64 OR POWER OR RISCV64 OR LOONGARCH64)
if (X86 OR X86_64 OR ARM64 OR POWER OR RISCV64 OR LOONGARCH64 OR ZARCH)
set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH")
if (DYNAMIC_OLDER)
set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER")
@@ -640,6 +737,9 @@ endif()
if (BUILD_BFLOAT16)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_BFLOAT16")
endif()
if (BUILD_HFLOAT16)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_HFLOAT16")
endif()
if(NOT MSVC)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${CCOMMON_OPT}")
endif()
@@ -647,14 +747,14 @@ endif()
set(PFLAGS "${PFLAGS} ${CCOMMON_OPT} -I${TOPDIR} -DPROFILE ${COMMON_PROF}")
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
if ("${F_COMPILER}" STREQUAL "FLANG")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fno-unroll-loops")
endif ()
endif ()
if (ARM64 AND CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O2")
endif ()
if ("${F_COMPILER}" STREQUAL "FLANG")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fno-unroll-loops")
endif ()
endif ()
if (ARM64 AND CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O2")
endif ()
endif ()
@@ -779,6 +879,10 @@ if (DEFINED ARCH)
set(USE_GEMM3M 1)
endif ()
if (EMSCRIPTEN)
set(USE_GEMM3M 0)
endif ()
if (${CORE} STREQUAL "generic")
set(USE_GEMM3M 0)
endif ()
+16
View File
@@ -40,6 +40,8 @@ if(CMAKE_CL_64 OR MINGW64)
else()
set(X86_64 1)
endif()
elseif(OS_EMSCRIPTEN)
set(WASM 1)
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
set(X86 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc.*|power.*|Power.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc.*"))
@@ -50,6 +52,9 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64.*")
set(LOONGARCH64 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64.*")
set(RISCV64 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390.*")
set(ZARCH 1)
set(BINARY 64)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*"))
if (NOT BINARY)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
@@ -100,6 +105,8 @@ elseif(X86)
set(ARCH "x86")
elseif(POWER)
set(ARCH "power")
elseif(ZARCH)
set(ARCH "zarch")
elseif(MIPS32)
set(ARCH "mips")
elseif(MIPS64)
@@ -140,6 +147,15 @@ endif()
endif()
if (ARM64)
if (NOT NO_SVE)
file(WRITE ${PROJECT_BINARY_DIR}/sve.c "#include <arm_sve.h>\n\n int main(void){}\n")
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=armv8-a+sve -c -o ${PROJECT_BINARY_DIR}/sve.o ${PROJECT_BINARY_DIR}/sve.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_SVE)
if (NO_SVE EQUAL 1)
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_SVE")
endif()
file(REMOVE "${PROJECT_BINARY_DIR}/sve.c" "${PROJECT_BINARY_DIR}/sve.o")
endif()
if (NOT NO_SME)
file(WRITE ${PROJECT_BINARY_DIR}/sme.c ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n")
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=armv9-a+sve2+sme -c -v -o ${PROJECT_BINARY_DIR}/sme.o ${PROJECT_BINARY_DIR}/sme.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_SME)
+38 -4
View File
@@ -1,3 +1,31 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
# Functions to help with the OpenBLAS build
# Reads string from getarch into CMake vars. Format of getarch vars is VARNAME=VALUE
@@ -23,7 +51,7 @@ macro(ParseMakefileVars MAKEFILE_IN)
if (${OSNAME} STREQUAL Windows)
set (OSNAME WINNT)
endif ()
message(STATUS OS ${OSNAME} COMPILER ${C_COMPILER})
#message(STATUS OS ${OSNAME} COMPILER ${C_COMPILER})
set (IfElse 0)
set (ElseSeen 0)
set (SkipIfs 0)
@@ -347,9 +375,12 @@ function(GenerateNamedObjects sources_in)
if (NOT no_float_type)
string(SUBSTRING ${float_type} 0 1 float_char)
string(TOLOWER ${float_char} float_char)
if (${float_type} STREQUAL "BFLOAT16")
set (float_char "sb")
endif ()
if (${float_type} STREQUAL "BFLOAT16" AND NOT "${defines_in}" MATCHES "BGEM")
set (float_char "sb")
endif ()
if (${float_type} STREQUAL "HFLOAT16" AND NOT "${defines_in}" MATCHES "HGEM")
set (float_char "sh")
endif ()
endif ()
if (NOT name_in)
@@ -399,6 +430,9 @@ function(GenerateNamedObjects sources_in)
endif ()
if (${float_type} STREQUAL "BFLOAT16")
list(APPEND obj_defines "BFLOAT16")
endif ()
if (${float_type} STREQUAL "HFLOAT16")
list(APPEND obj_defines "HFLOAT16")
endif ()
if (${float_type} STREQUAL "COMPLEX" OR ${float_type} STREQUAL "ZCOMPLEX")
list(APPEND obj_defines "COMPLEX")
+43 -17
View File
@@ -1,5 +1,6 @@
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* Copyright 2025 The OpenBLAS Project. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
@@ -266,6 +267,14 @@ typedef uint16_t bfloat16;
#define BFLOAT16CONVERSION 1
#endif
#ifdef BUILD_HFLOAT16
#ifndef hfloat16
typedef _Float16 hfloat16;
#endif
#else
typedef uint16_t hfloat16;
#endif
#ifdef USE64BITINT
typedef BLASLONG blasint;
#if defined(OS_WINDOWS) && defined(__64BIT__)
@@ -309,10 +318,21 @@ typedef int blasint;
#elif defined(BFLOAT16)
#define IFLOAT bfloat16
#define XFLOAT IFLOAT
#define FLOAT float
#ifdef BGEMM
#define FLOAT bfloat16
#else
#define FLOAT float
#endif
#define SIZE 2
#define BASE_SHIFT 1
#define ZBASE_SHIFT 2
#elif defined(HFLOAT16)
#define IFLOAT hfloat16
#define XFLOAT IFLOAT
#define FLOAT float
#define SIZE 2
#define BASE_SHIFT 1
#define ZBASE_SHIFT 2
#else
#define FLOAT float
#define SIZE 4
@@ -342,18 +362,6 @@ typedef int blasint;
#define MAX_CPU_NUMBER 2
#endif
#if defined(OS_SUNOS)
#define YIELDING thr_yield()
#endif
#if defined(OS_WINDOWS)
#if defined(_MSC_VER) && !defined(__clang__)
#define YIELDING YieldProcessor()
#else
#define YIELDING SwitchToThread()
#endif
#endif
#if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) || defined(ARMV5)
#define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
#endif
@@ -378,14 +386,28 @@ typedef int blasint;
#endif
#endif
#ifdef __EMSCRIPTEN__
#if defined(ARCH_WASM)
#ifndef YIELDING
#define YIELDING
#endif
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#undef YIELDING // MSVC doesn't support assembly code
#define YIELDING YieldProcessor()
#endif
#ifndef YIELDING
#if defined(OS_SUNOS)
#define YIELDING thr_yield()
#elif defined(OS_WINDOWS)
#define YIELDING SwitchToThread()
#else // assume POSIX.1-2008
#define YIELDING sched_yield()
#endif
#endif
/***
To alloc job_t on heap or stack.
@@ -478,6 +500,10 @@ please https://github.com/xianyi/OpenBLAS/issues/246
#include "common_csky.h"
#endif
#ifdef ARCH_WASM
#include "common_wasm.h"
#endif
#ifndef ASSEMBLER
#ifdef OS_WINDOWSSTORE
typedef char env_var_t[MAX_PATH];
@@ -745,7 +771,7 @@ static __inline int readenv_atoi(char *env) {
return 0;
}
#else
#ifdef OS_WINDOWS
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN_NT)
static __inline int readenv_atoi(char *env) {
env_var_t p;
return readenv(p,env) ? 0 : atoi(p);
@@ -761,7 +787,7 @@ static __inline int readenv_atoi(char *env) {
#endif
#endif
#if !defined(XDOUBLE) || !defined(QUAD_PRECISION)
#if !defined(BFLOAT16) && (!defined(XDOUBLE) || !defined(QUAD_PRECISION))
static __inline void compinv(FLOAT *b, FLOAT ar, FLOAT ai){
+9 -1
View File
@@ -114,7 +114,15 @@ static inline int blas_quickdivide(blasint x, blasint y){
OPENBLAS_ARM_TYPE_FUNCTION \
REALNAME:
#define EPILOGUE
#if defined(__ELF__) && defined(__linux__)
# define GNUSTACK .section .note.GNU-stack,"",%progbits
#else
# define GNUSTACK
#endif
#define EPILOGUE \
GNUSTACK
#define PROFCODE
+3 -3
View File
@@ -114,9 +114,9 @@ static __inline BLASULONG rpcc(void){
#else
BLASULONG ret = 0;
blasint shift;
__asm__ __volatile__ ("isb; mrs %0,cntvct_el0":"=r"(ret));
__asm__ __volatile__ ("mrs %0,cntfrq_el0; clz %w0, %w0":"=&r"(shift));
__asm__ __volatile__ ("isb\n\tmrs %0,cntvct_el0":"=r"(ret));
__asm__ __volatile__ ("mrs %x0,cntfrq_el0\n\tclz %w0, %w0":"=&r"(shift));
return ret << shift;
#endif
+100
View File
@@ -0,0 +1,100 @@
/***************************************************************************
* Copyright (c) 2025, The OpenBLAS Project
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name of the OpenBLAS project nor the names of
* its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *****************************************************************************/
#ifndef COMMON_B_H
#define COMMON_B_H
#ifndef DYNAMIC_ARCH
#define BGEMV_N_K bgemv_n
#define BGEMV_T_K bgemv_t
#define BSCAL_K bscal_k
#define BGEMM_ONCOPY bgemm_oncopy
#define BGEMM_OTCOPY bgemm_otcopy
#if BGEMM_DEFAULT_UNROLL_M == BGEMM_DEFAULT_UNROLL_N
#define BGEMM_INCOPY bgemm_oncopy
#define BGEMM_ITCOPY bgemm_otcopy
#else
#define BGEMM_INCOPY bgemm_incopy
#define BGEMM_ITCOPY bgemm_itcopy
#endif
#define BGEMM_BETA bgemm_beta
#define BGEMM_KERNEL bgemm_kernel
#else
#define BGEMV_N_K gotoblas->bgemv_n
#define BGEMV_T_K gotoblas->bgemv_t
#define BSCAL_K gotoblas->bscal_k
#define BGEMM_ONCOPY gotoblas->bgemm_oncopy
#define BGEMM_OTCOPY gotoblas->bgemm_otcopy
#define BGEMM_INCOPY gotoblas->bgemm_incopy
#define BGEMM_ITCOPY gotoblas->bgemm_itcopy
#define BGEMM_BETA gotoblas->bgemm_beta
#define BGEMM_KERNEL gotoblas->bgemm_kernel
#endif
#define BGEMM_NN bgemm_nn
#define BGEMM_CN bgemm_tn
#define BGEMM_TN bgemm_tn
#define BGEMM_NC bgemm_nt
#define BGEMM_NT bgemm_nt
#define BGEMM_CC bgemm_tt
#define BGEMM_CT bgemm_tt
#define BGEMM_TC bgemm_tt
#define BGEMM_TT bgemm_tt
#define BGEMM_NR bgemm_nn
#define BGEMM_TR bgemm_tn
#define BGEMM_CR bgemm_tn
#define BGEMM_RN bgemm_nn
#define BGEMM_RT bgemm_nt
#define BGEMM_RC bgemm_nt
#define BGEMM_RR bgemm_nn
#define BGEMM_THREAD_NN bgemm_thread_nn
#define BGEMM_THREAD_CN bgemm_thread_tn
#define BGEMM_THREAD_TN bgemm_thread_tn
#define BGEMM_THREAD_NC bgemm_thread_nt
#define BGEMM_THREAD_NT bgemm_thread_nt
#define BGEMM_THREAD_CC bgemm_thread_tt
#define BGEMM_THREAD_CT bgemm_thread_tt
#define BGEMM_THREAD_TC bgemm_thread_tt
#define BGEMM_THREAD_TT bgemm_thread_tt
#define BGEMM_THREAD_NR bgemm_thread_nn
#define BGEMM_THREAD_TR bgemm_thread_tn
#define BGEMM_THREAD_CR bgemm_thread_tn
#define BGEMM_THREAD_RN bgemm_thread_nn
#define BGEMM_THREAD_RT bgemm_thread_nt
#define BGEMM_THREAD_RC bgemm_thread_nt
#define BGEMM_THREAD_RR bgemm_thread_nn
#endif
+10
View File
@@ -1,5 +1,6 @@
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* Copyright 2025 The OpenBLAS Project. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
@@ -59,6 +60,7 @@ double BLASFUNC(dsdot) (blasint *, float *, blasint *, float *, blasint *);
double BLASFUNC(ddot) (blasint *, double *, blasint *, double *, blasint *);
xdouble BLASFUNC(qdot) (blasint *, xdouble *, blasint *, xdouble *, blasint *);
void BLASFUNC(bscal) (blasint *, bfloat16 *, bfloat16 *, blasint *);
float BLASFUNC(sbdot) (blasint *, bfloat16 *, blasint *, bfloat16 *, blasint *);
void BLASFUNC(sbstobf16) (blasint *, float *, blasint *, bfloat16 *, blasint *);
void BLASFUNC(sbdtobf16) (blasint *, double *, blasint *, bfloat16 *, blasint *);
@@ -255,8 +257,12 @@ void BLASFUNC(xgeru)(blasint *, blasint *, xdouble *, xdouble *, blasint *,
void BLASFUNC(xgerc)(blasint *, blasint *, xdouble *, xdouble *, blasint *,
xdouble *, blasint *, xdouble *, blasint *);
void BLASFUNC(bgemv)(char *, blasint *, blasint *, bfloat16 *, bfloat16 *, blasint *,
bfloat16 *, blasint *, bfloat16 *, bfloat16 *, blasint *);
void BLASFUNC(sbgemv)(char *, blasint *, blasint *, float *, bfloat16 *, blasint *,
bfloat16 *, blasint *, float *, float *, blasint *);
void BLASFUNC(shgemv)(char *, blasint *, blasint *, float *, hfloat16 *, blasint *,
hfloat16 *, blasint *, float *, float *, blasint *);
void BLASFUNC(sgemv)(char *, blasint *, blasint *, float *, float *, blasint *,
float *, blasint *, float *, float *, blasint *);
void BLASFUNC(dgemv)(char *, blasint *, blasint *, double *, double *, blasint *,
@@ -481,6 +487,10 @@ void BLASFUNC(xhbmv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint
/* Level 3 routines */
void BLASFUNC(shgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
hfloat16 *, blasint *, hfloat16 *, blasint *, float *, float *, blasint *);
void BLASFUNC(bgemm)(char *, char *, blasint *, blasint *, blasint *, bfloat16 *,
bfloat16 *, blasint *, bfloat16 *, blasint *, bfloat16 *, bfloat16 *, blasint *);
void BLASFUNC(sbgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
bfloat16 *, blasint *, bfloat16 *, blasint *, float *, float *, blasint *);
void BLASFUNC(sgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
+5
View File
@@ -439,4 +439,9 @@ blasint xtrtrs_LRN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdo
blasint xtrtrs_LCU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG);
blasint xtrtrs_LCN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG);
blasint slaed3_single(blasint *, blasint *, blasint *, float *, float *, blasint *, float *, float *, float *, blasint *, blasint *, float *, float *, blasint *);
blasint dlaed3_single(blasint *, blasint *, blasint *, double *, double *, blasint *, double *, double *, double *, blasint *, blasint *, double *, double *, blasint *);
blasint slaed3_parallel(blasint *, blasint *, blasint *, float *, float *, blasint *, float *, float *, float *, blasint *, blasint *, float *, float *, blasint *);
blasint dlaed3_parallel(blasint *, blasint *, blasint *, double *, double *, blasint *, double *, double *, double *, blasint *, blasint *, double *, double *, blasint *);
#endif
+4
View File
@@ -1,4 +1,5 @@
/*********************************************************************/
/* Copyright 2025 The OpenBLAS Project. */
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
@@ -169,6 +170,9 @@ BLASLONG icmin_k(BLASLONG, float *, BLASLONG);
BLASLONG izmin_k(BLASLONG, double *, BLASLONG);
BLASLONG ixmin_k(BLASLONG, xdouble *, BLASLONG);
int bscal_k(BLASLONG, BLASLONG, BLASLONG, bfloat16,
bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
int sscal_k(BLASLONG, BLASLONG, BLASLONG, float,
float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
int dscal_k(BLASLONG, BLASLONG, BLASLONG, double,
+10
View File
@@ -1,4 +1,5 @@
/*********************************************************************/
/* Copyright 2025 The OpenBLAS Project */
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
@@ -44,10 +45,19 @@
extern "C" {
#endif
int bgemv_n(BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
int bgemv_t(BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
int bgemv_thread_n(BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG, int);
int bgemv_thread_t(BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG, int);
int sbgemv_n(BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
int sbgemv_t(BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
int sbgemv_thread_n(BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG, int);
int sbgemv_thread_t(BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG, int);
int shgemv_n(BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float, float *, BLASLONG);
int shgemv_t(BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float, float *, BLASLONG);
int shgemv_thread_n(BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float, float *, BLASLONG, int);
int shgemv_thread_t(BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float, float *, BLASLONG, int);
int sger_k (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
int dger_k (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
int qger_k (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *);
+118 -1
View File
@@ -52,9 +52,95 @@ void sgemm_direct(BLASLONG M, BLASLONG N, BLASLONG K,
float * B, BLASLONG strideB,
float * R, BLASLONG strideR);
void sgemm_direct_alpha_beta(BLASLONG M, BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB,
float beta,
float * R, BLASLONG strideR);
void ssymm_direct_alpha_betaLU(BLASLONG M, BLASLONG N,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB,
float beta,
float * R, BLASLONG strideR);
void ssymm_direct_alpha_betaLL(BLASLONG M, BLASLONG N,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB,
float beta,
float * R, BLASLONG strideR);
void strmm_direct_LNUN(BLASLONG M, BLASLONG N,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB);
void strmm_direct_LNLN(BLASLONG M, BLASLONG N,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB);
void strmm_direct_LTUN(BLASLONG M, BLASLONG N,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB);
void strmm_direct_LTLN(BLASLONG M, BLASLONG N,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB);
void ssyrk_direct_alpha_betaUN(BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float beta,
float * C, BLASLONG strideC);
void ssyrk_direct_alpha_betaUT(BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float beta,
float * C, BLASLONG strideC);
void ssyrk_direct_alpha_betaLN(BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float beta,
float * C, BLASLONG strideC);
void ssyrk_direct_alpha_betaLT(BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float beta,
float * C, BLASLONG strideC);
void ssyr2k_direct_alpha_betaUN(BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB,
float beta,
float * R, BLASLONG strideR);
void ssyr2k_direct_alpha_betaUT(BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB,
float beta,
float * R, BLASLONG strideR);
void ssyr2k_direct_alpha_betaLN(BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB,
float beta,
float * R, BLASLONG strideR);
void ssyr2k_direct_alpha_betaLT(BLASLONG N, BLASLONG K,
float alpha,
float * A, BLASLONG strideA,
float * B, BLASLONG strideB,
float beta,
float * R, BLASLONG strideR);
int sgemm_direct_performant(BLASLONG M, BLASLONG N, BLASLONG K);
int shgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float *, BLASLONG);
int bgemm_beta(BLASLONG, BLASLONG, BLASLONG, bfloat16,
bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
int sbgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
int sgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
@@ -78,6 +164,14 @@ int xgemm_beta(BLASLONG, BLASLONG, BLASLONG, xdouble *,
xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
#endif
int shgemm_incopy(BLASLONG m, BLASLONG n, hfloat16 *a, BLASLONG lda, hfloat16 *b);
int shgemm_itcopy(BLASLONG m, BLASLONG n, hfloat16 *a, BLASLONG lda, hfloat16 *b);
int shgemm_oncopy(BLASLONG m, BLASLONG n, hfloat16 *a, BLASLONG lda, hfloat16 *b);
int shgemm_otcopy(BLASLONG m, BLASLONG n, hfloat16 *a, BLASLONG lda, hfloat16 *b);
int bgemm_incopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
int bgemm_itcopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
int bgemm_oncopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
int bgemm_otcopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
int sbgemm_incopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
int sbgemm_itcopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
int sbgemm_oncopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
@@ -505,6 +599,8 @@ int xher2k_kernel_UC(BLASLONG m, BLASLONG n, BLASLONG k, xdouble alpha_r, xdoubl
int xher2k_kernel_LN(BLASLONG m, BLASLONG n, BLASLONG k, xdouble alpha_r, xdouble alpha_i, xdouble *a, xdouble *b, xdouble *c, BLASLONG ldc, BLASLONG offset, int flag);
int xher2k_kernel_LC(BLASLONG m, BLASLONG n, BLASLONG k, xdouble alpha_r, xdouble alpha_i, xdouble *a, xdouble *b, xdouble *c, BLASLONG ldc, BLASLONG offset, int flag);
int shgemm_kernel(BLASLONG, BLASLONG, BLASLONG, float, hfloat16 *, hfloat16 *, float *, BLASLONG);
int bgemm_kernel(BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, bfloat16 *, bfloat16 *, BLASLONG);
int sbgemm_kernel(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, bfloat16 *, float *, BLASLONG);
int sgemm_kernel(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG);
int dgemm_kernel(BLASLONG, BLASLONG, BLASLONG, double, double *, double *, double *, BLASLONG);
@@ -657,6 +753,16 @@ int cgemm3m_kernel(BLASLONG, BLASLONG, BLASLONG, float, float, float *, float
int zgemm3m_kernel(BLASLONG, BLASLONG, BLASLONG, double, double, double *, double *, double *, BLASLONG);
int xgemm3m_kernel(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, xdouble *, xdouble *, xdouble *, BLASLONG);
int shgemm_nn(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
int shgemm_nt(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
int shgemm_tn(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
int shgemm_tt(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
int bgemm_nn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int bgemm_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int bgemm_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int bgemm_tt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int sbgemm_nn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int sbgemm_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int sbgemm_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
@@ -754,6 +860,16 @@ int xgemm_cr(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLON
int xgemm_cc(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG);
#endif
int shgemm_thread_nn(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
int shgemm_thread_nt(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
int shgemm_thread_tn(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
int shgemm_thread_tt(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
int bgemm_thread_nn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int bgemm_thread_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int bgemm_thread_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int bgemm_thread_tt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int sbgemm_thread_nn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int sbgemm_thread_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
int sbgemm_thread_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
@@ -1944,6 +2060,7 @@ int dgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
int cgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
int zgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
int sbgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
// int shgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
#ifdef __CUDACC__
}
+113 -5
View File
@@ -1,5 +1,6 @@
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* Copyright 2025 The OpenBLAS Project. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
@@ -39,6 +40,8 @@
#ifndef COMMON_MACRO
#define COMMON_MACRO
#include "common_sh.h"
#include "common_b.h"
#include "common_sb.h"
#include "common_s.h"
#include "common_d.h"
@@ -656,15 +659,111 @@
#define GEMM_SMALL_KERNEL_B0_NT DGEMM_SMALL_KERNEL_B0_NT
#define GEMM_SMALL_KERNEL_B0_TN DGEMM_SMALL_KERNEL_B0_TN
#define GEMM_SMALL_KERNEL_B0_TT DGEMM_SMALL_KERNEL_B0_TT
#elif defined(HFLOAT16)
#define GEMM_BETA SHGEMM_BETA
#define GEMM_KERNEL_N SHGEMM_KERNEL
#define GEMM_KERNEL_L SHGEMM_KERNEL
#define GEMM_KERNEL_R SHGEMM_KERNEL
#define GEMM_KERNEL_B SHGEMM_KERNEL
#define GEMM_NN SHGEMM_NN
#define GEMM_CN SHGEMM_TN
#define GEMM_TN SHGEMM_TN
#define GEMM_NC SHGEMM_NT
#define GEMM_NT SHGEMM_NT
#define GEMM_CC SHGEMM_TT
#define GEMM_CT SHGEMM_TT
#define GEMM_TC SHGEMM_TT
#define GEMM_TT SHGEMM_TT
#define GEMM_NR SHGEMM_NN
#define GEMM_TR SHGEMM_TN
#define GEMM_CR SHGEMM_TN
#define GEMM_RN SHGEMM_NN
#define GEMM_RT SHGEMM_NT
#define GEMM_RC SHGEMM_NT
#define GEMM_RR SHGEMM_NN
#define GEMM_ONCOPY SHGEMM_ONCOPY
#define GEMM_OTCOPY SHGEMM_OTCOPY
#define GEMM_INCOPY SHGEMM_INCOPY
#define GEMM_ITCOPY SHGEMM_ITCOPY
#define GEMM_THREAD_NN SHGEMM_THREAD_NN
#define GEMM_THREAD_CN SHGEMM_THREAD_TN
#define GEMM_THREAD_TN SHGEMM_THREAD_TN
#define GEMM_THREAD_NC SHGEMM_THREAD_NT
#define GEMM_THREAD_NT SHGEMM_THREAD_NT
#define GEMM_THREAD_CC SHGEMM_THREAD_TT
#define GEMM_THREAD_CT SHGEMM_THREAD_TT
#define GEMM_THREAD_TC SHGEMM_THREAD_TT
#define GEMM_THREAD_TT SHGEMM_THREAD_TT
#define GEMM_THREAD_NR SHGEMM_THREAD_NN
#define GEMM_THREAD_TR SHGEMM_THREAD_TN
#define GEMM_THREAD_CR SHGEMM_THREAD_TN
#define GEMM_THREAD_RN SHGEMM_THREAD_NN
#define GEMM_THREAD_RT SHGEMM_THREAD_NT
#define GEMM_THREAD_RC SHGEMM_THREAD_NT
#define GEMM_THREAD_RR SHGEMM_THREAD_NN
#define SCAL_K SSCAL_K
#define GEMV_N SHGEMV_N_K
#define GEMV_T SHGEMV_T_K
#elif defined(BFLOAT16) && defined(BGEMM)
#define SCAL_K BSCAL_K
#define GEMV_N BGEMV_N_K
#define GEMV_T BGEMV_T_K
#define GEMM_BETA BGEMM_BETA
#define GEMM_KERNEL_N BGEMM_KERNEL
#define GEMM_KERNEL_L BGEMM_KERNEL
#define GEMM_KERNEL_R BGEMM_KERNEL
#define GEMM_KERNEL_B BGEMM_KERNEL
#define GEMM_NN BGEMM_NN
#define GEMM_CN BGEMM_TN
#define GEMM_TN BGEMM_TN
#define GEMM_NC BGEMM_NT
#define GEMM_NT BGEMM_NT
#define GEMM_CC BGEMM_TT
#define GEMM_CT BGEMM_TT
#define GEMM_TC BGEMM_TT
#define GEMM_TT BGEMM_TT
#define GEMM_NR BGEMM_NN
#define GEMM_TR BGEMM_TN
#define GEMM_CR BGEMM_TN
#define GEMM_RN BGEMM_NN
#define GEMM_RT BGEMM_NT
#define GEMM_RC BGEMM_NT
#define GEMM_RR BGEMM_NN
#define GEMM_ONCOPY BGEMM_ONCOPY
#define GEMM_OTCOPY BGEMM_OTCOPY
#define GEMM_INCOPY BGEMM_INCOPY
#define GEMM_ITCOPY BGEMM_ITCOPY
#define GEMM_THREAD_NN BGEMM_THREAD_NN
#define GEMM_THREAD_CN BGEMM_THREAD_TN
#define GEMM_THREAD_TN BGEMM_THREAD_TN
#define GEMM_THREAD_NC BGEMM_THREAD_NT
#define GEMM_THREAD_NT BGEMM_THREAD_NT
#define GEMM_THREAD_CC BGEMM_THREAD_TT
#define GEMM_THREAD_CT BGEMM_THREAD_TT
#define GEMM_THREAD_TC BGEMM_THREAD_TT
#define GEMM_THREAD_TT BGEMM_THREAD_TT
#define GEMM_THREAD_NR BGEMM_THREAD_NN
#define GEMM_THREAD_TR BGEMM_THREAD_TN
#define GEMM_THREAD_CR BGEMM_THREAD_TN
#define GEMM_THREAD_RN BGEMM_THREAD_NN
#define GEMM_THREAD_RT BGEMM_THREAD_NT
#define GEMM_THREAD_RC BGEMM_THREAD_NT
#define GEMM_THREAD_RR BGEMM_THREAD_NN
#elif defined(BFLOAT16)
#define D_TO_BF16_K SBDTOBF16_K
#define D_BF16_TO_K DBF16TOD_K
#define S_TO_BF16_K SBSTOBF16_K
#define S_BF16_TO_K SBF16TOS_K
#define SBGEMV_N SBGEMV_N_K
#define SBGEMV_T SBGEMV_T_K
#define GEMV_N SBGEMV_N_K
#define GEMV_T SBGEMV_T_K
#define AMAX_K SAMAX_K
#define AMIN_K SAMIN_K
@@ -682,8 +781,6 @@
#define AXPYC_K SAXPYC_K
#define AXPBY_K SAXPBY_K
#define SCAL_K SSCAL_K
#define GEMV_N SGEMV_N
#define GEMV_T SGEMV_T
#define SYMV_U SSYMV_U
#define SYMV_L SSYMV_L
#define GERU_K SGERU_K
@@ -2618,6 +2715,9 @@
|| defined(ARCH_LOONGARCH64) || defined(ARCH_E2K) || defined(ARCH_ALPHA))
extern BLASLONG gemm_offset_a;
extern BLASLONG gemm_offset_b;
extern BLASLONG bgemm_p;
extern BLASLONG bgemm_q;
extern BLASLONG bgemm_r;
extern BLASLONG sbgemm_p;
extern BLASLONG sbgemm_q;
extern BLASLONG sbgemm_r;
@@ -2990,6 +3090,8 @@ typedef struct {
#define NEG_TCOPY DNEG_TCOPY
#define LARF_L DLARF_L
#define LARF_R DLARF_R
#define LAED3_SINGLE dlaed3_single
#define LAED3_PARALLEL dlaed3_parallel
#else
#define GETF2 SGETF2
#define GETRF SGETRF
@@ -3011,6 +3113,8 @@ typedef struct {
#define NEG_TCOPY SNEG_TCOPY
#define LARF_L SLARF_L
#define LARF_R SLARF_R
#define LAED3_SINGLE slaed3_single
#define LAED3_PARALLEL slaed3_parallel
#endif
#else
#ifdef XDOUBLE
@@ -3055,6 +3159,8 @@ typedef struct {
#define NEG_TCOPY ZNEG_TCOPY
#define LARF_L ZLARF_L
#define LARF_R ZLARF_R
#define LAED3_SINGLE dlaed3_single
#define LAED3_PARALLEL dlaed3_parallel
#else
#define GETF2 CGETF2
#define GETRF CGETRF
@@ -3076,6 +3182,8 @@ typedef struct {
#define NEG_TCOPY CNEG_TCOPY
#define LARF_L CLARF_L
#define LARF_R CLARF_R
#define LAED3_SINGLE slaed3_single
#define LAED3_PARALLEL slaed3_parallel
#endif
#endif
+139 -23
View File
@@ -1,6 +1,6 @@
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* Copyright 2023 The OpenBLAS Project. */
/* Copyright 2023, 2025 The OpenBLAS Project. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
@@ -47,9 +47,32 @@
typedef struct {
int dtb_entries;
int switch_ratio;
int divide_rate;
int divide_limit;
int preferred_size;
int offsetA, offsetB, align;
#if BUILD_HFLOAT16 == 1
int shgemm_p, shgemm_q, shgemm_r;
int shgemm_unroll_m, shgemm_unroll_n, shgemm_unroll_mn;
int (*shgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, hfloat16 *, hfloat16 *, float *, BLASLONG);
int (*shgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float *, BLASLONG);
int (*shgemm_incopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
int (*shgemm_itcopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
int (*shgemm_oncopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
int (*shgemm_otcopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
int (*shgemv_n) (BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float, float *, BLASLONG);
int (*shgemv_t) (BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float, float *, BLASLONG);
#endif
#if BUILD_BFLOAT16 == 1
int bgemm_p, bgemm_q, bgemm_r;
int bgemm_unroll_m, bgemm_unroll_n, bgemm_unroll_mn;
int bgemm_align_k;
int sbgemm_p, sbgemm_q, sbgemm_r;
int sbgemm_unroll_m, sbgemm_unroll_n, sbgemm_unroll_mn;
int sbgemm_align_k;
@@ -64,10 +87,10 @@ typedef struct {
float (*sbamin_k) (BLASLONG, float *, BLASLONG);
float (*sbmax_k) (BLASLONG, float *, BLASLONG);
float (*sbmin_k) (BLASLONG, float *, BLASLONG);
BLASLONG (*isbamax_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*isbamin_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*isbmax_k) (BLASLONG, float *, BLASLONG);
BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
BLASLONG (*isbamax_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*isbamin_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*isbmax_k) (BLASLONG, float *, BLASLONG);
BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
float (*sbnrm2_k) (BLASLONG, float *, BLASLONG);
float (*sbasum_k) (BLASLONG, float *, BLASLONG);
@@ -79,10 +102,14 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
int (*sbrot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
int (*sbrotm_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
int (*bscal_k) (BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
int (*sbaxpy_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
int (*sbscal_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
int (*sbswap_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
int (*bgemv_n) (BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
int (*bgemv_t) (BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
int (*sbgemv_n) (BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
int (*sbgemv_t) (BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
int (*sbger_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
@@ -90,6 +117,14 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
int (*sbsymv_L) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
int (*sbsymv_U) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
int (*bgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, bfloat16 *, bfloat16 *, BLASLONG);
int (*bgemm_beta )(BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
int (*bgemm_incopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
int (*bgemm_itcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
int (*bgemm_oncopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
int (*bgemm_otcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
int (*sbgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, bfloat16 *, float *, BLASLONG);
int (*sbgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
@@ -180,12 +215,12 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
#endif
#if (BUILD_SINGLE==1) || (BUILD_DOUBLE ==1) || (BUILD_COMPLEX==1)
BLASLONG (*isamax_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*isamax_k)(BLASLONG, float *, BLASLONG);
#endif
#if (BUILD_SINGLE==1) || (BUILD_COMPLEX==1)
BLASLONG (*isamin_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*ismax_k) (BLASLONG, float *, BLASLONG);
BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
BLASLONG (*isamin_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*ismax_k) (BLASLONG, float *, BLASLONG);
BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
float (*snrm2_k) (BLASLONG, float *, BLASLONG);
float (*sasum_k) (BLASLONG, float *, BLASLONG);
#endif
@@ -225,6 +260,22 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
#endif
#ifdef ARCH_ARM64
void (*sgemm_direct) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG , float *, BLASLONG , float * , BLASLONG);
int (*sgemm_direct_performant) (BLASLONG M, BLASLONG N, BLASLONG K);
void (*sgemm_direct_alpha_beta) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float * , BLASLONG);
void (*ssymm_direct_alpha_betaLU) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float * , BLASLONG);
void (*ssymm_direct_alpha_betaLL) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float * , BLASLONG);
void (*strmm_direct_LNUN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG);
void (*strmm_direct_LNLN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG);
void (*strmm_direct_LTUN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG);
void (*strmm_direct_LTLN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG);
void (*ssyrk_direct_alpha_betaUN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyrk_direct_alpha_betaUT) (BLASLONG, BLASLONG, float, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyrk_direct_alpha_betaLN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyrk_direct_alpha_betaLT) (BLASLONG, BLASLONG, float, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyr2k_direct_alpha_betaUN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyr2k_direct_alpha_betaUT) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyr2k_direct_alpha_betaLN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyr2k_direct_alpha_betaLT) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float *, BLASLONG);
#endif
@@ -316,10 +367,10 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
double (*damin_k) (BLASLONG, double *, BLASLONG);
double (*dmax_k) (BLASLONG, double *, BLASLONG);
double (*dmin_k) (BLASLONG, double *, BLASLONG);
BLASLONG (*idamax_k)(BLASLONG, double *, BLASLONG);
BLASLONG (*idamin_k)(BLASLONG, double *, BLASLONG);
BLASLONG (*idmax_k) (BLASLONG, double *, BLASLONG);
BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
BLASLONG (*idamax_k)(BLASLONG, double *, BLASLONG);
BLASLONG (*idamin_k)(BLASLONG, double *, BLASLONG);
BLASLONG (*idmax_k) (BLASLONG, double *, BLASLONG);
BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
double (*dnrm2_k) (BLASLONG, double *, BLASLONG);
double (*dasum_k) (BLASLONG, double *, BLASLONG);
@@ -435,10 +486,10 @@ BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
xdouble (*qamin_k) (BLASLONG, xdouble *, BLASLONG);
xdouble (*qmax_k) (BLASLONG, xdouble *, BLASLONG);
xdouble (*qmin_k) (BLASLONG, xdouble *, BLASLONG);
BLASLONG (*iqamax_k)(BLASLONG, xdouble *, BLASLONG);
BLASLONG (*iqamin_k)(BLASLONG, xdouble *, BLASLONG);
BLASLONG (*iqmax_k) (BLASLONG, xdouble *, BLASLONG);
BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
BLASLONG (*iqamax_k)(BLASLONG, xdouble *, BLASLONG);
BLASLONG (*iqamin_k)(BLASLONG, xdouble *, BLASLONG);
BLASLONG (*iqmax_k) (BLASLONG, xdouble *, BLASLONG);
BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
xdouble (*qnrm2_k) (BLASLONG, xdouble *, BLASLONG);
xdouble (*qasum_k) (BLASLONG, xdouble *, BLASLONG);
@@ -528,8 +579,8 @@ BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
float (*camax_k) (BLASLONG, float *, BLASLONG);
float (*camin_k) (BLASLONG, float *, BLASLONG);
BLASLONG (*icamax_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*icamax_k)(BLASLONG, float *, BLASLONG);
BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
float (*cnrm2_k) (BLASLONG, float *, BLASLONG);
float (*casum_k) (BLASLONG, float *, BLASLONG);
@@ -739,8 +790,8 @@ BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
double (*zamax_k) (BLASLONG, double *, BLASLONG);
double (*zamin_k) (BLASLONG, double *, BLASLONG);
BLASLONG (*izamax_k)(BLASLONG, double *, BLASLONG);
BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
BLASLONG (*izamax_k)(BLASLONG, double *, BLASLONG);
BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
double (*znrm2_k) (BLASLONG, double *, BLASLONG);
double (*zasum_k) (BLASLONG, double *, BLASLONG);
@@ -950,8 +1001,8 @@ BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
xdouble (*xamax_k) (BLASLONG, xdouble *, BLASLONG);
xdouble (*xamin_k) (BLASLONG, xdouble *, BLASLONG);
BLASLONG (*ixamax_k)(BLASLONG, xdouble *, BLASLONG);
BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
BLASLONG (*ixamax_k)(BLASLONG, xdouble *, BLASLONG);
BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
xdouble (*xnrm2_k) (BLASLONG, xdouble *, BLASLONG);
xdouble (*xasum_k) (BLASLONG, xdouble *, BLASLONG);
@@ -1229,7 +1280,23 @@ extern gotoblas_t *gotoblas;
#define HAVE_EX_L2 gotoblas -> exclusive_cache
#if (BUILD_HFLOAT16==1)
#define SHGEMM_P gotoblas -> shgemm_p
#define SHGEMM_Q gotoblas -> shgemm_q
#define SHGEMM_R gotoblas -> shgemm_r
#define SHGEMM_UNROLL_M gotoblas -> shgemm_unroll_m
#define SHGEMM_UNROLL_N gotoblas -> shgemm_unroll_n
#define SHGEMM_UNROLL_MN gotoblas -> shgemm_unroll_mn
#endif
#if (BUILD_BFLOAT16==1)
#define BGEMM_P gotoblas -> bgemm_p
#define BGEMM_Q gotoblas -> bgemm_q
#define BGEMM_R gotoblas -> bgemm_r
#define BGEMM_UNROLL_M gotoblas -> bgemm_unroll_m
#define BGEMM_UNROLL_N gotoblas -> bgemm_unroll_n
#define BGEMM_UNROLL_MN gotoblas -> bgemm_unroll_mn
#define SBGEMM_P gotoblas -> sbgemm_p
#define SBGEMM_Q gotoblas -> sbgemm_q
#define SBGEMM_R gotoblas -> sbgemm_r
@@ -1357,7 +1424,31 @@ extern gotoblas_t *gotoblas;
#define HAVE_EX_L2 0
#endif
#if (BUILD_HFLOAT16 == 1)
#define SHGEMM_P SHGEMM_DEFAULT_P
#define SHGEMM_Q SHGEMM_DEFAULT_Q
#define SHGEMM_R SHGEMM_DEFAULT_R
#define SHGEMM_UNROLL_M SHGEMM_DEFAULT_UNROLL_M
#define SHGEMM_UNROLL_N SHGEMM_DEFAULT_UNROLL_N
#ifdef SHGEMM_DEFAULT_UNROLL_MN
#define SHGEMM_UNROLL_MN SHGEMM_DEFAULT_UNROLL_MN
#else
#define SHGEMM_UNROLL_MN MAX((SHGEMM_UNROLL_M), (SHGEMM_UNROLL_N))
#endif
#endif
#if (BUILD_BFLOAT16 == 1)
#define BGEMM_P BGEMM_DEFAULT_P
#define BGEMM_Q BGEMM_DEFAULT_Q
#define BGEMM_R BGEMM_DEFAULT_R
#define BGEMM_UNROLL_M BGEMM_DEFAULT_UNROLL_M
#define BGEMM_UNROLL_N BGEMM_DEFAULT_UNROLL_N
#ifdef BGEMM_DEFAULT_UNROLL_MN
#define BGEMM_UNROLL_MN BGEMM_DEFAULT_UNROLL_MN
#else
#define BGEMM_UNROLL_MN MAX((BGEMM_UNROLL_M), (BGEMM_UNROLL_N))
#endif
#define SBGEMM_P SBGEMM_DEFAULT_P
#define SBGEMM_Q SBGEMM_DEFAULT_Q
#define SBGEMM_R SBGEMM_DEFAULT_R
@@ -1478,6 +1569,7 @@ extern gotoblas_t *gotoblas;
#endif
#endif
#ifndef COMPLEX
@@ -1505,6 +1597,30 @@ extern gotoblas_t *gotoblas;
#define GEMM_DEFAULT_R DGEMM_DEFAULT_R
#define GEMM_DEFAULT_UNROLL_M DGEMM_DEFAULT_UNROLL_M
#define GEMM_DEFAULT_UNROLL_N DGEMM_DEFAULT_UNROLL_N
#elif defined(HFLOAT16)
#define GEMM_P SHGEMM_P
#define GEMM_Q SHGEMM_Q
#define GEMM_R SHGEMM_R
#define GEMM_UNROLL_M SHGEMM_UNROLL_M
#define GEMM_UNROLL_N SHGEMM_UNROLL_N
#define GEMM_UNROLL_MN SHGEMM_UNROLL_MN
#define GEMM_DEFAULT_P SHGEMM_DEFAULT_P
#define GEMM_DEFAULT_Q SHGEMM_DEFAULT_Q
#define GEMM_DEFAULT_R SHGEMM_DEFAULT_R
#define GEMM_DEFAULT_UNROLL_M SHGEMM_DEFAULT_UNROLL_M
#define GEMM_DEFAULT_UNROLL_N SHGEMM_DEFAULT_UNROLL_N
#elif defined(BFLOAT16) && defined(BGEMM)
#define GEMM_P BGEMM_P
#define GEMM_Q BGEMM_Q
#define GEMM_R BGEMM_R
#define GEMM_UNROLL_M BGEMM_UNROLL_M
#define GEMM_UNROLL_N BGEMM_UNROLL_N
#define GEMM_UNROLL_MN BGEMM_UNROLL_MN
#define GEMM_DEFAULT_P BGEMM_DEFAULT_P
#define GEMM_DEFAULT_Q BGEMM_DEFAULT_Q
#define GEMM_DEFAULT_R BGEMM_DEFAULT_R
#define GEMM_DEFAULT_UNROLL_M BGEMM_DEFAULT_UNROLL_M
#define GEMM_DEFAULT_UNROLL_N BGEMM_DEFAULT_UNROLL_N
#elif defined(BFLOAT16)
#define GEMM_P SBGEMM_P
#define GEMM_Q SBGEMM_Q
+31 -1
View File
@@ -49,6 +49,21 @@
#define SGEMM_DIRECT_PERFORMANT sgemm_direct_performant
#define SGEMM_DIRECT sgemm_direct
#define SGEMM_DIRECT_ALPHA_BETA sgemm_direct_alpha_beta
#define SSYMM_DIRECT_ALPHA_BETA_LU ssymm_direct_alpha_betaLU
#define SSYMM_DIRECT_ALPHA_BETA_LL ssymm_direct_alpha_betaLL
#define STRMM_DIRECT_LNUN strmm_direct_LNUN
#define STRMM_DIRECT_LNLN strmm_direct_LNLN
#define STRMM_DIRECT_LTUN strmm_direct_LTUN
#define STRMM_DIRECT_LTLN strmm_direct_LTLN
#define SSYRK_DIRECT_ALPHA_BETA_UN ssyrk_direct_alpha_betaUN
#define SSYRK_DIRECT_ALPHA_BETA_UT ssyrk_direct_alpha_betaUT
#define SSYRK_DIRECT_ALPHA_BETA_LN ssyrk_direct_alpha_betaLN
#define SSYRK_DIRECT_ALPHA_BETA_LT ssyrk_direct_alpha_betaLT
#define SSYR2K_DIRECT_ALPHA_BETA_UN ssyr2k_direct_alpha_betaUN
#define SSYR2K_DIRECT_ALPHA_BETA_UT ssyr2k_direct_alpha_betaUT
#define SSYR2K_DIRECT_ALPHA_BETA_LN ssyr2k_direct_alpha_betaLN
#define SSYR2K_DIRECT_ALPHA_BETA_LT ssyr2k_direct_alpha_betaLT
#define SGEMM_ONCOPY sgemm_oncopy
#define SGEMM_OTCOPY sgemm_otcopy
@@ -216,8 +231,23 @@
#define SGEMM_DIRECT_PERFORMANT gotoblas -> sgemm_direct_performant
#define SGEMM_DIRECT gotoblas -> sgemm_direct
#elif ARCH_ARM64
#define SGEMM_DIRECT_PERFORMANT sgemm_direct_performant
#define SGEMM_DIRECT_PERFORMANT gotoblas -> sgemm_direct_performant
#define SGEMM_DIRECT gotoblas -> sgemm_direct
#define SGEMM_DIRECT_ALPHA_BETA gotoblas -> sgemm_direct_alpha_beta
#define SSYMM_DIRECT_ALPHA_BETA_LU gotoblas -> ssymm_direct_alpha_betaLU
#define SSYMM_DIRECT_ALPHA_BETA_LL gotoblas -> ssymm_direct_alpha_betaLL
#define STRMM_DIRECT_LNUN gotoblas -> strmm_direct_LNUN
#define STRMM_DIRECT_LNLN gotoblas -> strmm_direct_LNLN
#define STRMM_DIRECT_LTUN gotoblas -> strmm_direct_LTUN
#define STRMM_DIRECT_LTLN gotoblas -> strmm_direct_LTLN
#define SSYRK_DIRECT_ALPHA_BETA_UN gotoblas -> ssyrk_direct_alpha_betaUN
#define SSYRK_DIRECT_ALPHA_BETA_UT gotoblas -> ssyrk_direct_alpha_betaUT
#define SSYRK_DIRECT_ALPHA_BETA_LN gotoblas -> ssyrk_direct_alpha_betaLN
#define SSYRK_DIRECT_ALPHA_BETA_LT gotoblas -> ssyrk_direct_alpha_betaLT
#define SSYR2K_DIRECT_ALPHA_BETA_UN gotoblas -> ssyr2k_direct_alpha_betaUN
#define SSYR2K_DIRECT_ALPHA_BETA_UT gotoblas -> ssyr2k_direct_alpha_betaUT
#define SSYR2K_DIRECT_ALPHA_BETA_LN gotoblas -> ssyr2k_direct_alpha_betaLN
#define SSYR2K_DIRECT_ALPHA_BETA_LT gotoblas -> ssyr2k_direct_alpha_betaLT
#endif
#define SGEMM_ONCOPY gotoblas -> sgemm_oncopy
+107
View File
@@ -0,0 +1,107 @@
/***************************************************************************
* Copyright (c) 2025, The OpenBLAS Project
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name of the OpenBLAS project nor the names of
* its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *****************************************************************************/
#ifndef COMMON_SH_H
#define COMMON_SH_H
#ifndef DYNAMIC_ARCH
#define SHGEMM_ONCOPY shgemm_oncopy
#define SHGEMM_OTCOPY shgemm_otcopy
#if SGEMM_DEFAULT_UNROLL_M == SGEMM_DEFAULT_UNROLL_N
#define SHGEMM_INCOPY shgemm_oncopy
#define SHGEMM_ITCOPY shgemm_otcopy
#else
#define SHGEMM_INCOPY shgemm_incopy
#define SHGEMM_ITCOPY shgemm_itcopy
#endif
#define SHGEMM_BETA shgemm_beta
#define SHGEMM_KERNEL shgemm_kernel
#define SHGEMV_N_K shgemv_n
#define SHGEMV_T_K shgemv_t
#else // #DYNAMIC_ARCH
#define SHGEMM_ONCOPY gotoblas -> shgemm_oncopy
#define SHGEMM_OTCOPY gotoblas -> shgemm_otcopy
#if SGEMM_DEFAULT_UNROLL_M == SGEMM_DEFAULT_UNROLL_N
#define SHGEMM_INCOPY gotoblas -> shgemm_oncopy
#define SHGEMM_ITCOPY gotoblas -> shgemm_otcopy
#else
#define SHGEMM_INCOPY gotoblas -> shgemm_incopy
#define SHGEMM_ITCOPY gotoblas -> shgemm_itcopy
#endif
#define SHGEMM_BETA gotoblas -> shgemm_beta
#define SHGEMM_KERNEL gotoblas -> shgemm_kernel
#define SHGEMV_N_K gotoblas->shgemv_n
#define SHGEMV_T_K gotoblas->shgemv_t
#endif // #DYNAMIC_ARCH
#define SHGEMM_NN shgemm_nn
#define SHGEMM_CN shgemm_tn
#define SHGEMM_TN shgemm_tn
#define SHGEMM_NC shgemm_nt
#define SHGEMM_NT shgemm_nt
#define SHGEMM_CC shgemm_tt
#define SHGEMM_CT shgemm_tt
#define SHGEMM_TC shgemm_tt
#define SHGEMM_TT shgemm_tt
#define SHGEMM_NR shgemm_nn
#define SHGEMM_TR shgemm_tn
#define SHGEMM_CR shgemm_tn
#define SHGEMM_RN shgemm_nn
#define SHGEMM_RT shgemm_nt
#define SHGEMM_RC shgemm_nt
#define SHGEMM_RR shgemm_nn
#define SHGEMM_THREAD_NN shgemm_thread_nn
#define SHGEMM_THREAD_CN shgemm_thread_tn
#define SHGEMM_THREAD_TN shgemm_thread_tn
#define SHGEMM_THREAD_NC shgemm_thread_nt
#define SHGEMM_THREAD_NT shgemm_thread_nt
#define SHGEMM_THREAD_CC shgemm_thread_tt
#define SHGEMM_THREAD_CT shgemm_thread_tt
#define SHGEMM_THREAD_TC shgemm_thread_tt
#define SHGEMM_THREAD_TT shgemm_thread_tt
#define SHGEMM_THREAD_NR shgemm_thread_nn
#define SHGEMM_THREAD_TR shgemm_thread_tn
#define SHGEMM_THREAD_CR shgemm_thread_tn
#define SHGEMM_THREAD_RN shgemm_thread_nn
#define SHGEMM_THREAD_RT shgemm_thread_nt
#define SHGEMM_THREAD_RC shgemm_thread_nt
#define SHGEMM_THREAD_RR shgemm_thread_nn
#endif // #COMMON_SH_H
+91
View File
@@ -0,0 +1,91 @@
/*****************************************************************************
Copyright (c) 2011-2014, The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the OpenBLAS project nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************/
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* 1. Redistributions of source code must retain the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer. */
/* */
/* 2. Redistributions in binary form must reproduce the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer in the documentation and/or other materials */
/* provided with the distribution. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
/* */
/* The views and conclusions contained in the software and */
/* documentation are those of the authors and should not be */
/* interpreted as representing official policies, either expressed */
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#ifndef COMMON_WASM
#define COMMON_WASM
#define MB __sync_synchronize()
#define WMB __sync_synchronize()
#define RMB __sync_synchronize()
#ifndef ASSEMBLER
static inline int blas_quickdivide(blasint x, blasint y){
return x / y;
}
#endif
#define BUFFER_SIZE ( 16 << 20)
#define SEEK_ADDRESS
#endif
+4
View File
@@ -66,5 +66,9 @@ _cpuid:
#endif
#if defined(__ELF__) && defined(__linux__)
#if defined(__arm__)
.section .note.GNU-stack,"",%progbits
#else
.section .note.GNU-stack,"",@progbits
#endif
#endif
+81 -7
View File
@@ -79,8 +79,10 @@ size_t length64=sizeof(value64);
#define CPU_TSV110 9
// Ampere
#define CPU_EMAG8180 10
#define CPU_AMPERE1 25
// Apple
#define CPU_VORTEX 13
#define CPU_VORTEXM4 26
// Fujitsu
#define CPU_A64FX 15
// Phytium
@@ -111,7 +113,9 @@ static char *cpuname[] = {
"CORTEXA710",
"FT2000",
"CORTEXA76",
"NEOVERSEV2"
"NEOVERSEV2",
"AMPERE1",
"VORTEXM4",
};
static char *cpuname_lower[] = {
@@ -139,13 +143,17 @@ static char *cpuname_lower[] = {
"cortexa710",
"ft2000",
"cortexa76",
"neoversev2"
"neoversev2",
"ampere1",
"vortexm4"
};
static int cpulowperf=0;
static int cpumidperf=0;
static int cpuhiperf=0;
int aliased = 0;
int get_feature(char *search)
{
@@ -276,11 +284,11 @@ int detect(void)
fclose(infile);
}
}
sprintf(cpuimpl,"0x%2x",implementer);
sprintf(cpuimpl,"0x%02x",implementer);
cpu_implementer=strdup(cpuimpl);
}
qsort(cpucores,1024,sizeof(int),cpusort);
sprintf(cpupart,"0x%3x",cpucores[0]);
sprintf(cpupart,"0x%03x",cpucores[0]);
cpu_part=strdup(cpupart);
if(cpu_part != NULL && cpu_implementer != NULL) {
// Arm
@@ -315,6 +323,8 @@ int detect(void)
return CPU_CORTEXX2;
else if (strstr(cpu_part, "0xd4f")) //NVIDIA Grace et al.
return CPU_NEOVERSEV2;
else if (strstr(cpu_part, "0xd87") || strstr(cpu_part, "0xd85") || strstr(cpu_part, "0xd83")) // X925/A725
return CPU_NEOVERSEV2;
else if (strstr(cpu_part, "0xd0b"))
return CPU_CORTEXA76;
}
@@ -334,11 +344,15 @@ int detect(void)
// Ampere
else if (strstr(cpu_implementer, "0x50") && strstr(cpu_part, "0x000"))
return CPU_EMAG8180;
else if (strstr(cpu_implementer, "0xc0")) {
if (strstr(cpu_part, "0xac3") || strstr(cpu_part, "0xac4"))
return CPU_AMPERE1;
}
// Fujitsu
else if (strstr(cpu_implementer, "0x46") && strstr(cpu_part, "0x001"))
return CPU_A64FX;
// Apple
else if (strstr(cpu_implementer, "0x61") && strstr(cpu_part, "0x022"))
else if (strstr(cpu_implementer, "0x61") /* && strstr(cpu_part, "0x022")*/)
return CPU_VORTEX;
// Phytium
else if (strstr(cpu_implementer, "0x70") && (strstr(cpu_part, "0x660") || strstr(cpu_part, "0x661")
@@ -392,7 +406,8 @@ int detect(void)
if (value64 ==131287967|| value64 == 458787763 ) return CPU_VORTEX; //A12/M1
if (value64 == 3660830781) return CPU_VORTEX; //A15/M2
if (value64 == 2271604202) return CPU_VORTEX; //A16/M3
if (value64 == 1867590060) return CPU_VORTEX; //M4
if (value64 == 1867590060) return CPU_VORTEXM4; //M4
if (value64 == 492472296) return CPU_VORTEXM4; //M5
#else
#ifdef OS_WINDOWS
HKEY reghandle;
@@ -410,7 +425,10 @@ int detect(void)
if (errcode != ERROR_SUCCESS) wprintf(L"Error reading cpuname from registry:%x\n",errcode);
//wprintf(stderr,L"%s\n",(PWSTR)valstring);
RegCloseKey(reghandle);
if (strstr(valstring, "Snapdragon(R) X Elite")) return CPU_NEOVERSEN1;
if (strstr(valstring, "Snapdragon(R) X Elite")) {
aliased = 1;
return CPU_NEOVERSEN1;
}
if (strstr(valstring, "Ampere(R) Altra")) return CPU_NEOVERSEN1;
if (strstr(valstring, "Snapdragon (TM) 8cx Gen 3")) return CPU_CORTEXX1;
if (strstr(valstring, "Snapdragon Compute Platform")) return CPU_CORTEXX1;
@@ -533,6 +551,7 @@ void get_cpuconfig(void)
break;
case CPU_NEOVERSEN1:
printf("#define %s\n", cpuname[d]);
if (aliased == 0) {
printf("#define L1_CODE_SIZE 65536\n");
printf("#define L1_CODE_LINESIZE 64\n");
printf("#define L1_CODE_ASSOCIATIVE 4\n");
@@ -544,6 +563,23 @@ void get_cpuconfig(void)
printf("#define L2_ASSOCIATIVE 8\n");
printf("#define DTB_DEFAULT_ENTRIES 48\n");
printf("#define DTB_SIZE 4096\n");
} else {
printf("#define L1_CODE_SIZE 196608\n");
printf("#define L1_CODE_LINESIZE 64\n");
printf("#define L1_CODE_ASSOCIATIVE 6\n");
printf("#define L1_DATA_SIZE 98304\n");
printf("#define L1_DATA_LINESIZE 64\n");
printf("#define L1_DATA_ASSOCIATIVE 6\n");
printf("#define L2_SIZE 12582912\n");
printf("#define L2_LINESIZE 32\n");
printf("#define L2_ASSOCIATIVE 12\n");
printf("#define ITB_SIZE 4096\n");
printf("#define ITB_ASSOCIATIVE 8\n");
printf("#define ITB_DEFAULT_ENTRIES 256\n");
printf("#define DTB_DEFAULT_ENTRIES 224\n");
printf("#define DTB_ASSOCIATIVE 7\n");
printf("#define DTB_SIZE 4096\n");
}
break;
case CPU_NEOVERSEV1:
@@ -684,6 +720,21 @@ void get_cpuconfig(void)
printf("#define DTB_SIZE 4096\n");
break;
case CPU_AMPERE1:
printf("#define %s\n", cpuname[d]);
printf("#define L1_CODE_SIZE 16384\n");
printf("#define L1_CODE_LINESIZE 64\n");
printf("#define L1_CODE_ASSOCIATIVE 4\n");
printf("#define L1_DATA_SIZE 65536\n");
printf("#define L1_DATA_LINESIZE 64\n");
printf("#define L1_DATA_ASSOCIATIVE 4\n");
printf("#define L2_SIZE 2097152\n");
printf("#define L2_LINESIZE 64\n");
printf("#define L2_ASSOCIATIVE 8\n");
printf("#define DTB_DEFAULT_ENTRIES 64\n");
printf("#define DTB_SIZE 4096\n");
break;
case CPU_THUNDERX3T110:
printf("#define THUNDERX3T110 \n");
printf("#define L1_CODE_SIZE 65536 \n");
@@ -703,6 +754,29 @@ void get_cpuconfig(void)
break;
case CPU_VORTEX:
printf("#define VORTEX \n");
#ifdef __APPLE__
length64 = sizeof(value64);
sysctlbyname("hw.l1icachesize",&value64,&length64,NULL,0);
printf("#define L1_CODE_SIZE %lld \n",value64);
length64 = sizeof(value64);
sysctlbyname("hw.cachelinesize",&value64,&length64,NULL,0);
printf("#define L1_CODE_LINESIZE %lld \n",value64);
printf("#define L1_DATA_LINESIZE %lld \n",value64);
length64 = sizeof(value64);
sysctlbyname("hw.l1dcachesize",&value64,&length64,NULL,0);
printf("#define L1_DATA_SIZE %lld \n",value64);
length64 = sizeof(value64);
sysctlbyname("hw.l2cachesize",&value64,&length64,NULL,0);
printf("#define L2_SIZE %lld \n",value64);
#endif
printf("#define DTB_DEFAULT_ENTRIES 64 \n");
printf("#define DTB_SIZE 4096 \n");
break;
case CPU_VORTEXM4:
printf("#define VORTEXM4 \n");
#ifdef __clang__
printf("#define HAVE_SME 1 \n");
#endif
#ifdef __APPLE__
length64 = sizeof(value64);
sysctlbyname("hw.l1icachesize",&value64,&length64,NULL,0);
+40 -41
View File
@@ -1,5 +1,5 @@
/*****************************************************************************
Copyright (c) 2011-2014, The OpenBLAS Project
Copyright (c) 2011-2026, The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -13,9 +13,9 @@ met:
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the OpenBLAS project nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
3. Neither the name of the OpenBLAS project nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
@@ -109,7 +109,7 @@ int detect(void){
return CPU_1004K;
} else if (strstr(p, " 24K")) {
return CPU_24K;
} else
} else
return CPU_UNKNOWN;
}
#endif
@@ -136,6 +136,40 @@ void get_subdirname(void){
printf("mips");
}
int get_feature(char *search) {
#ifdef __linux
FILE *infile;
char buffer[2048], *p, *t;
p = (char *)NULL;
infile = fopen("/proc/cpuinfo", "r");
while (fgets(buffer, sizeof(buffer), infile)) {
if (!strncmp("Features", buffer, 8) ||
!strncmp("ASEs implemented", buffer, 16)) {
p = strchr(buffer, ':') + 2;
break;
}
}
fclose(infile);
if (p == NULL)
return 0;
t = strtok(p, " ");
while (t = strtok(NULL, " ")) {
if (strstr(t, search)) {
return (1);
}
}
#endif
return (0);
}
void get_cpuconfig(void){
if(detect()==CPU_P5600){
printf("#define P5600\n");
@@ -165,7 +199,7 @@ void get_cpuconfig(void){
}else{
printf("#define UNKNOWN\n");
}
#ifndef NO_MSA
#ifndef NO_MSA
if (get_feature("msa")) printf("#define HAVE_MSA\n");
#endif
}
@@ -181,38 +215,3 @@ void get_libname(void){
printf("mips\n");
}
}
int get_feature(char *search)
{
#ifdef __linux
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;
infile = fopen("/proc/cpuinfo", "r");
while (fgets(buffer, sizeof(buffer), infile))
{
if (!strncmp("Features", buffer, 8) || !strncmp("ASEs implemented", buffer, 16))
{
p = strchr(buffer, ':') + 2;
break;
}
}
fclose(infile);
if( p == NULL ) return 0;
t = strtok(p," ");
while( t = strtok(NULL," "))
{
if (strstr(t, search)) { return(1); }
}
#endif
return(0);
}
+39 -40
View File
@@ -1,5 +1,5 @@
/*****************************************************************************
Copyright (c) 2011-2014, The OpenBLAS Project
Copyright (c) 2011-2026, The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -13,9 +13,9 @@ met:
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the OpenBLAS project nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
3. Neither the name of the OpenBLAS project nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
@@ -145,13 +145,47 @@ void get_subarchitecture(void){
printf("SICORTEX");
}else{
printf("MIPS64_GENERIC");
}
}
}
void get_subdirname(void){
printf("mips64");
}
int get_feature(char *search) {
#ifdef __linux
FILE *infile;
char buffer[2048], *p, *t;
p = (char *)NULL;
infile = fopen("/proc/cpuinfo", "r");
while (fgets(buffer, sizeof(buffer), infile)) {
if (!strncmp("Features", buffer, 8) ||
!strncmp("ASEs implemented", buffer, 16)) {
p = strchr(buffer, ':') + 2;
break;
}
}
fclose(infile);
if (p == NULL)
return 0;
t = strtok(p, " ");
while (t = strtok(NULL, " ")) {
if (strstr(t, search)) {
return (1);
}
}
#endif
return (0);
}
void get_cpuconfig(void){
if(detect()==CPU_LOONGSON3R3) {
printf("#define LOONGSON3R3\n");
@@ -228,38 +262,3 @@ void get_libname(void){
printf("mips64_generic\n");
}
}
int get_feature(char *search)
{
#ifdef __linux
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;
infile = fopen("/proc/cpuinfo", "r");
while (fgets(buffer, sizeof(buffer), infile))
{
if (!strncmp("Features", buffer, 8) || !strncmp("ASEs implemented", buffer, 16))
{
p = strchr(buffer, ':') + 2;
break;
}
}
fclose(infile);
if( p == NULL ) return 0;
t = strtok(p," ");
while( t = strtok(NULL," "))
{
if (strstr(t, search)) { return(1); }
}
#endif
return(0);
}
+4
View File
@@ -131,6 +131,7 @@ int detect(void){
if (!strncasecmp(p, "POWER8", 6)) return CPUTYPE_POWER8;
if (!strncasecmp(p, "POWER9", 6)) return CPUTYPE_POWER9;
if (!strncasecmp(p, "POWER10", 7)) return CPUTYPE_POWER10;
if (!strncasecmp(p, "POWER11", 7)) return CPUTYPE_POWER10;
if (!strncasecmp(p, "Cell", 4)) return CPUTYPE_CELL;
if (!strncasecmp(p, "7447", 4)) return CPUTYPE_PPCG4;
@@ -171,6 +172,9 @@ int detect(void){
int id;
__asm __volatile("mfpvr %0" : "=r"(id));
switch ( id >> 16 ) {
case 0x82: // POWER11
return CPUTYPE_POWER10;
break;
case 0x80: // POWER10
return CPUTYPE_POWER10;
break;
+1694 -1753
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -178,7 +178,10 @@ ARCH_CSKY
#endif
#if defined(__EMSCRIPTEN__)
ARCH_RISCV64
ARCH_WASM
OS_WINDOWS
#endif
#if defined(TARGET_OS_IPHONE)
OS_IOS
#endif
+1 -1
View File
@@ -6,7 +6,7 @@ enable_language(Fortran)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DADD${BU} -DCBLAS")
if (BINARY32 AND CMAKE_C_PLATFORM_ID MATCHES "MinGW" AND CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL 14.2)
if (BINARY32 AND CMAKE_C_PLATFORM_ID MATCHES "MinGW" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 14.1)
list(REMOVE_ITEM ${CMAKE_Fortran_FLAGS} -O3 -O2 -O1 -Os)
set (CMAKE_Fortran_FLAGS_RELEASE "" CACHE STRING "" FORCE)
endif()
+8 -15
View File
@@ -23,17 +23,10 @@ typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
@@ -440,12 +433,12 @@ static real c_b43 = (float)1.;
extern /* Subroutine */ int ctest_(integer*, complex*, complex*, complex*, real*);
static complex mwpcs[5], mwpct[5];
extern /* Subroutine */ int itest1_(integer*, integer*), stest1_(real*,real*,real*,real*);
extern /* Subroutine */ int cscaltest_(integer*, complex*, complex*, integer*);
extern /* Subroutine */ void cscaltest_(integer*, complex*, complex*, integer*);
static complex cx[8];
extern real scnrm2test_(integer*, complex*, integer*);
static integer np1;
extern integer icamaxtest_(integer*, complex*, integer*);
extern /* Subroutine */ int csscaltest_(integer*, real*, complex*, integer*);
extern /* Subroutine */ void csscaltest_(integer*, real*, complex*, integer*);
extern real scasumtest_(integer*, complex*, integer*);
static integer len;
@@ -468,7 +461,7 @@ static real c_b43 = (float)1.;
i__1 = len;
for (i__ = 1; i__ <= i__1; ++i__) {
i__2 = i__ - 1;
i__3 = i__ + (np1 + combla_1.incx * 5 << 3) - 49;
i__3 = i__ + ((np1 + combla_1.incx * 5) << 3) - 49;
cx[i__2].r = cv[i__3].r, cx[i__2].i = cv[i__3].i;
/* L20: */
}
@@ -483,13 +476,13 @@ static real c_b43 = (float)1.;
} else if (combla_1.icase == 8) {
/* .. CSCAL .. */
cscaltest_(&combla_1.n, &ca, cx, &combla_1.incx);
ctest_(&len, cx, &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48],
&ctrue5[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
ctest_(&len, cx, &ctrue5[((np1 + combla_1.incx * 5) << 3) - 48],
&ctrue5[((np1 + combla_1.incx * 5) << 3) - 48], sfac);
} else if (combla_1.icase == 9) {
/* .. CSSCALTEST .. */
csscaltest_(&combla_1.n, &sa, cx, &combla_1.incx);
ctest_(&len, cx, &ctrue6[(np1 + combla_1.incx * 5 << 3) - 48],
&ctrue6[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
ctest_(&len, cx, &ctrue6[((np1 + combla_1.incx * 5) << 3) - 48],
&ctrue6[((np1 + combla_1.incx * 5) << 3) - 48], sfac);
} else if (combla_1.icase == 10) {
/* .. ICAMAXTEST .. */
i__1 = icamaxtest_(&combla_1.n, cx, &combla_1.incx);
@@ -737,7 +730,7 @@ static real c_b43 = (float)1.;
static complex ctemp;
extern /* Subroutine */ int ctest_(integer*, complex*, complex*, complex*, real*);
static integer ksize;
extern /* Subroutine */ int cdotctest_(integer*, complex*, integer*, complex*, integer*,complex*), ccopytest_(integer*, complex*, integer*, complex*, integer*), cdotutest_(integer*, complex*, integer*, complex*, integer*, complex*),
extern /* Subroutine */ void cdotctest_(integer*, complex*, integer*, complex*, integer*,complex*), ccopytest_(integer*, complex*, integer*, complex*, integer*), cdotutest_(integer*, complex*, integer*, complex*, integer*, complex*),
cswaptest_(integer*, complex*, integer*, complex*, integer*), caxpytest_(integer*, complex*, complex*, integer*, complex*, integer*);
static integer ki, kn;
static complex cx[7], cy[7];
+32 -46
View File
@@ -23,17 +23,12 @@ typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
@@ -319,7 +314,7 @@ static logical c_false = FALSE_;
static char snamet[12];
static real thresh;
static logical rorder;
extern /* Subroutine */ void cc2chke_(char*, ftnlen);
extern /* Subroutine */ void cc2chke_(char*);
static integer layout;
static logical ltestt, tsterr;
static complex alf[7];
@@ -712,7 +707,7 @@ L100:
ftnlen)12);
/* Test error exits. */
if (tsterr) {
cc2chke_(snames[isnum - 1], (ftnlen)12);
cc2chke_(snames[isnum - 1]);
}
/* Test computations. */
infoc_1.infot = 0;
@@ -892,8 +887,8 @@ L240:
static integer ia, ib, ic;
static logical banded;
static integer nc, nd, im, in, kl, ml, nk, nl, ku, ix, iy, ms, lx, ly, ns;
extern /* Subroutine */ int ccgbmv_(integer*, char*, integer*, integer*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, ftnlen);
extern /* Subroutine */ void ccgemv_(integer*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, ftnlen);
extern /* Subroutine */ void ccgbmv_(integer*, char*, integer*, integer*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*);
extern /* Subroutine */ void ccgemv_(integer*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*);
extern logical lceres_(char*, char*, integer*, integer*, complex*, complex*, integer*, ftnlen, ftnlen);
static char ctrans[14];
static real errmax;
@@ -1142,8 +1137,7 @@ L240:
}
ccgemv_(iorder, trans, &m, &n, &alpha,
&aa[1], &lda, &xx[1], &incx,
&beta, &yy[1], &incy, (ftnlen)
1);
&beta, &yy[1], &incy);
} else if (banded) {
if (*trace) {
/*
@@ -1158,8 +1152,7 @@ L240:
}
ccgbmv_(iorder, trans, &m, &n, &kl, &
ku, &alpha, &aa[1], &lda, &xx[
1], &incx, &beta, &yy[1], &
incy, (ftnlen)1);
1], &incx, &beta, &yy[1], &incy);
}
/* Check if error-exit was taken incorrectly. */
@@ -1347,10 +1340,10 @@ L140:
static integer nc, ik, in;
static logical packed;
static integer nk, ks, ix, iy, ns, lx, ly;
extern /* Subroutine */ void cchbmv_(integer*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, ftnlen);
extern /* Subroutine */ void cchemv_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, ftnlen);
extern /* Subroutine */ void cchbmv_(integer*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*);
extern /* Subroutine */ void cchemv_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*);
extern logical lceres_(char*, char*, integer*, integer*, complex*, complex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cchpmv_(integer*, char*, integer*, complex*, complex*, complex*, integer*, complex*, complex*, integer*, ftnlen);
extern /* Subroutine */ void cchpmv_(integer*, char*, integer*, complex*, complex*, complex*, integer*, complex*, complex*, integer*);
static real errmax;
static complex transl;
static integer laa, lda;
@@ -1566,7 +1559,7 @@ L140:
}
cchemv_(iorder, uplo, &n, &alpha, &aa[1],
&lda, &xx[1], &incx, &beta, &yy[1]
, &incy, (ftnlen)1);
, &incy);
} else if (banded) {
if (*trace) {
/*
@@ -1581,7 +1574,7 @@ L140:
}
cchbmv_(iorder, uplo, &n, &k, &alpha, &aa[
1], &lda, &xx[1], &incx, &beta, &
yy[1], &incy, (ftnlen)1);
yy[1], &incy);
} else if (packed) {
if (*trace) {
/*
@@ -1596,7 +1589,7 @@ L140:
}
cchpmv_(iorder, uplo, &n, &alpha, &aa[1],
&xx[1], &incx, &beta, &yy[1], &
incy, (ftnlen)1);
incy);
}
/* Check if error-exit was taken incorrectly. */
@@ -1792,15 +1785,15 @@ L130:
static logical packed;
static integer nk, ks, ix, ns, lx;
extern logical lceres_(char*, char*, integer*, integer*, complex*, complex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cctbmv_(integer*, char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cctbsv_(integer*, char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cctbmv_(integer*, char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*);
extern /* Subroutine */ void cctbsv_(integer*, char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*);
static char ctrans[14];
extern /* Subroutine */ void cctpmv_(integer*, char*, char*, char*, integer*, complex*, complex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cctpmv_(integer*, char*, char*, char*, integer*, complex*, complex*, integer*);
static real errmax;
extern /* Subroutine */ void cctrmv_(integer*, char*, char*, char*, integer*, complex*, integer*, complex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cctpsv_(integer*, char*, char*, char*, integer*, complex*, complex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cctrmv_(integer*, char*, char*, char*, integer*, complex*, integer*, complex*, integer*);
extern /* Subroutine */ void cctpsv_(integer*, char*, char*, char*, integer*, complex*, complex*, integer*);
static complex transl;
extern /* Subroutine */ void cctrsv_(integer*, char*, char*, char*, integer*, complex*, integer*, complex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cctrsv_(integer*, char*, char*, char*, integer*, complex*, integer*, complex*, integer*);
static char transs[1];
static integer laa, icd, lda;
extern logical lce_(complex*, complex*, integer*);
@@ -2010,8 +2003,7 @@ L130:
f_rew(&al__1);*/
}
cctrmv_(iorder, uplo, trans, diag, &n, &
aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
aa[1], &lda, &xx[1], &incx);
} else if (banded) {
if (*trace) {
/*
@@ -2025,8 +2017,7 @@ L130:
f_rew(&al__1);*/
}
cctbmv_(iorder, uplo, trans, diag, &n, &k,
&aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
&aa[1], &lda, &xx[1], &incx);
} else if (packed) {
if (*trace) {
/*
@@ -2040,8 +2031,7 @@ L130:
f_rew(&al__1);*/
}
cctpmv_(iorder, uplo, trans, diag, &n, &
aa[1], &xx[1], &incx, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
aa[1], &xx[1], &incx);
}
} else if (s_cmp(sname + 9, "sv", (ftnlen)2, (
ftnlen)2) == 0) {
@@ -2058,8 +2048,7 @@ L130:
f_rew(&al__1);*/
}
cctrsv_(iorder, uplo, trans, diag, &n, &
aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
aa[1], &lda, &xx[1], &incx);
} else if (banded) {
if (*trace) {
/*
@@ -2073,8 +2062,7 @@ L130:
f_rew(&al__1);*/
}
cctbsv_(iorder, uplo, trans, diag, &n, &k,
&aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
&aa[1], &lda, &xx[1], &incx);
} else if (packed) {
if (*trace) {
/*
@@ -2088,8 +2076,7 @@ L130:
f_rew(&al__1);*/
}
cctpsv_(iorder, uplo, trans, diag, &n, &
aa[1], &xx[1], &incx, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
aa[1], &xx[1], &incx);
}
}
@@ -2634,10 +2621,10 @@ L150:
static char uplo[1];
static integer i__, j, n;
extern /* Subroutine */ int cmake_(char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*, integer*, integer*, logical*, complex*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void ccher_(integer*, char*, integer*, real*, complex*, integer*, complex*, integer*, ftnlen);
extern /* Subroutine */ void ccher_(integer*, char*, integer*, real*, complex*, integer*, complex*, integer*);
static complex alpha, w[1];
static logical isame[13];
extern /* Subroutine */ void cchpr_(integer*, char*, integer*, real*, complex*, integer*, complex*, ftnlen);
extern /* Subroutine */ void cchpr_(integer*, char*, integer*, real*, complex*, integer*, complex*);
extern /* Subroutine */ int cmvch_(char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, complex*, real*, complex*, real*, real*, logical*, integer*, logical*, ftnlen);
static integer nargs;
static logical reset;
@@ -2812,7 +2799,7 @@ L150:
f_rew(&al__1);*/
}
ccher_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[
1], &lda, (ftnlen)1);
1], &lda);
} else if (packed) {
if (*trace) {
/*
@@ -2825,8 +2812,7 @@ L150:
al__1.aunit = *ntra;
f_rew(&al__1);*/
}
cchpr_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[
1], (ftnlen)1);
cchpr_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[1]);
}
/* Check if error-exit was taken incorrectly. */
@@ -3005,8 +2991,8 @@ L130:
static integer incxs, incys;
static logical upper;
static char uplos[1];
extern /* Subroutine */ void ccher2_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, integer*, ftnlen);
extern /* Subroutine */ void cchpr2_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, ftnlen);
extern /* Subroutine */ void ccher2_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, integer*);
extern /* Subroutine */ void cchpr2_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*);
static integer ia, ja, ic, nc, jj, lj, in;
static logical packed;
static integer ix, iy, ns, lx, ly;
@@ -3202,7 +3188,7 @@ L130:
f_rew(&al__1);*/
}
ccher2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
yy[1], &incy, &aa[1], &lda, (ftnlen)1);
yy[1], &incy, &aa[1], &lda);
} else if (packed) {
if (*trace) {
/*
@@ -3216,7 +3202,7 @@ L130:
f_rew(&al__1);*/
}
cchpr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
yy[1], &incy, &aa[1], (ftnlen)1);
yy[1], &incy, &aa[1]);
}
/* Check if error-exit was taken incorrectly. */
+35 -40
View File
@@ -23,17 +23,12 @@ typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
@@ -284,10 +279,10 @@ int /* Main program */ main(void)
real r__1;
/* Local variables */
integer nalf, idim[9];
logical same;
integer nbet, ntra;
logical rewi;
static integer nalf, idim[9];
static logical same;
static integer nbet, ntra;
static logical rewi;
extern /* Subroutine */ int cchk1_(char *, real *, real *, integer *,
integer *, logical *, logical *, logical *, integer *, integer *,
integer *, complex *, integer *, complex *, integer *, complex *,
@@ -311,35 +306,35 @@ int /* Main program */ main(void)
integer *, complex *, integer *, complex *, integer *, complex *,
complex *, complex *, complex *, complex *, complex *, complex *,
complex *, complex *, real *, complex *, integer *);
complex c__[4225] /* was [65][65] */;
real g[65];
integer i__, j, n;
logical fatal;
complex w[130];
static complex c__[4225] /* was [65][65] */;
static real g[65];
static integer i__, j, n;
static logical fatal;
static complex w[130];
extern /* Subroutine */ int cmmch_(char *, char *, integer *, integer *,
integer *, complex *, complex *, integer *, complex *, integer *,
complex *, complex *, integer *, complex *, real *, complex *,
integer *, real *, real *, logical *, integer *, logical *);
extern real sdiff_(real *, real *);
logical trace;
integer nidim;
char snaps[32];
integer isnum;
logical ltest[9];
complex aa[4225], ab[8450] /* was [65][130] */, bb[4225], cc[4225], as[
static logical trace;
static integer nidim;
static char snaps[32];
static integer isnum;
static logical ltest[9];
static complex aa[4225], ab[8450] /* was [65][130] */, bb[4225], cc[4225], as[
4225], bs[4225], cs[4225], ct[65];
logical sfatal, corder;
char snamet[12], transa[1], transb[1];
real thresh;
logical rorder;
extern /* Subroutine */ int cc3chke_(char *);
integer layout;
logical ltestt, tsterr;
complex alf[7];
static logical sfatal, corder;
static char snamet[12], transa[1], transb[1];
static real thresh;
static logical rorder;
extern /* Subroutine */ void cc3chke_(char *);
static integer layout;
static logical ltestt, tsterr;
static complex alf[7];
extern logical lce_(complex *, complex *, integer *);
complex bet[7];
real eps, err;
char tmpchar;
static complex bet[7];
static real eps, err;
static char tmpchar;
/* Test program for the COMPLEX Level 3 Blas. */
@@ -856,7 +851,7 @@ L230:
*, char *, char *, integer *, integer *, integer *, complex *,
integer *, integer *, complex *, integer *);
integer ia, ib, ma, mb, na, nb, nc, ik, im, in;
extern /* Subroutine */ int ccgemm_(integer *, char *, char *, integer *,
extern /* Subroutine */ void ccgemm_(integer *, char *, char *, integer *,
integer *, integer *, complex *, complex *, integer *, complex *,
integer *, complex *, complex *, integer *);
integer ks, ms, ns;
@@ -1268,13 +1263,13 @@ L130:
*, char *, char *, integer *, integer *, complex *, integer *,
integer *, complex *, integer *);
integer ia, ib, na, nc, im, in;
extern /* Subroutine */ int cchemm_(integer *, char *, char *, integer *,
extern /* Subroutine */ void cchemm_(integer *, char *, char *, integer *,
integer *, complex *, complex *, integer *, complex *, integer *,
complex *, complex *, integer *);
integer ms, ns;
extern logical lceres_(char *, char *, integer *, integer *, complex *,
complex *, integer *);
extern /* Subroutine */ int ccsymm_(integer *, char *, char *, integer *,
extern /* Subroutine */ void ccsymm_(integer *, char *, char *, integer *,
integer *, complex *, complex *, integer *, complex *, integer *,
complex *, complex *, integer *);
real errmax;
@@ -1668,11 +1663,11 @@ L120:
integer ia, na, nc, im, in, ms, ns;
extern logical lceres_(char *, char *, integer *, integer *, complex *,
complex *, integer *);
extern /* Subroutine */ int cctrmm_(integer *, char *, char *, char *,
extern /* Subroutine */ void cctrmm_(integer *, char *, char *, char *,
char *, integer *, integer *, complex *, complex *, integer *,
complex *, integer *);
char tranas[1], transa[1];
extern /* Subroutine */ int cctrsm_(integer *, char *, char *, char *,
extern /* Subroutine */ void cctrsm_(integer *, char *, char *, char *,
char *, integer *, integer *, complex *, complex *, integer *,
complex *, integer *);
real errmax;
@@ -2143,7 +2138,7 @@ L160:
integer *, char *, integer *, char *, char *, integer *, integer *
, real *, integer *, real *, integer *);
integer ia, ib, jc, ma, na, nc, ik, in, jj, lj, ks;
extern /* Subroutine */ int ccherk_(integer *, char *, char *, integer *,
extern /* Subroutine */ void ccherk_(integer *, char *, char *, integer *,
integer *, real *, complex *, integer *, real *, complex *,
integer *);
integer ns;
@@ -2151,7 +2146,7 @@ L160:
extern logical lceres_(char *, char *, integer *, integer *, complex *,
complex *, integer *);
real errmax;
extern /* Subroutine */ int ccsyrk_(integer *, char *, char *, integer *,
extern /* Subroutine */ void ccsyrk_(integer *, char *, char *, integer *,
integer *, complex *, complex *, integer *, complex *, complex *,
integer *);
char transs[1], transt[1];
@@ -2643,12 +2638,12 @@ L130:
complex *, integer *);
real errmax;
char transs[1], transt[1];
extern /* Subroutine */ int ccher2k_(integer *, char *, char *, integer *,
extern /* Subroutine */ void ccher2k_(integer *, char *, char *, integer *,
integer *, complex *, complex *, integer *, complex *, integer *,
real *, complex *, integer *);
integer laa, lbb, lda, lcc, ldb, ldc;
extern logical lce_(complex *, complex *, integer *);
extern /* Subroutine */ int ccsyr2k_(integer *, char *, char *, integer *,
extern /* Subroutine */ void ccsyr2k_(integer *, char *, char *, integer *,
integer *, complex *, complex *, integer *, complex *, integer *,
complex *, complex *, integer *);
complex als;
+1 -1
View File
@@ -54,7 +54,7 @@ void F77_drot( const int *N, double *X, const int *incX, double *Y,
}
void F77_drotm(const int *N, double *X, const int *incX, double *Y,
const int *incY, const double *dparam)
const int *incY, double *dparam)
{
cblas_drotm(*N, X, *incX, Y, *incY, dparam);
return;
+13 -8
View File
@@ -332,7 +332,8 @@ static doublereal c_b34 = 1.;
/* Local variables */
static integer k;
extern /* Subroutine */ int drotgtest_(doublereal*,doublereal*,doublereal*,doublereal*), stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
extern /* Subroutine */ void drotgtest_(doublereal*,doublereal*,doublereal*,doublereal*);
extern int stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
static doublereal sa, sb, sc, ss;
/* .. Parameters .. */
@@ -404,7 +405,8 @@ L40:
static integer i__;
extern doublereal dnrm2test_(integer*, doublereal*, integer*);
static doublereal stemp[1], strue[8];
extern /* Subroutine */ int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*), dscaltest_(integer*,doublereal*,doublereal*,integer*);
extern /* Subroutine */ int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*);
extern void dscaltest_(integer*,doublereal*,doublereal*,integer*);
extern doublereal dasumtest_(integer*,doublereal*,integer*);
extern /* Subroutine */ int itest1_(integer*,integer*), stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
static doublereal sx[8];
@@ -430,7 +432,7 @@ L40:
/* .. Set vector arguments .. */
i__1 = len;
for (i__ = 1; i__ <= i__1; ++i__) {
sx[i__ - 1] = dv[i__ + (np1 + combla_1.incx * 5 << 3) - 49];
sx[i__ - 1] = dv[i__ + ((np1 + combla_1.incx * 5) << 3) - 49];
/* L20: */
}
@@ -450,7 +452,7 @@ L40:
, sx, &combla_1.incx);
i__1 = len;
for (i__ = 1; i__ <= i__1; ++i__) {
strue[i__ - 1] = dtrue5[i__ + (np1 + combla_1.incx * 5 <<
strue[i__ - 1] = dtrue5[i__ + ((np1 + combla_1.incx * 5) <<
3) - 49];
/* L40: */
}
@@ -517,8 +519,10 @@ L40:
static integer lenx, leny;
extern doublereal ddottest_(integer*,doublereal*,integer*,doublereal*,integer*);
static integer i__, j, ksize;
extern /* Subroutine */ int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*), dcopytest_(integer*,doublereal*,integer*,doublereal*,integer*), dswaptest_(integer*,doublereal*,integer*,doublereal*,integer*),
daxpytest_(integer*,doublereal*,doublereal*,integer*,doublereal*,integer*), stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
extern /* Subroutine */ int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*);
extern void dcopytest_(integer*,doublereal*,integer*,doublereal*,integer*), dswaptest_(integer*,doublereal*,integer*,doublereal*,integer*),
daxpytest_(integer*,doublereal*,doublereal*,integer*,doublereal*,integer*);
extern int stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
static integer ki, kn, mx, my;
static doublereal sx[7], sy[7], stx[7], sty[7];
@@ -618,9 +622,10 @@ L40:
;
/* Local variables */
extern /* Subroutine */ int drottest_(integer*,doublereal*,integer*,doublereal*,integer*,doublereal*,doublereal*);
extern /* Subroutine */ void drottest_(integer*,doublereal*,integer*,doublereal*,integer*,doublereal*,doublereal*);
static integer i__, k, ksize;
extern /* Subroutine */int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*), drotmtest_(integer*,doublereal*,integer*,doublereal*,integer*,doublereal*);
extern /* Subroutine */int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*);
extern void drotmtest_(integer*,doublereal*,integer*,doublereal*,integer*,doublereal*);
static integer ki, kn;
static doublereal dparam[5], sx[10], sy[10], stx[10], sty[10];
+32 -53
View File
@@ -21,19 +21,6 @@ typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
@@ -318,7 +305,7 @@ static logical c_false = FALSE_;
static char snamet[12];
static doublereal thresh;
static logical rorder;
extern /* Subroutine */ void cd2chke_(char*, ftnlen);
extern /* Subroutine */ void cd2chke_(char*);
static integer layout;
static logical ltestt, tsterr;
static doublereal alf[7];
@@ -706,7 +693,7 @@ L100:
ftnlen)12);
/* Test error exits. */
if (tsterr) {
cd2chke_(snames[isnum - 1], (ftnlen)12);
cd2chke_(snames[isnum - 1]);
}
/* Test computations. */
infoc_1.infot = 0;
@@ -885,8 +872,8 @@ L240:
static integer ia, ib, ic;
static logical banded;
static integer nc, nd, im, in, kl, ml, nk, nl, ku, ix, iy, ms, lx, ly, ns;
extern /* Subroutine */ void cdgbmv_(integer*, char*, integer*, integer*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
extern /* Subroutine */ void cdgemv_(integer*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
extern /* Subroutine */ void cdgbmv_(integer*, char*, integer*, integer*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
extern /* Subroutine */ void cdgemv_(integer*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
static char ctrans[14];
static doublereal errmax, transl;
@@ -1118,8 +1105,7 @@ L240:
}
cdgemv_(iorder, trans, &m, &n, &alpha,
&aa[1], &lda, &xx[1], &incx,
&beta, &yy[1], &incy, (ftnlen)
1);
&beta, &yy[1], &incy);
} else if (banded) {
if (*trace) {
/*
@@ -1135,7 +1121,7 @@ L240:
cdgbmv_(iorder, trans, &m, &n, &kl, &
ku, &alpha, &aa[1], &lda, &xx[
1], &incx, &beta, &yy[1], &
incy, (ftnlen)1);
incy);
}
/* Check if error-exit was taken incorrectly. */
@@ -1329,10 +1315,10 @@ L140:
static logical packed;
static integer nk, ks, ix, iy, ns, lx, ly;
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cdsbmv_(integer*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
extern /* Subroutine */ void cdspmv_(integer*, char*, integer*, doublereal*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
extern /* Subroutine */ void cdsbmv_(integer*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
extern /* Subroutine */ void cdspmv_(integer*, char*, integer*, doublereal*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, integer*);
static doublereal errmax, transl;
extern /* Subroutine */ void cdsymv_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
extern /* Subroutine */ void cdsymv_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
static integer laa, lda;
extern logical lde_(doublereal*, doublereal*, integer*);
static doublereal als, bls, err;
@@ -1536,7 +1522,7 @@ L140:
}
cdsymv_(iorder, uplo, &n, &alpha, &aa[1],
&lda, &xx[1], &incx, &beta, &yy[1]
, &incy, (ftnlen)1);
, &incy);
} else if (banded) {
if (*trace) {
/*
@@ -1551,7 +1537,7 @@ L140:
}
cdsbmv_(iorder, uplo, &n, &k, &alpha, &aa[
1], &lda, &xx[1], &incx, &beta, &
yy[1], &incy, (ftnlen)1);
yy[1], &incy);
} else if (packed) {
if (*trace) {
/*
@@ -1566,7 +1552,7 @@ L140:
}
cdspmv_(iorder, uplo, &n, &alpha, &aa[1],
&xx[1], &incx, &beta, &yy[1], &
incy, (ftnlen)1);
incy);
}
/* Check if error-exit was taken incorrectly. */
@@ -1770,15 +1756,15 @@ L130:
static logical packed;
static integer nk, ks, ix, ns, lx;
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cdtbmv_(integer*, char*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cdtbsv_(integer*, char*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cdtbmv_(integer*, char*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*);
extern /* Subroutine */ void cdtbsv_(integer*, char*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*);
static char ctrans[14];
static doublereal errmax;
extern /* Subroutine */ void cdtpmv_(integer*, char*, char*, char*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cdtrmv_(integer*, char*, char*, char*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cdtpmv_(integer*, char*, char*, char*, integer*, doublereal*, doublereal*, integer*);
extern /* Subroutine */ void cdtrmv_(integer*, char*, char*, char*, integer*, doublereal*, integer*, doublereal*, integer*);
static doublereal transl;
extern /* Subroutine */ void cdtpsv_(integer*, char*, char*, char*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cdtrsv_(integer*, char*, char*, char*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cdtpsv_(integer*, char*, char*, char*, integer*, doublereal*, doublereal*, integer*);
extern /* Subroutine */ void cdtrsv_(integer*, char*, char*, char*, integer*, doublereal*, integer*, doublereal*, integer*);
static char transs[1];
static integer laa, icd, lda;
extern logical lde_(doublereal*, doublereal*, integer*);
@@ -1978,8 +1964,7 @@ L130:
f_rew(&al__1);*/
}
cdtrmv_(iorder, uplo, trans, diag, &n, &
aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
aa[1], &lda, &xx[1], &incx);
} else if (banded) {
if (*trace) {
/*
@@ -1993,8 +1978,7 @@ L130:
f_rew(&al__1);*/
}
cdtbmv_(iorder, uplo, trans, diag, &n, &k,
&aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
&aa[1], &lda, &xx[1], &incx);
} else if (packed) {
if (*trace) {
/*
@@ -2008,8 +1992,7 @@ L130:
f_rew(&al__1);*/
}
cdtpmv_(iorder, uplo, trans, diag, &n, &
aa[1], &xx[1], &incx, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
aa[1], &xx[1], &incx);
}
} else if (s_cmp(sname + 9, "sv", (ftnlen)2, (
ftnlen)2) == 0) {
@@ -2026,8 +2009,7 @@ L130:
f_rew(&al__1);*/
}
cdtrsv_(iorder, uplo, trans, diag, &n, &
aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
aa[1], &lda, &xx[1], &incx);
} else if (banded) {
if (*trace) {
/*
@@ -2041,8 +2023,7 @@ L130:
f_rew(&al__1);*/
}
cdtbsv_(iorder, uplo, trans, diag, &n, &k,
&aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
&aa[1], &lda, &xx[1], &incx);
} else if (packed) {
if (*trace) {
/*
@@ -2056,8 +2037,7 @@ L130:
f_rew(&al__1);*/
}
cdtpsv_(iorder, uplo, trans, diag, &n, &
aa[1], &xx[1], &incx, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
aa[1], &xx[1], &incx);
}
}
@@ -2587,11 +2567,11 @@ L150:
static logical isame[13];
extern /* Subroutine */ int dmvch_(char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, doublereal*, doublereal*, doublereal*, logical*, integer*, logical*, ftnlen);
static integer nargs;
extern /* Subroutine */ void cdspr_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, ftnlen);
extern /* Subroutine */ void cdspr_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*);
static logical reset;
static char cuplo[14];
static integer incxs;
extern /* Subroutine */ void cdsyr_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, ftnlen);
extern /* Subroutine */ void cdsyr_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*);
static logical upper;
static char uplos[1];
static integer ia, ja, ic, nc, jj, lj, in;
@@ -2751,7 +2731,7 @@ L150:
f_rew(&al__1);*/
}
cdsyr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]
, &lda, (ftnlen)1);
, &lda);
} else if (packed) {
if (*trace) {
/*
@@ -2764,8 +2744,7 @@ L150:
al__1.aunit = *ntra;
f_rew(&al__1);*/
}
cdspr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]
, (ftnlen)1);
cdspr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]);
}
/* Check if error-exit was taken incorrectly. */
@@ -2948,8 +2927,8 @@ L130:
static integer incxs, incys;
static logical upper;
static char uplos[1];
extern /* Subroutine */ void cdspr2_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, ftnlen);
extern /* Subroutine */ void cdsyr2_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen);
extern /* Subroutine */ void cdspr2_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*);
extern /* Subroutine */ void cdsyr2_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, integer*);
static integer ia, ja, ic, nc, jj, lj, in;
static logical packed;
static integer ix, iy, ns, lx, ly;
@@ -3132,7 +3111,7 @@ L130:
f_rew(&al__1);*/
}
cdsyr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
yy[1], &incy, &aa[1], &lda, (ftnlen)1);
yy[1], &incy, &aa[1], &lda);
} else if (packed) {
if (*trace) {
/*
@@ -3146,7 +3125,7 @@ L130:
f_rew(&al__1);*/
}
cdspr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
yy[1], &incy, &aa[1], (ftnlen)1);
yy[1], &incy, &aa[1]);
}
/* Check if error-exit was taken incorrectly. */
+14 -32
View File
@@ -21,19 +21,6 @@ typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
@@ -309,7 +296,7 @@ static logical c_false = FALSE_;
static char snamet[12], transa[1], transb[1];
static doublereal thresh;
static logical rorder;
extern /* Subroutine */ void cd3chke_(char*, ftnlen);
extern /* Subroutine */ void cd3chke_(char*);
static integer layout;
static logical ltestt, tsterr;
static doublereal alf[7];
@@ -658,7 +645,7 @@ L80:
ftnlen)12);
/* Test error exits. */
if (tsterr) {
cd3chke_(snames[isnum - 1], (ftnlen)12);
cd3chke_(snames[isnum - 1]);
}
/* Test computations. */
infoc_1.infot = 0;
@@ -807,7 +794,7 @@ L230:
static logical reset;
extern /* Subroutine */ void dprcn1_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, integer*, doublereal*, integer*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
static integer ia, ib, ma, mb, na, nb, nc, ik, im, in;
extern /* Subroutine */ void cdgemm_(integer*, char*, char*, integer*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cdgemm_(integer*, char*, char*, integer*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
static integer ks, ms, ns;
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
static char tranas[1], tranbs[1], transa[1], transb[1];
@@ -1012,8 +999,7 @@ L230:
}
cdgemm_(iorder, transa, transb, &m, &n, &k, &
alpha, &aa[1], &lda, &bb[1], &ldb, &
beta, &cc[1], &ldc, (ftnlen)1, (
ftnlen)1);
beta, &cc[1], &ldc);
/* Check if error-exit was taken incorrectly. */
@@ -1204,7 +1190,7 @@ L130:
extern /* Subroutine */ void dprcn2_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, doublereal*, integer*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
static integer ia, ib, na, nc, im, in, ms, ns;
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cdsymm_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cdsymm_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
static doublereal errmax;
static integer laa, lbb, lda, lcc, ldb, ldc;
extern logical lde_(doublereal*, doublereal*, integer*);
@@ -1386,8 +1372,7 @@ L130:
f_rew(&al__1);*/
}
cdsymm_(iorder, side, uplo, &m, &n, &alpha, &aa[1]
, &lda, &bb[1], &ldb, &beta, &cc[1], &ldc,
(ftnlen)1, (ftnlen)1);
, &lda, &bb[1], &ldb, &beta, &cc[1], &ldc);
/* Check if error-exit was taken incorrectly. */
@@ -1580,9 +1565,9 @@ L120:
extern /* Subroutine */ void dprcn3_(integer*, integer*, char*, integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, integer*, integer*, ftnlen, ftnlen, ftnlen, ftnlen, ftnlen);
static integer ia, na, nc, im, in, ms, ns;
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cdtrmm_(integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cdtrmm_(integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*);
static char tranas[1], transa[1];
extern /* Subroutine */ void cdtrsm_(integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cdtrsm_(integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*);
static doublereal errmax;
static integer laa, icd, lbb, lda, ldb;
extern logical lde_(doublereal*, doublereal*, integer*);
@@ -1762,8 +1747,7 @@ L120:
}
cdtrmm_(iorder, side, uplo, transa, diag,
&m, &n, &alpha, &aa[1], &lda, &bb[
1], &ldb, (ftnlen)1, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
1], &ldb);
} else if (s_cmp(sname + 9, "sm", (ftnlen)2, (
ftnlen)2) == 0) {
if (*trace) {
@@ -1780,8 +1764,7 @@ L120:
}
cdtrsm_(iorder, side, uplo, transa, diag,
&m, &n, &alpha, &aa[1], &lda, &bb[
1], &ldb, (ftnlen)1, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
1], &ldb);
}
/* Check if error-exit was taken incorrectly. */
@@ -2038,7 +2021,7 @@ L160:
static integer ia, ib, jc, ma, na, nc, ik, in, jj, lj, ks, ns;
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
static doublereal errmax;
extern /* Subroutine */ void cdsyrk_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cdsyrk_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, integer*);
static char transs[1];
static integer laa, lda, lcc, ldc;
extern logical lde_(doublereal*, doublereal*, integer*);
@@ -2199,8 +2182,7 @@ L160:
f_rew(&al__1);*/
}
cdsyrk_(iorder, uplo, trans, &n, &k, &alpha, &aa[
1], &lda, &beta, &cc[1], &ldc, (ftnlen)1,
(ftnlen)1);
1], &lda, &beta, &cc[1], &ldc);
/* Check if error-exit was taken incorrectly. */
@@ -2420,7 +2402,7 @@ L130:
static char transs[1];
static integer laa, lbb, lda, lcc, ldb, ldc;
extern logical lde_(doublereal*, doublereal*, integer*);
extern /* Subroutine */ void cdsyr2k_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cdsyr2k_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
static doublereal als;
static integer ict, icu;
static doublereal err;
@@ -2604,7 +2586,7 @@ L130:
}
cdsyr2k_(iorder, uplo, trans, &n, &k, &alpha, &aa[
1], &lda, &bb[1], &ldb, &beta, &cc[1], &
ldc, (ftnlen)1, (ftnlen)1);
ldc);
/* Check if error-exit was taken incorrectly. */
+10 -6
View File
@@ -342,7 +342,8 @@ static real c_b34 = (float)1.;
/* Local variables */
static integer k;
extern /* Subroutine */ int srotgtest_(real*,real*,real*,real*), stest1_(real*,real*,real*,real*);
extern /* Subroutine */ void srotgtest_(real*,real*,real*,real*);
extern int stest1_(real*,real*,real*,real*);
static real sa, sb, sc, ss;
/* .. Parameters .. */
@@ -435,7 +436,8 @@ L40:
static integer i__;
extern real snrm2test_(integer*,real*,integer*);
static real stemp[1], strue[8];
extern /* Subroutine */ int stest_(integer*, real*,real*,real*,real*), sscaltest_(integer*,real*,real*,integer*);
extern /* Subroutine */ int stest_(integer*, real*,real*,real*,real*);
extern void sscaltest_(integer*,real*,real*,integer*);
extern real sasumtest_(integer*,real*,integer*);
extern /* Subroutine */ int itest1_(integer*,integer*), stest1_(real*,real*,real*,real*);
static real sx[8];
@@ -462,7 +464,7 @@ L40:
/* .. Set vector arguments .. */
i__1 = len;
for (i__ = 1; i__ <= i__1; ++i__) {
sx[i__ - 1] = dv[i__ + (np1 + combla_1.incx * 5 << 3) - 49];
sx[i__ - 1] = dv[i__ + ((np1 + combla_1.incx * 5) << 3) - 49];
/* L20: */
}
@@ -482,7 +484,7 @@ L40:
, sx, &combla_1.incx);
i__1 = len;
for (i__ = 1; i__ <= i__1; ++i__) {
strue[i__ - 1] = dtrue5[i__ + (np1 + combla_1.incx * 5 <<
strue[i__ - 1] = dtrue5[i__ + ((np1 + combla_1.incx * 5) <<
3) - 49];
/* L40: */
}
@@ -592,7 +594,8 @@ L40:
static integer lenx, leny;
extern real sdottest_(integer*,real*,integer*,real*,integer*);
static integer i__, j, ksize;
extern /* Subroutine */ int stest_(integer*,real*,real*,real*,real*), scopytest_(integer*,real*,integer*,real*,integer*), sswaptest_(integer*,real*,integer*,real*,integer*),
extern /* Subroutine */ int stest_(integer*,real*,real*,real*,real*);
extern void scopytest_(integer*,real*,integer*,real*,integer*), sswaptest_(integer*,real*,integer*,real*,integer*),
saxpytest_(integer*,real*,real*,integer*,real*,integer*);
static integer ki;
extern /* Subroutine */ int stest1_(real*,real*,real*,real*);
@@ -710,7 +713,8 @@ L40:
/* Local variables */
extern /* Subroutine */ void srottest_(integer*,real*,integer*,real*,integer*,real*,real*);
static integer i__, k, ksize;
extern /* Subroutine */ int stest_(integer*,real*,real*,real*,real*), srotmtest_(integer*,real*,integer*,real*,integer*,real*);
extern /* Subroutine */ int stest_(integer*,real*,real*,real*,real*);
extern void srotmtest_(integer*,real*,integer*,real*,integer*,real*);
static integer ki, kn;
static real sx[19], sy[19], sparam[5], stx[19], sty[19];
+34 -55
View File
@@ -21,19 +21,6 @@ typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
@@ -319,7 +306,7 @@ extern /* Subroutine */ int schk6_(char* sname, real* eps, real* thresh, integer
static logical rorder;
static integer layout;
static logical ltestt;
extern /* Subroutine */ int cs2chke_(char*, ftnlen);
extern /* Subroutine */ void cs2chke_(char*);
static logical tsterr;
static real alf[7];
static integer inc[7], nkb;
@@ -702,7 +689,7 @@ L100:
ftnlen)12);
/* Test error exits. */
if (tsterr) {
cs2chke_(snames[isnum - 1], (ftnlen)12);
cs2chke_(snames[isnum - 1]);
}
/* Test computations. */
infoc_1.infot = 0;
@@ -880,8 +867,8 @@ L240:
static integer ia, ib, ic;
static logical banded;
static integer nc, nd, im, in, kl, ml, nk, nl, ku, ix, iy, ms, lx, ly, ns;
extern /* Subroutine */ void csgbmv_(integer*, char*, integer*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen);
extern /* Subroutine */ void csgemv_(integer*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen);
extern /* Subroutine */ void csgbmv_(integer*, char*, integer*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
extern /* Subroutine */ void csgemv_(integer*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
static char ctrans[14];
static real errmax;
extern logical lseres_(char* type__, char* uplo, integer* m, integer* n, real* aa, real* as, integer* lda, ftnlen ltype_len, ftnlen uplo_len);
@@ -1115,8 +1102,7 @@ L240:
}
csgemv_(iorder, trans, &m, &n, &alpha,
&aa[1], &lda, &xx[1], &incx,
&beta, &yy[1], &incy, (ftnlen)
1);
&beta, &yy[1], &incy);
} else if (banded) {
if (*trace) {
/*
@@ -1132,7 +1118,7 @@ L240:
csgbmv_(iorder, trans, &m, &n, &kl, &
ku, &alpha, &aa[1], &lda, &xx[
1], &incx, &beta, &yy[1], &
incy, (ftnlen)1);
incy);
}
/* Check if error-exit was taken incorrectly. */
@@ -1327,10 +1313,10 @@ L140:
static integer nk, ks, ix, iy, ns, lx, ly;
static real errmax;
extern logical lseres_(char* , char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cssbmv_(integer*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen);
extern /* Subroutine */ void cssbmv_(integer*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
static real transl;
extern /* Subroutine */ void csspmv_(integer*, char*, integer*, real*, real*, real*, integer*, real*, real*, integer*, ftnlen);
extern /* Subroutine */ void cssymv_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen);
extern /* Subroutine */ void csspmv_(integer*, char*, integer*, real*, real*, real*, integer*, real*, real*, integer*);
extern /* Subroutine */ void cssymv_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
static integer laa, lda;
static real als, bls;
extern logical lse_(real*, real*, integer*);
@@ -1531,7 +1517,7 @@ L140:
}
cssymv_(iorder, uplo, &n, &alpha, &aa[1],
&lda, &xx[1], &incx, &beta, &yy[1]
, &incy, (ftnlen)1);
, &incy);
} else if (banded) {
if (*trace) {
/*
@@ -1546,7 +1532,7 @@ L140:
}
cssbmv_(iorder, uplo, &n, &k, &alpha, &aa[
1], &lda, &xx[1], &incx, &beta, &
yy[1], &incy, (ftnlen)1);
yy[1], &incy);
} else if (packed) {
if (*trace) {
/*
@@ -1561,7 +1547,7 @@ L140:
}
csspmv_(iorder, uplo, &n, &alpha, &aa[1],
&xx[1], &incx, &beta, &yy[1], &
incy, (ftnlen)1);
incy);
}
/* Check if error-exit was taken incorrectly. */
@@ -1767,14 +1753,14 @@ L130:
static char ctrans[14];
static real errmax;
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cstbmv_(integer*, char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cstbmv_(integer*, char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*);
static real transl;
extern /* Subroutine */ void cstbsv_(integer*, char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cstbsv_(integer*, char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*);
static char transs[1];
extern /* Subroutine */ void cstpmv_(integer*, char*, char*, char*, integer*, real*, real*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cstrmv_(integer*, char*, char*, char*, integer*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cstpsv_(integer*, char*, char*, char*, integer*, real*, real*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cstrsv_(integer*, char*, char*, char*, integer*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cstpmv_(integer*, char*, char*, char*, integer*, real*, real*, integer*);
extern /* Subroutine */ void cstrmv_(integer*, char*, char*, char*, integer*, real*, integer*, real*, integer*);
extern /* Subroutine */ void cstpsv_(integer*, char*, char*, char*, integer*, real*, real*, integer*);
extern /* Subroutine */ void cstrsv_(integer*, char*, char*, char*, integer*, real*, integer*, real*, integer*);
static integer laa, icd, lda, ict, icu;
extern logical lse_(real*, real*, integer*);
static real err;
@@ -1972,8 +1958,7 @@ L130:
f_rew(&al__1);*/
}
cstrmv_(iorder, uplo, trans, diag, &n, &
aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
aa[1], &lda, &xx[1], &incx);
} else if (banded) {
if (*trace) {
/*
@@ -1987,8 +1972,7 @@ L130:
f_rew(&al__1);*/
}
cstbmv_(iorder, uplo, trans, diag, &n, &k,
&aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
&aa[1], &lda, &xx[1], &incx);
} else if (packed) {
if (*trace) {
/*
@@ -2002,8 +1986,7 @@ L130:
f_rew(&al__1);*/
}
cstpmv_(iorder, uplo, trans, diag, &n, &
aa[1], &xx[1], &incx, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
aa[1], &xx[1], &incx);
}
} else if (s_cmp(sname + 9, "sv", (ftnlen)2, (
ftnlen)2) == 0) {
@@ -2020,8 +2003,7 @@ L130:
f_rew(&al__1);*/
}
cstrsv_(iorder, uplo, trans, diag, &n, &
aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
aa[1], &lda, &xx[1], &incx);
} else if (banded) {
if (*trace) {
/*
@@ -2035,8 +2017,7 @@ L130:
f_rew(&al__1);*/
}
cstbsv_(iorder, uplo, trans, diag, &n, &k,
&aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
&aa[1], &lda, &xx[1], &incx);
} else if (packed) {
if (*trace) {
/*
@@ -2050,8 +2031,7 @@ L130:
f_rew(&al__1);*/
}
cstpsv_(iorder, uplo, trans, diag, &n, &
aa[1], &xx[1], &incx, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
aa[1], &xx[1], &incx);
}
}
@@ -2585,10 +2565,10 @@ L150:
static logical reset;
static char cuplo[14];
static integer incxs;
extern /* Subroutine */ void csspr_(integer*, char*, integer*, real*, real*, integer*, real*, ftnlen);
extern /* Subroutine */ void csspr_(integer*, char*, integer*, real*, real*, integer*, real*);
static logical upper;
static char uplos[1];
extern /* Subroutine */ void cssyr_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, ftnlen);
extern /* Subroutine */ void cssyr_(integer*, char*, integer*, real*, real*, integer*, real*, integer*);
static integer ia, ja, ic, nc, jj, lj, in;
static logical packed;
static integer ix, ns, lx;
@@ -2747,7 +2727,7 @@ L150:
f_rew(&al__1);*/
}
cssyr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]
, &lda, (ftnlen)1);
, &lda);
} else if (packed) {
if (*trace) {
/*
@@ -2760,8 +2740,7 @@ L150:
al__1.aunit = *ntra;
f_rew(&al__1);*/
}
csspr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]
, (ftnlen)1);
csspr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]);
}
/* Check if error-exit was taken incorrectly. */
@@ -2945,13 +2924,13 @@ L130:
static logical upper;
static char uplos[1];
static integer ia, ja, ic;
extern /* Subroutine */ void csspr2_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, ftnlen);
extern /* Subroutine */ void csspr2_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*);
static integer nc, jj, lj, in;
static logical packed;
extern /* Subroutine */ void cssyr2_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, integer*, ftnlen);
extern /* Subroutine */ void cssyr2_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, integer*);
static integer ix, iy, ns, lx, ly;
static real errmax;
extern logical lseres_(char* type__, char* uplo, integer* m, integer* n, real* aa, real* as, integer* lda, ftnlen ltype_len, ftnlen uplo_len);
extern logical lseres_(char* type__, char* uplo, integer* m, integer* n, real* aa, real* as, integer* lda, ftnlen, ftnlen);
static real transl;
static integer laa, lda;
static real als;
@@ -3131,7 +3110,7 @@ L130:
f_rew(&al__1);*/
}
cssyr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
yy[1], &incy, &aa[1], &lda, (ftnlen)1);
yy[1], &incy, &aa[1], &lda);
} else if (packed) {
if (*trace) {
/*
@@ -3145,7 +3124,7 @@ L130:
f_rew(&al__1);*/
}
csspr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
yy[1], &incy, &aa[1], (ftnlen)1);
yy[1], &incy, &aa[1]);
}
/* Check if error-exit was taken incorrectly. */
@@ -3380,7 +3359,7 @@ L170:
i__2 = *m;
for (i__ = 1; i__ <= i__2; ++i__) {
if (gen || (upper && i__ <= j) || (lower && i__ >= j)) {
if (i__ <= j && (j - i__ <= *ku || i__ >= j && i__ - j <= *kl))
if (((i__ <= j && j - i__ <= *ku) || (i__ >= j && i__ - j <= *kl)))
{
a[i__ + j * a_dim1] = sbeg_(reset) + *transl;
} else {
+15 -33
View File
@@ -21,19 +21,6 @@ typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
@@ -309,7 +296,7 @@ static logical c_false = FALSE_;
static logical rorder;
static integer layout;
static logical ltestt, tsterr;
extern /* Subroutine */ void cs3chke_(char*, ftnlen);
extern /* Subroutine */ void cs3chke_(char*);
static real alf[7], bet[7];
extern logical lse_(real*, real*, integer*);
static real eps, err;
@@ -522,7 +509,7 @@ L30:
if (i__1 < 2) {
goto L60;
}
for (i__ = 1; i__ <= 9; ++i__) {
for (i__ = 1; i__ <= 6; ++i__) {
if (s_cmp(snamet, snames[i__ - 1] , (ftnlen)12, (ftnlen)12) ==
0) {
goto L50;
@@ -656,7 +643,7 @@ L80:
ftnlen)12);
/* Test error exits. */
if (tsterr) {
cs3chke_(snames[isnum - 1], (ftnlen)12);
cs3chke_(snames[isnum - 1]);
}
/* Test computations. */
infoc_1.infot = 0;
@@ -800,7 +787,7 @@ L230:
extern /* Subroutine */ int smake_(char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, logical*, real*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ int smmch_(char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, real*, real*, real*, integer*, real*, real*, logical*, integer*, logical*, ftnlen, ftnlen);
static integer ia, ib, ma, mb, na, nb, nc, ik, im, in, ks, ms, ns;
extern /* Subroutine */ void csgemm_(integer*, char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void csgemm_(integer*, char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
static char tranas[1], tranbs[1], transa[1], transb[1];
static real errmax;
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
@@ -1003,8 +990,7 @@ L230:
}
csgemm_(iorder, transa, transb, &m, &n, &k, &
alpha, &aa[1], &lda, &bb[1], &ldb, &
beta, &cc[1], &ldc, (ftnlen)1, (
ftnlen)1);
beta, &cc[1], &ldc);
/* Check if error-exit was taken incorrectly. */
@@ -1197,7 +1183,7 @@ L130:
static integer ia, ib, na, nc, im, in, ms, ns;
static real errmax;
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cssymm_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cssymm_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
extern void sprcn2_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, real*, integer*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ int smake_(char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, logical*, real*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ int smmch_(char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, real*, real*, real*, integer*, real*, real*, logical*, integer*, logical*, ftnlen, ftnlen);
@@ -1378,8 +1364,7 @@ L130:
// f_rew(&al__1);
}
cssymm_(iorder, side, uplo, &m, &n, &alpha, &aa[1]
, &lda, &bb[1], &ldb, &beta, &cc[1], &ldc,
(ftnlen)1, (ftnlen)1);
, &lda, &bb[1], &ldb, &beta, &cc[1], &ldc);
/* Check if error-exit was taken incorrectly. */
@@ -1575,8 +1560,8 @@ L120:
extern /* Subroutine */ int smake_(char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, logical*, real*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ int smmch_(char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, real*, real*, real*, integer*, real*, real*, logical*, integer*, logical*, ftnlen, ftnlen);
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cstrmm_(integer*, char*, char*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cstrsm_(integer*, char*, char*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cstrmm_(integer*, char*, char*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*);
extern /* Subroutine */ void cstrsm_(integer*, char*, char*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*);
static integer laa, icd, lbb, lda, ldb, ics;
static real als;
static integer ict, icu;
@@ -1752,8 +1737,7 @@ L120:
}
cstrmm_(iorder, side, uplo, transa, diag,
&m, &n, &alpha, &aa[1], &lda, &bb[
1], &ldb, (ftnlen)1, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
1], &ldb);
} else if (s_cmp(sname + 9, "sm", (ftnlen)2, (
ftnlen)2) == 0) {
if (*trace) {
@@ -1768,8 +1752,7 @@ L120:
}
cstrsm_(iorder, side, uplo, transa, diag,
&m, &n, &alpha, &aa[1], &lda, &bb[
1], &ldb, (ftnlen)1, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
1], &ldb);
}
/* Check if error-exit was taken incorrectly. */
@@ -2028,7 +2011,7 @@ L160:
static real errmax;
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
static char transs[1];
extern /* Subroutine */ void cssyrk_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, real*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cssyrk_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, real*, integer*);
static integer laa, lda, lcc, ldc;
static real als;
static integer ict, icu;
@@ -2186,8 +2169,7 @@ L160:
// f_rew(&al__1);
}
cssyrk_(iorder, uplo, trans, &n, &k, &alpha, &aa[
1], &lda, &beta, &cc[1], &ldc, (ftnlen)1,
(ftnlen)1);
1], &lda, &beta, &cc[1], &ldc);
/* Check if error-exit was taken incorrectly. */
@@ -2409,7 +2391,7 @@ L130:
static integer laa, lbb, lda, lcc, ldb, ldc;
static real als;
static integer ict, icu;
extern /* Subroutine */ void cssyr2k_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cssyr2k_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
extern logical lse_(real*, real*, integer*);
extern /* Subroutine */ int smmch_(char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, real*, real*, real*, integer*, real*, real*, logical*, integer*, logical*, ftnlen, ftnlen);
static real err;
@@ -2591,7 +2573,7 @@ L130:
}
cssyr2k_(iorder, uplo, trans, &n, &k, &alpha, &aa[
1], &lda, &bb[1], &ldb, &beta, &cc[1], &
ldc, (ftnlen)1, (ftnlen)1);
ldc);
/* Check if error-exit was taken incorrectly. */
+11 -18
View File
@@ -22,18 +22,10 @@ typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
@@ -380,11 +372,12 @@ static doublereal c_b43 = 1.;
static integer i__;
extern /* Subroutine */ int ctest_(integer*, doublecomplex*, doublecomplex*, doublecomplex*, doublereal*);
static doublecomplex mwpcs[5], mwpct[5];
extern /* Subroutine */ int zscaltest_(integer*, doublecomplex*, doublecomplex*, integer*), itest1_(integer*, integer*), stest1_(doublereal*, doublereal*, doublereal*, doublereal*);
extern /* Subroutine */ void zscaltest_(integer*, doublecomplex*, doublecomplex*, integer*);
extern int itest1_(integer*, integer*), stest1_(doublereal*, doublereal*, doublereal*, doublereal*);
static doublecomplex cx[8];
extern doublereal dznrm2test_(integer*, doublecomplex*, integer*);
static integer np1;
extern /* Subroutine */ int zdscaltest_(integer*, doublereal*, doublecomplex*, integer*);
extern /* Subroutine */ void zdscaltest_(integer*, doublereal*, doublecomplex*, integer*);
extern integer izamaxtest_(integer*, doublecomplex*, integer*);
extern doublereal dzasumtest_(integer*, doublecomplex*, integer*);
static integer len;
@@ -408,7 +401,7 @@ static doublereal c_b43 = 1.;
i__1 = len;
for (i__ = 1; i__ <= i__1; ++i__) {
i__2 = i__ - 1;
i__3 = i__ + (np1 + combla_1.incx * 5 << 3) - 49;
i__3 = i__ + ((np1 + combla_1.incx * 5) << 3) - 49;
cx[i__2].r = cv[i__3].r, cx[i__2].i = cv[i__3].i;
/* L20: */
}
@@ -423,13 +416,13 @@ static doublereal c_b43 = 1.;
} else if (combla_1.icase == 8) {
/* .. ZSCALTEST .. */
zscaltest_(&combla_1.n, &ca, cx, &combla_1.incx);
ctest_(&len, cx, &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48],
&ctrue5[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
ctest_(&len, cx, &ctrue5[((np1 + combla_1.incx * 5) << 3) - 48],
&ctrue5[((np1 + combla_1.incx * 5) << 3) - 48], sfac);
} else if (combla_1.icase == 9) {
/* .. ZDSCALTEST .. */
zdscaltest_(&combla_1.n, &sa, cx, &combla_1.incx);
ctest_(&len, cx, &ctrue6[(np1 + combla_1.incx * 5 << 3) - 48],
&ctrue6[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
ctest_(&len, cx, &ctrue6[((np1 + combla_1.incx * 5) << 3) - 48],
&ctrue6[((np1 + combla_1.incx * 5) << 3) - 48], sfac);
} else if (combla_1.icase == 10) {
/* .. IZAMAXTEST .. */
i__1 = izamaxtest_(&combla_1.n, cx, &combla_1.incx);
@@ -591,11 +584,11 @@ static doublereal c_b43 = 1.;
extern /* Subroutine */ int ctest_(integer*, doublecomplex*, doublecomplex*, doublecomplex*, doublereal*);
static integer ksize;
static doublecomplex ztemp;
extern /* Subroutine */ int zdotctest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zcopytest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
extern /* Subroutine */ void zdotctest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zcopytest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
static integer ki;
extern /* Subroutine */ int zdotutest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zswaptest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
extern /* Subroutine */ void zdotutest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zswaptest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
static integer kn;
extern /* Subroutine */ int zaxpytest_(integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
extern /* Subroutine */ void zaxpytest_(integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
static doublecomplex cx[7], cy[7];
static integer mx, my;
+32 -48
View File
@@ -22,17 +22,12 @@ typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
@@ -322,7 +317,7 @@ static logical c_false = FALSE_;
static logical rorder;
static integer layout;
static logical ltestt, tsterr;
extern /* Subroutine */ void cz2chke_(char*, ftnlen);
extern /* Subroutine */ void cz2chke_(char*);
static doublecomplex alf[7];
static integer inc[7], nkb;
static doublecomplex bet[7];
@@ -713,7 +708,7 @@ L100:
ftnlen)12);
/* Test error exits. */
if (tsterr) {
cz2chke_(snames[isnum - 1], (ftnlen)12);
cz2chke_(snames[isnum - 1]);
}
/* Test computations. */
infoc_1.infot = 0;
@@ -893,9 +888,9 @@ L240:
static integer ia, ib, ic;
static logical banded;
static integer nc, nd, im, in, kl, ml, nk, nl, ku, ix, iy, ms, lx, ly, ns;
extern /* Subroutine */ void czgbmv_(integer*, char*, integer*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
extern /* Subroutine */ void czgbmv_(integer*, char*, integer*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static char ctrans[14];
extern /* Subroutine */ void czgemv_(integer*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
extern /* Subroutine */ void czgemv_(integer*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static doublereal errmax;
static doublecomplex transl;
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
@@ -1144,8 +1139,7 @@ L240:
}
czgemv_(iorder, trans, &m, &n, &alpha,
&aa[1], &lda, &xx[1], &incx,
&beta, &yy[1], &incy, (ftnlen)
1);
&beta, &yy[1], &incy);
} else if (banded) {
if (*trace) {
/*
@@ -1160,8 +1154,7 @@ L240:
}
czgbmv_(iorder, trans, &m, &n, &kl, &
ku, &alpha, &aa[1], &lda, &xx[
1], &incx, &beta, &yy[1], &
incy, (ftnlen)1);
1], &incx, &beta, &yy[1], &incy);
}
/* Check if error-exit was taken incorrectly. */
@@ -1349,12 +1342,12 @@ L140:
static integer nc, ik, in;
static logical packed;
static integer nk, ks, ix, iy, ns, lx, ly;
extern /* Subroutine */ void czhbmv_(integer*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
extern /* Subroutine */ void czhemv_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
extern /* Subroutine */ void czhbmv_(integer*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
extern /* Subroutine */ void czhemv_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static doublereal errmax;
static doublecomplex transl;
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czhpmv_(integer*, char*, integer*, doublecomplex*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
extern /* Subroutine */ void czhpmv_(integer*, char*, integer*, doublecomplex*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static integer laa, lda;
static doublecomplex als, bls;
static doublereal err;
@@ -1568,7 +1561,7 @@ L140:
}
czhemv_(iorder, uplo, &n, &alpha, &aa[1],
&lda, &xx[1], &incx, &beta, &yy[1]
, &incy, (ftnlen)1);
, &incy);
} else if (banded) {
if (*trace) {
/*
@@ -1583,7 +1576,7 @@ L140:
}
czhbmv_(iorder, uplo, &n, &k, &alpha, &aa[
1], &lda, &xx[1], &incx, &beta, &
yy[1], &incy, (ftnlen)1);
yy[1], &incy);
} else if (packed) {
if (*trace) {
/*
@@ -1597,8 +1590,7 @@ L140:
f_rew(&al__1);*/
}
czhpmv_(iorder, uplo, &n, &alpha, &aa[1],
&xx[1], &incx, &beta, &yy[1], &
incy, (ftnlen)1);
&xx[1], &incx, &beta, &yy[1], &incy);
}
/* Check if error-exit was taken incorrectly. */
@@ -1798,13 +1790,13 @@ L130:
static doublereal errmax;
static doublecomplex transl;
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cztbmv_(integer*, char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cztbmv_(integer*, char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
static char transs[1];
extern /* Subroutine */ void cztbsv_(integer*, char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cztpmv_(integer*, char*, char*, char*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cztpsv_(integer*, char*, char*, char*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cztrmv_(integer*, char*, char*, char*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cztrsv_(integer*, char*, char*, char*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cztbsv_(integer*, char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
extern /* Subroutine */ void cztpmv_(integer*, char*, char*, char*, integer*, doublecomplex*, doublecomplex*, integer*);
extern /* Subroutine */ void cztpsv_(integer*, char*, char*, char*, integer*, doublecomplex*, doublecomplex*, integer*);
extern /* Subroutine */ void cztrmv_(integer*, char*, char*, char*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
extern /* Subroutine */ void cztrsv_(integer*, char*, char*, char*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
static integer laa, icd, lda, ict, icu;
static doublereal err;
extern logical lze_(doublecomplex*, doublecomplex*, integer*);
@@ -2014,8 +2006,7 @@ L130:
f_rew(&al__1);*/
}
cztrmv_(iorder, uplo, trans, diag, &n, &
aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
aa[1], &lda, &xx[1], &incx);
} else if (banded) {
if (*trace) {
/*
@@ -2029,8 +2020,7 @@ L130:
f_rew(&al__1);*/
}
cztbmv_(iorder, uplo, trans, diag, &n, &k,
&aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
&aa[1], &lda, &xx[1], &incx);
} else if (packed) {
if (*trace) {
/*
@@ -2044,8 +2034,7 @@ L130:
f_rew(&al__1);*/
}
cztpmv_(iorder, uplo, trans, diag, &n, &
aa[1], &xx[1], &incx, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
aa[1], &xx[1], &incx);
}
} else if (s_cmp(sname + 9, "sv", (ftnlen)2, (
ftnlen)2) == 0) {
@@ -2062,8 +2051,7 @@ L130:
f_rew(&al__1);*/
}
cztrsv_(iorder, uplo, trans, diag, &n, &
aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
aa[1], &lda, &xx[1], &incx);
} else if (banded) {
if (*trace) {
/*
@@ -2077,8 +2065,7 @@ L130:
f_rew(&al__1);*/
}
cztbsv_(iorder, uplo, trans, diag, &n, &k,
&aa[1], &lda, &xx[1], &incx, (
ftnlen)1, (ftnlen)1, (ftnlen)1);
&aa[1], &lda, &xx[1], &incx);
} else if (packed) {
if (*trace) {
/*
@@ -2092,8 +2079,7 @@ L130:
f_rew(&al__1);*/
}
cztpsv_(iorder, uplo, trans, diag, &n, &
aa[1], &xx[1], &incx, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
aa[1], &xx[1], &incx);
}
}
@@ -2644,11 +2630,11 @@ L150:
static logical isame[13];
extern /* Subroutine */ int zmake_(char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, integer*, integer*, logical*, doublecomplex*, ftnlen, ftnlen, ftnlen);
static integer nargs;
extern /* Subroutine */ void czher_(integer*, char*, integer*, doublereal*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen);
extern /* Subroutine */ void czher_(integer*, char*, integer*, doublereal*, doublecomplex*, integer*, doublecomplex*, integer*);
static logical reset;
static char cuplo[14];
static integer incxs;
extern /* Subroutine */ void czhpr_(integer*, char*, integer*, doublereal*, doublecomplex*, integer*, doublecomplex*, ftnlen);
extern /* Subroutine */ void czhpr_(integer*, char*, integer*, doublereal*, doublecomplex*, integer*, doublecomplex*);
extern /* Subroutine */ int zmvch_(char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublereal*, doublecomplex*, doublereal*, doublereal*, logical*, integer*, logical*, ftnlen);
static logical upper;
static char uplos[1];
@@ -2817,8 +2803,7 @@ L150:
al__1.aunit = *ntra;
f_rew(&al__1);*/
}
czher_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[
1], &lda, (ftnlen)1);
czher_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[1], &lda);
} else if (packed) {
if (*trace) {
/*
@@ -2831,8 +2816,7 @@ L150:
al__1.aunit = *ntra;
f_rew(&al__1);*/
}
czhpr_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[
1], (ftnlen)1);
czhpr_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[1]);
}
/* Check if error-exit was taken incorrectly. */
@@ -3011,8 +2995,8 @@ L130:
extern /* Subroutine */ int zmvch_(char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublereal*, doublecomplex*, doublereal*, doublereal*, logical*, integer*, logical*, ftnlen);
static logical upper;
static char uplos[1];
extern /* Subroutine */ void czher2_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen);
extern /* Subroutine */ void czhpr2_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, ftnlen);
extern /* Subroutine */ void czher2_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
extern /* Subroutine */ void czhpr2_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*);
static integer ia, ja, ic, nc, jj, lj, in;
static logical packed;
static integer ix, iy, ns, lx, ly;
@@ -3208,7 +3192,7 @@ L130:
f_rew(&al__1);*/
}
czher2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
yy[1], &incy, &aa[1], &lda, (ftnlen)1);
yy[1], &incy, &aa[1], &lda);
} else if (packed) {
if (*trace) {
/*
@@ -3222,7 +3206,7 @@ L130:
f_rew(&al__1);*/
}
czhpr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
yy[1], &incy, &aa[1], (ftnlen)1);
yy[1], &incy, &aa[1]);
}
/* Check if error-exit was taken incorrectly. */
+20 -27
View File
@@ -25,11 +25,9 @@ typedef struct { doublereal r, i; } doublecomplex;
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
@@ -314,7 +312,7 @@ static logical c_false = FALSE_;
static logical rorder;
static integer layout;
static logical ltestt, tsterr;
extern /* Subroutine */ int cz3chke_(char*, ftnlen);
extern /* Subroutine */ void cz3chke_(char*);
static doublecomplex alf[7], bet[7];
static doublereal eps, err;
extern logical lze_(doublecomplex*, doublecomplex*, integer*);
@@ -679,7 +677,7 @@ L80:
ftnlen)12);
/* Test error exits. */
if (tsterr) {
cz3chke_(snames[isnum - 1], (ftnlen)12);
cz3chke_(snames[isnum - 1]);
}
/* Test computations. */
infoc_1.infot = 0;
@@ -831,7 +829,7 @@ L230:
static integer ia, ib;
extern /* Subroutine */ int zprcn1_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, integer*, doublecomplex*, integer*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
static integer ma, mb, na, nb, nc, ik, im, in, ks, ms, ns;
extern /* Subroutine */ void czgemm_(integer*, char*, char*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czgemm_(integer*, char*, char*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static char tranas[1], tranbs[1], transa[1], transb[1];
static doublereal errmax;
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
@@ -1047,8 +1045,7 @@ L230:
}
czgemm_(iorder, transa, transb, &m, &n, &k, &
alpha, &aa[1], &lda, &bb[1], &ldb, &
beta, &cc[1], &ldc, (ftnlen)1, (
ftnlen)1);
beta, &cc[1], &ldc);
/* Check if error-exit was taken incorrectly. */
@@ -1242,10 +1239,10 @@ return 0;
static integer ia, ib;
extern /* Subroutine */ int zprcn2_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, doublecomplex*, integer*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
static integer na, nc, im, in, ms, ns;
extern /* Subroutine */ void czhemm_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czhemm_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static doublereal errmax;
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czsymm_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czsymm_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static integer laa, lbb, lda, lcc, ldb, ldc, ics;
static doublecomplex als, bls;
static integer icu;
@@ -1438,11 +1435,11 @@ return 0;
if (isconj) {
czhemm_(iorder, side, uplo, &m, &n, &alpha, &
aa[1], &lda, &bb[1], &ldb, &beta, &cc[
1], &ldc, (ftnlen)1, (ftnlen)1);
1], &ldc);
} else {
czsymm_(iorder, side, uplo, &m, &n, &alpha, &
aa[1], &lda, &bb[1], &ldb, &beta, &cc[
1], &ldc, (ftnlen)1, (ftnlen)1);
1], &ldc);
}
/* Check if error-exit was taken incorrectly. */
@@ -1641,8 +1638,8 @@ return 0;
static char tranas[1], transa[1];
static doublereal errmax;
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void cztrmm_(integer*, char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cztrsm_(integer*, char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
extern /* Subroutine */ void cztrmm_(integer*, char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
extern /* Subroutine */ void cztrsm_(integer*, char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
static integer laa, icd, lbb, lda, ldb, ics;
static doublecomplex als;
static integer ict, icu;
@@ -1828,8 +1825,7 @@ return 0;
}
cztrmm_(iorder, side, uplo, transa, diag,
&m, &n, &alpha, &aa[1], &lda, &bb[
1], &ldb, (ftnlen)1, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
1], &ldb);
} else if (s_cmp(sname + 9, "sm", (ftnlen)2, (
ftnlen)2) == 0) {
if (*trace) {
@@ -1846,8 +1842,7 @@ return 0;
}
cztrsm_(iorder, side, uplo, transa, diag,
&m, &n, &alpha, &aa[1], &lda, &bb[
1], &ldb, (ftnlen)1, (ftnlen)1, (
ftnlen)1, (ftnlen)1);
1], &ldb);
}
/* Check if error-exit was taken incorrectly. */
@@ -2119,11 +2114,11 @@ return 0;
extern /* Subroutine */ int zprcn6_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
static integer ik, in, jj, lj, ks, ns;
static doublereal ralpha;
extern /* Subroutine */ int czherk_(integer*, char*, char*, integer*, integer*, doublereal*, doublecomplex*, integer*, doublereal*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czherk_(integer*, char*, char*, integer*, integer*, doublereal*, doublecomplex*, integer*, doublereal*, doublecomplex*, integer*);
static doublereal errmax;
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
static char transs[1], transt[1];
extern /* Subroutine */ int czsyrk_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czsyrk_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static integer laa, lda, lcc, ldc;
static doublecomplex als;
static integer ict, icu;
@@ -2319,8 +2314,7 @@ return 0;
f_rew(&al__1);*/
}
czherk_(iorder, uplo, trans, &n, &k, &ralpha,
&aa[1], &lda, &rbeta, &cc[1], &ldc, (
ftnlen)1, (ftnlen)1);
&aa[1], &lda, &rbeta, &cc[1], &ldc);
} else {
if (*trace) {
zprcn4_(ntra, &nc, sname, iorder, uplo,
@@ -2334,8 +2328,7 @@ return 0;
f_rew(&al__1);*/
}
czsyrk_(iorder, uplo, trans, &n, &k, &alpha, &
aa[1], &lda, &beta, &cc[1], &ldc, (
ftnlen)1, (ftnlen)1);
aa[1], &lda, &beta, &cc[1], &ldc);
}
/* Check if error-exit was taken incorrectly. */
@@ -2615,11 +2608,11 @@ return 0;
static doublereal errmax;
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
static char transs[1], transt[1];
extern /* Subroutine */ int czher2k_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublereal*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czher2k_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublereal*, doublecomplex*, integer*);
static integer laa, lbb, lda, lcc, ldb, ldc;
static doublecomplex als;
static integer ict, icu;
extern /* Subroutine */ int czsyr2k_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
extern /* Subroutine */ void czsyr2k_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
static doublereal err;
extern logical lze_(doublecomplex*, doublecomplex*, integer*);
@@ -2830,7 +2823,7 @@ return 0;
}
czher2k_(iorder, uplo, trans, &n, &k, &alpha,
&aa[1], &lda, &bb[1], &ldb, &rbeta, &
cc[1], &ldc, (ftnlen)1, (ftnlen)1);
cc[1], &ldc);
} else {
if (*trace) {
zprcn5_(ntra, &nc, sname, iorder, uplo,
@@ -2845,7 +2838,7 @@ return 0;
}
czsyr2k_(iorder, uplo, trans, &n, &k, &alpha,
&aa[1], &lda, &bb[1], &ldb, &beta, &
cc[1], &ldc, (ftnlen)1, (ftnlen)1);
cc[1], &ldc);
}
/* Check if error-exit was taken incorrectly. */
Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

+13 -1
View File
@@ -13,7 +13,9 @@ This page documents those non-standard APIs.
| ?omatcopy | s,d,c,z | out-of-place transposition/copying |
| ?geadd | s,d,c,z | ATLAS-like matrix add `B = &alpha;*A+&beta;*B` |
| ?gemmt | s,d,c,z | `gemm` but only a triangular part updated |
| cblas_?gemm_batch | s,d,c,z,b | `gemm` with several groups of input data
|
| cblas_?gemm_batch_strided | s,d,c,z,b | `gemm` with groups of data stored at fixed offsets in the input arrays
## bfloat16 functionality
@@ -26,6 +28,15 @@ BLAS-like and conversion functions for `bfloat16` (available when OpenBLAS was c
* `float cblas_sbdot` computes the dot product of two bfloat16 arrays
* `void cblas_sbgemv` performs the matrix-vector operations of GEMV with the input matrix and X vector as bfloat16
* `void cblas_sbgemm` performs the matrix-matrix operations of GEMM with both input arrays containing bfloat16
* `void cblas_bgemv` performs the matrix-vector operations of GEMV with the input matrix, X vector and result as bfloat16
* `void cblas_bgemm` performs the matrix-matrix operations of GEMM with both input arrays containing bfloat16 and the output being bfloat16 as well
## half-precision float or fp16 functionality
BLAS-like and conversion functions for `hfloat16` (available when OpenBLAS was compiled with `BUILD_HFLOAT16=1`):
* `void cblas_shgemm` performs the matrix-matrix operations of GEMM with both input arrays containing hfloat16
## Utility functions
@@ -36,4 +47,5 @@ BLAS-like and conversion functions for `bfloat16` (available when OpenBLAS was c
* `char * openblas_get_config()` returns the options OpenBLAS was built with, something like `NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell`
* `int openblas_set_affinity(int thread_index, size_t cpusetsize, cpu_set_t *cpuset)` sets the CPU affinity mask of the given thread
to the provided cpuset. Only available on Linux, with semantics identical to `pthread_setaffinity_np`.
* `openblas_set_thread_callback_function` overrides the default multithreading backend with the provided argument
+12 -6
View File
@@ -47,7 +47,8 @@ You can find the full list of modifications in Changelog.txt.
The detailed explanation is probably in the original publication authored by Kazushige Goto - Goto, Kazushige; van de Geijn, Robert A; Anatomy of high-performance matrix multiplication. ACM Transactions on Mathematical Software (TOMS). Volume 34 Issue 3, May 2008
While this article is paywalled and too old for preprints to be available on arxiv.org, more recent
publications like https://arxiv.org/pdf/1609.00076 contain at least a brief description of the algorithm.
In practice, the values are derived by experimentation to yield the block sizes that give the highest performance. A general rule of thumb for selecting a starting point seems to be that PxQ is about half the size of L2 cache.
In practice, the values are derived by experimentation to yield the block sizes that give the highest performance. A general rule of thumb for selecting a starting point seems to be that PxQ is about half the size of L2 cache. R needs to be greater than the bigger of P and Q by
at least 64, or bad things will happen with the work splitting in (at least) POTRF.
### <a name="reportbug"></a>How can I report a bug?
@@ -91,7 +92,7 @@ like Intel Haswell. There once was an effort to build an OpenCL implementation t
We obtained a performance comparable with Intel MKL that actually outperformed Intel MKL in some cases.
Here is the result of the DGEMM subroutine's performance on Intel Core i5-2500K Windows 7 SP1 64-bit:
![Single Thread DGEMM Performance on Intel Desktop Sandy Bridge](http://xianyi.github.com/OpenBLAS/dgemm_snb_1thread.png)
![Single Thread DGEMM Performance on Intel Desktop Sandy Bridge](dgemm_snb_1thread.png)
<hr noshade="noshade">
@@ -220,8 +221,8 @@ lead to compiler error messages about an "ABI change" when compiling AVX512 code
### <a name="ppcxl"></a>Building OpenBLAS on POWER fails with IBM XL
Trying to compile OpenBLAS with IBM XL ends with error messages about unknown register names
like "vs32". Working around these by using known alternate names for the vector registers only leads to another assembler error about unsupported constraints. This is a known deficiency in the IBM compiler at least up to and including 16.1.0 (and in the POWER version of clang, from which it is derived) - use gcc instead. (See issues #1078
and #1699 for related discussions)
like "vs32". Working around these by using known alternate names for the vector registers only leads to another assembler error about unsupported constraints. This is a known deficiency in the IBM compiler at least up to and including 16.1.0 (and in the POWER version of clang, from which it is derived) - use gcc instead. (See issues [#1078](https://github.com/OpenMathLib/OpenBLAS/issues/1078)
and [#1699](https://github.com/OpenMathLib/OpenBLAS/issues/1699) for related discussions)
### <a name="debianlts"></a>Replacing system BLAS/updating APT OpenBLAS in Mint/Ubuntu/Debian
@@ -268,7 +269,7 @@ path (usually either /usr/local/include, /opt/OpenBLAS/include or whatever you s
This is due to different interpretations of the (informal) standard for passing characters as arguments between C and FORTRAN functions. As the method for storing text differs in the two languages, when C calls Fortran the text length is passed as an "invisible" additional parameter.
Historically, this has not been required when the text is just a single character, so older code like the Reference-LAPACK bundled with OpenBLAS
does not do it. Recently gcc's checking has changed to require it, but there is no consensus yet if and how the existing LAPACK (and many other codebases) should adapt. (And for actual compilation, gcc has mostly backtracked and provided compatibility options - hence the default build settings in the OpenBLAS Makefiles add -fno-optimize-sibling-calls to the gfortran options to prevent miscompilation with "affected" versions. See ticket 2154 in the issue tracker for more details and links)
does not do it. Recently gcc's checking has changed to require it, but there is no consensus yet if and how the existing LAPACK (and many other codebases) should adapt. (And for actual compilation, gcc has mostly backtracked and provided compatibility options - hence the default build settings in the OpenBLAS Makefiles add -fno-optimize-sibling-calls to the gfortran options to prevent miscompilation with "affected" versions. See ticket [#2154](https://github.com/OpenMathLib/OpenBLAS/issues/2154) in the issue tracker for more details and links)
<hr noshade="noshade">
### <a name="newcpu"></a>Build fails with lots of errors about undefined ?GEMM_UNROLL_M
@@ -344,7 +345,12 @@ Multithreading support in OpenBLAS requires the use of internal buffers for shar
If you get a message "error while loading shared libraries: libopenblas.so.0: ELF load command address/offset not properly aligned" when starting a program that is (dynamically) linked to OpenBLAS, this is very likely due to a bug in the GNU linker (ld) that is part of the
GNU binutils package. This error was specifically observed on older versions of Ubuntu Linux updated with the (at the time) most recent binutils version 2.38, but an internet search turned up sporadic reports involving various other libraries dating back several years. A bugfix was created by the binutils developers and should be available in later versions of binutils.(See issue 3708 for details)
#### <a name="OpenMP"></a>Using OpenBLAS with OpenMP
### <a name="CallingConvention"></a>The tests work fine, but calling any complex function from my code produces wrong or no results
This is almost certainly a problem with the calling convention used, in particular with the way the computed result is transported back to the caller. By default, OpenBLAS follows the F2C convention of returning the result on the stack rather than as the first argument to the function. So if your code has a prototype like "void cdotu ( complex *res, int n,...)" change it to "complex cdotu (int n,...)". Better yet,
use the CBLAS interface rather than the Fortran one.
### <a name="OpenMP"></a>Using OpenBLAS with OpenMP
OpenMP provides its own locking mechanisms, so when your code makes BLAS/LAPACK calls from inside OpenMP parallel regions it is imperative
that you use an OpenBLAS that is built with USE_OPENMP=1, as otherwise deadlocks might occur. Furthermore, OpenBLAS will automatically restrict itself to using only a single thread when called from an OpenMP parallel region. When it is certain that calls will only occur
+29 -12
View File
@@ -217,8 +217,11 @@ in this section, since the process for each is quite different.
For Visual Studio, you can use CMake to generate Visual Studio solution files;
note that you will need at least CMake 3.11 for linking to work correctly).
Note that you need a Fortran compiler if you plan to build and use the LAPACK
functions included with OpenBLAS. The sections below describe using either
Note that you need a Fortran compiler if you plan to build and use the latest version
of the LAPACK functions included with OpenBLAS. (If you do not have a Fortran compiler
installed, you can build an older version of the LAPACK sources that has been converted
to C - but its performance will likely be slower and accuracy may be poorer too.)
The sections below describe using either
`flang` as an add-on to clang/LLVM or `gfortran` as part of MinGW for this
purpose. If you want to use the Intel Fortran compiler (`ifort` or `ifx`) for
this, be sure to also use the Intel C compiler (`icc` or `icx`) for building
@@ -226,21 +229,22 @@ the C parts, as the ABI imposed by `ifort` is incompatible with MSVC
A fully-optimized OpenBLAS that can be statically or dynamically linked to your
application can currently be built for the 64-bit architecture with the LLVM
compiler infrastructure. We're going to use [Miniconda3](https://docs.anaconda.com/miniconda/)
compiler infrastructure. We're going to use [Miniforge3] the pre-configured
and more versatile alternative to [Miniconda](https://docs.anaconda.com/miniconda/)
to grab all of the tools we need, since some of them are in an experimental
status. Before you begin, you'll need to have Microsoft Visual Studio 2015 or
newer installed.
1. Install Miniconda3 for 64-bit Windows using `winget install --id Anaconda.Miniconda3`,
or easily download from [conda.io](https://docs.conda.io/en/latest/miniconda.html).
2. Open the "Anaconda Command Prompt" now available in the Start Menu, or at `%USERPROFILE%\miniconda3\shell\condabin\conda-hook.ps1`.
1. Install Miniforge for 64-bit Windows with the latest version of the installer Miniforge3-Windows-x86_64.exe
available on [github.com](https://github.com/conda-forge/miniforge/releases/)
2. Open the "Miniforge Command Prompt" now available in the Start Menu, or at `%USERPROFILE%\miniforge3\shell\condabin\conda-hook.ps1`.
3. In that command prompt window, use `cd` to change to the directory where you want to build OpenBLAS.
4. Now install all of the tools we need:
```
conda update -n base conda
conda config --add channels conda-forge
conda install -y cmake flang clangdev perl libflang ninja
conda install -y cmake flang_win-64 clangdev perl libflang ninja
```
(if you want to build with OpenMP support, add `llvm-openmp` and `llvm-openmp-fortran`)
5. Still in the Anaconda Command Prompt window, activate the 64-bit MSVC environment with `vcvarsall x64`.
On Windows 11 with Visual Studio 2022, this would be done by invoking:
@@ -439,6 +443,10 @@ To then use the built OpenBLAS shared library in Visual Studio:
### Windows on Arm
If you want to use a regular x64 Windows build of OpenBLAS with x64 software in the Prism emulator, be sure to use the latest version of Prism, and to check the box
to "Disable floating point optimization" in the Emulation settings. (Right-click on the executable to open "Properties", then on the "Compatibility" tab click on
"Change emulation settings").
A fully functional native OpenBLAS for WoA that can be built as both a static and dynamic library using LLVM toolchain and Visual Studio 2022. Before starting to build, make sure that you have installed Visual Studio 2022 on your ARM device, including the "Desktop Development with C++" component (that contains the cmake tool).
(Note that you can use the free "Visual Studio 2022 Community Edition" for this task. In principle it would be possible to build with VisualStudio alone, but using
the LLVM toolchain enables native compilation of the Fortran sources of LAPACK and of all the optimized assembly files, which VisualStudio cannot handle on its own)
@@ -623,14 +631,22 @@ Note: using `TARGET=CORTEXA57` in place of `ARMV8` will pick up better
optimized routines. Implementations for the `CORTEXA57` target are compatible
with all other `ARMV8` targets.
Note: for NDK 23b, something as simple as:
Note: for NDK 23b and later, something as simple as:
```bash
export PATH=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/:$PATH
make HOSTCC=gcc CC=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang ONLY_CBLAS=1 TARGET=ARMV8
make HOSTCC=gcc CC=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang ONLY_CBLAS=1 TARGET=ARMV8 RANLIB=echo
```
appears to be sufficient on Linux. On OSX, setting AR to the ar provided in the
"bin" path of the NDK (probably `llvm-ar`) is also necessary.
If you prefer building with CMake, running
```bash
cmake -DANDROID_ABI=arm64-v8a -DTARGET=ARMV8 -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-r27/build/cmake/android.toolchain.cmake -DNOFORTRAN=1 -DANDROID_PLATFORM=android-23 ..
cmake --build .
```
in your build directory should work (be sure to adjust the toolchain_file argument according to where you installed the NDK, and the ANDROID_PLATFORM
according to the minimum version of Android you want to support. (If you leave out the ANDROID_PLATFORM parameter, the build will fail with an error
message about a missing declaration or missing header file complex.h)
??? note "Alternative build script for 3 architectures"
@@ -700,9 +716,10 @@ fully working OpenBLAS for this platform.
Go to the directory where you unpacked OpenBLAS,and enter the following commands:
```bash
CC=/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
CFLAGS= -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk -arch arm64 -miphoneos-version-min=10.0
SDKROOT="$(xcrun --sdk iphoneos --show-sdk-path)"
CFLAGS="-O2 -Wno-macro-redefined -isysroot $SDKROOT -arch arm64 -miphoneos-version-min=10.0"
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
```
+1 -1
View File
@@ -30,7 +30,7 @@ OpenBLAS checks the following environment variables on startup:
cache where it is not reported correctly (in virtual environments)
Deprecated variables still recognized for compatibilty:
Deprecated variables still recognized for compatibility:
* `GOTO_NUM_THREADS`: equivalent to `OPENBLAS_NUM_THREADS`
* `GOTOBLAS_MAIN_FREE`: equivalent to `OPENBLAS_MAIN_FREE`
+9
View File
@@ -202,6 +202,15 @@ if (BUILD_BFLOAT16)
if (USE_THREAD)
GenerateNamedObjects("sbgemv_thread.c" "" "gemv_thread_n" false "" "" false "BFLOAT16")
GenerateNamedObjects("sbgemv_thread.c" "TRANSA" "gemv_thread_t" false "" "" false "BFLOAT16")
GenerateNamedObjects("sbgemv_thread.c" "BGEMM;BFLOAT16" "bgemv_thread_n" false "" "" true "")
GenerateNamedObjects("sbgemv_thread.c" "BGEMM;BFLOAT16;TRANSA" "bgemv_thread_t" false "" "" true "")
endif ()
endif ()
if (BUILD_HFLOAT16)
if (USE_THREAD)
GenerateNamedObjects("sbgemv_thread.c" "" "gemv_thread_n" false "" "" false "HFLOAT16")
GenerateNamedObjects("sbgemv_thread.c" "TRANSA" "gemv_thread_t" false "" "" false "HFLOAT16")
endif ()
endif ()
+48
View File
@@ -1,3 +1,31 @@
###############################################################################
# Copyright (c) 2025 The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
TOPDIR = ../..
include ../../Makefile.system
@@ -422,7 +450,16 @@ XBLASOBJS += \
xtbmv_thread_CUU.$(SUFFIX) xtbmv_thread_CUN.$(SUFFIX) \
xtbmv_thread_CLU.$(SUFFIX) xtbmv_thread_CLN.$(SUFFIX)
ifeq ($(BUILD_HFLOAT16),1)
SHBLASOBJS += \
shgemv_thread_n$(TSUFFIX).$(SUFFIX) \
shgemv_thread_t$(TSUFFIX).$(SUFFIX)
endif
ifeq ($(BUILD_BFLOAT16),1)
BBLASOBJS += \
bgemv_thread_n$(TSUFFIX).$(SUFFIX) \
bgemv_thread_t$(TSUFFIX).$(SUFFIX)
SBBLASOBJS += \
sbgemv_thread_n$(TSUFFIX).$(SUFFIX) \
sbgemv_thread_t$(TSUFFIX).$(SUFFIX)
@@ -3706,7 +3743,18 @@ xtrsv_CUU.$(SUFFIX) xtrsv_CUU.$(PSUFFIX) : ztrsv_L.c ../../param.h
xtrsv_CUN.$(SUFFIX) xtrsv_CUN.$(PSUFFIX) : ztrsv_L.c ../../param.h
$(CC) -c $(CFLAGS) -DXDOUBLE -DCOMPLEX -DTRANSA=4 -UUNIT $< -o $(@F)
ifeq ($(BUILD_HFLOAT16),1)
shgemv_thread_n.$(SUFFIX) shgemv_thread_n.$(PSUFFIX) : sbgemv_thread.c ../../common.h
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
shgemv_thread_t.$(SUFFIX) shgemv_thread_t.$(PSUFFIX) : sbgemv_thread.c ../../common.h
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -DTRANSA -UCONJ -UXCONJ $< -o $(@F)
endif
ifeq ($(BUILD_BFLOAT16),1)
bgemv_thread_n.$(SUFFIX) bgemv_thread_n.$(PSUFFIX) : sbgemv_thread.c ../../common.h
$(CC) -c $(CFLAGS) -DBGEMM -UCOMPLEX -UDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
bgemv_thread_t.$(SUFFIX) bgemv_thread_t.$(PSUFFIX) : sbgemv_thread.c ../../common.h
$(CC) -c $(CFLAGS) -DBGEMM -UCOMPLEX -UDOUBLE -DTRANSA -UCONJ -UXCONJ $< -o $(@F)
sbgemv_thread_n.$(SUFFIX) sbgemv_thread_n.$(PSUFFIX) : sbgemv_thread.c ../../common.h
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
sbgemv_thread_t.$(SUFFIX) sbgemv_thread_t.$(PSUFFIX) : sbgemv_thread.c ../../common.h
+10 -9
View File
@@ -1,4 +1,5 @@
/*********************************************************************/
/* Copyright 2025 The OpenBLAS Project. */
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
@@ -41,21 +42,21 @@
#include "common.h"
#ifndef TRANSA
#define SBGEMV SBGEMV_N
#define GEMV GEMV_N
#else
#define SBGEMV SBGEMV_T
#define GEMV GEMV_T
#endif
static int sbgemv_kernel(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *dummy1, FLOAT *dummy2, BLASLONG dummy3){
bfloat16 *a, *x;
float *y;
IFLOAT *a, *x;
FLOAT *y;
BLASLONG lda, incx, incy;
BLASLONG m_from, m_to, n_from, n_to;
a = (bfloat16 *)args->a;
x = (bfloat16 *)args->b;
y = (float *)args->c;
a = (IFLOAT *)args->a;
x = (IFLOAT *)args->b;
y = (FLOAT *)args->c;
lda = args->lda;
incx = args->ldb;
@@ -77,12 +78,12 @@ static int sbgemv_kernel(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
y += n_from * incy;
#endif
SBGEMV(m_to - m_from, n_to - n_from, *((FLOAT *)(args->alpha)), a, lda, x, incx, *((FLOAT *)(args->beta)), y, incy);
GEMV(m_to - m_from, n_to - n_from, *((FLOAT *)(args->alpha)), a, lda, x, incx, *((FLOAT *)(args->beta)), y, incy);
return 0;
}
int CNAME(BLASLONG m, BLASLONG n, float alpha, bfloat16 *a, BLASLONG lda, bfloat16 *x, BLASLONG incx, float beta, float *y, BLASLONG incy, int threads)
int CNAME(BLASLONG m, BLASLONG n, FLOAT alpha, IFLOAT *a, BLASLONG lda, IFLOAT *x, BLASLONG incx, FLOAT beta, FLOAT *y, BLASLONG incy, int threads)
{
blas_arg_t args;
blas_queue_t queue[MAX_CPU_NUMBER];
+8
View File
@@ -14,8 +14,16 @@ foreach (GEMM_DEFINE ${GEMM_DEFINES})
endif ()
if (BUILD_BFLOAT16)
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE}" "gemm_${GEMM_DEFINE_LC}" 0 "" "" false "BFLOAT16")
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE};BGEMM" "gemm_${GEMM_DEFINE_LC}" 0 "" "" false "BFLOAT16")
if (USE_THREAD AND NOT USE_SIMPLE_THREADED_LEVEL3)
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE};THREADED_LEVEL3" "gemm_thread_${GEMM_DEFINE_LC}" 0 "" "" false "BFLOAT16")
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE};THREADED_LEVEL3;BGEMM" "gemm_thread_${GEMM_DEFINE_LC}" 0 "" "" false "BFLOAT16")
endif ()
endif ()
if (BUILD_HFLOAT16)
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE}" "gemm_${GEMM_DEFINE_LC}" 0 "" "" false "HFLOAT16")
if (USE_THREAD AND NOT USE_SIMPLE_THREADED_LEVEL3)
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE};THREADED_LEVEL3" "gemm_thread_${GEMM_DEFINE_LC}" 0 "" "" false "HFLOAT16")
endif ()
endif ()
endforeach ()
+126 -16
View File
@@ -1,3 +1,32 @@
###############################################################################
# Copyright (c) 2025, The OpenBLAS Project
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the OpenBLAS project nor the names of
# its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###############################################################################
TOPDIR = ../..
include ../../Makefile.system
@@ -20,9 +49,14 @@ USE_GEMM3M = 1
endif
ifeq ($(BUILD_BFLOAT16),1)
BBLASOBJS += bgemm_nn.$(SUFFIX) bgemm_nt.$(SUFFIX) bgemm_tn.$(SUFFIX) bgemm_tt.$(SUFFIX)
SBBLASOBJS += sbgemm_nn.$(SUFFIX) sbgemm_nt.$(SUFFIX) sbgemm_tn.$(SUFFIX) sbgemm_tt.$(SUFFIX)
endif
ifeq ($(BUILD_HFLOAT16),1)
SHBLASOBJS += shgemm_nn.$(SUFFIX) shgemm_nt.$(SUFFIX) shgemm_tn.$(SUFFIX) shgemm_tt.$(SUFFIX)
endif
SBLASOBJS += \
sgemm_nn.$(SUFFIX) sgemm_nt.$(SUFFIX) sgemm_tn.$(SUFFIX) sgemm_tt.$(SUFFIX) \
strmm_LNUU.$(SUFFIX) strmm_LNUN.$(SUFFIX) strmm_LNLU.$(SUFFIX) strmm_LNLN.$(SUFFIX) \
@@ -208,8 +242,12 @@ COMMONOBJS += syrk_thread.$(SUFFIX)
ifneq ($(USE_SIMPLE_THREADED_LEVEL3), 1)
ifeq ($(BUILD_BFLOAT16),1)
BBLASOBJS += bgemm_thread_nn.$(SUFFIX) bgemm_thread_nt.$(SUFFIX) bgemm_thread_tn.$(SUFFIX) bgemm_thread_tt.$(SUFFIX)
SBBLASOBJS += sbgemm_thread_nn.$(SUFFIX) sbgemm_thread_nt.$(SUFFIX) sbgemm_thread_tn.$(SUFFIX) sbgemm_thread_tt.$(SUFFIX)
endif
ifeq ($(BUILD_HFLOAT16),1)
SHBLASOBJS += shgemm_thread_nn.$(SUFFIX) shgemm_thread_nt.$(SUFFIX) shgemm_thread_tn.$(SUFFIX) shgemm_thread_tt.$(SUFFIX)
endif
SBLASOBJS += sgemm_thread_nn.$(SUFFIX) sgemm_thread_nt.$(SUFFIX) sgemm_thread_tn.$(SUFFIX) sgemm_thread_tt.$(SUFFIX)
DBLASOBJS += dgemm_thread_nn.$(SUFFIX) dgemm_thread_nt.$(SUFFIX) dgemm_thread_tn.$(SUFFIX) dgemm_thread_tt.$(SUFFIX)
QBLASOBJS += qgemm_thread_nn.$(SUFFIX) qgemm_thread_nt.$(SUFFIX) qgemm_thread_tn.$(SUFFIX) qgemm_thread_tt.$(SUFFIX)
@@ -343,17 +381,41 @@ endif
all ::
bgemm_nn.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
bgemm_nt.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
bgemm_tn.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
bgemm_tt.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
sbgemm_nn.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
sbgemm_nt.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
sbgemm_tn.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
sbgemm_tt.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
shgemm_nn.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
shgemm_nt.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
shgemm_tn.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
shgemm_tt.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
sgemm_nn.$(SUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
@@ -550,17 +612,41 @@ gemm_thread_variable.$(SUFFIX) : gemm_thread_variable.c ../../common.h
beta_thread.$(SUFFIX) : beta_thread.c ../../common.h
$(CC) -c $(CFLAGS) $< -o $(@F)
bgemm_thread_nn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
bgemm_thread_nt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
bgemm_thread_tn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
bgemm_thread_tt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
sbgemm_thread_nn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
sbgemm_thread_nt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
sbgemm_thread_tn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
sbgemm_thread_tt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
shgemm_thread_nn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
shgemm_thread_nt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
shgemm_thread_tn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
shgemm_thread_tt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
sgemm_thread_nn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
@@ -2736,16 +2822,28 @@ xtrsm_RCLN.$(SUFFIX) : trsm_R.c
$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -DTRANSA -UUPPER -UUNIT -DCONJ $< -o $(@F)
sbgemm_nn.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
$(CC) $(PFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
sbgemm_nt.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
$(CC) $(PFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
sbgemm_tn.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
$(CC) $(PFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
sbgemm_tt.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
$(CC) $(PFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
shgemm_nn.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
shgemm_nt.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
shgemm_tn.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
shgemm_tt.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
sgemm_nn.$(PSUFFIX) : gemm.c level3.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
@@ -2959,16 +3057,28 @@ zgemm_batch_thread.$(SUFFIX) : gemm_batch_thread.c ../../common.h
sbgemm_thread_nn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
sbgemm_thread_nt.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
sbgemm_thread_tn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
sbgemm_thread_tt.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
shgemm_thread_nn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
shgemm_thread_nt.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
shgemm_thread_tn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
shgemm_thread_tt.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
sgemm_thread_nn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
+16
View File
@@ -59,6 +59,22 @@
#define GEMM_Q 128
#endif
#ifdef DYNAMIC_ARCH
#define DIVIDE_LIMIT gotoblas->divide_limit
#define DIVIDE_RATE gotoblas->divide_rate
#else
#define DIVIDE_LIMIT GEMM_DIVIDE_LIMIT
#define DIVIDE_RATE GEMM_DIVIDE_RATE
#endif
//#ifdef GEMM_DIVIDE_RATE
//#define DIVIDE_RATE GEMM_DIVIDE_RATE
//#endif
//#ifdef GEMM_DIVIDE_LIMIT
//#define DIVIDE_LIMIT GEMM_DIVIDE_LIMIT
//#endif
#ifdef THREADED_LEVEL3
#include "level3_thread.c"
#else
+19 -6
View File
@@ -1,5 +1,6 @@
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* Copyright 2025 The OpenBLAS Project. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
@@ -169,6 +170,22 @@
#define STOP_RPCC(COUNTER)
#endif
#if defined(BUILD_BFLOAT16)
#if defined(DYNAMIC_ARCH)
#if defined(BGEMM)
#define BFLOAT16_ALIGN_K gotoblas->bgemm_align_k
#else
#define BFLOAT16_ALIGN_K gotoblas->sbgemm_align_k
#endif
#else
#if defined(BGEMM)
#define BFLOAT16_ALIGN_K BGEMM_ALIGN_K
#else
#define BFLOAT16_ALIGN_K SBGEMM_ALIGN_K
#endif
#endif
#endif
int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
XFLOAT *sa, XFLOAT *sb, BLASLONG dummy){
BLASLONG k, lda, ldb, ldc;
@@ -305,12 +322,8 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
}
BLASLONG pad_min_l = min_l;
#if defined(HALF)
#if defined(DYNAMIC_ARCH)
pad_min_l = (min_l + gotoblas->sbgemm_align_k - 1) & ~(gotoblas->sbgemm_align_k-1);
#else
pad_min_l = (min_l + SBGEMM_ALIGN_K - 1) & ~(SBGEMM_ALIGN_K - 1);;
#endif
#if defined(BFLOAT16)
pad_min_l = (min_l + BFLOAT16_ALIGN_K - 1) & ~(BFLOAT16_ALIGN_K - 1);
#endif
/* First, we have to move data A to L2 cache */
+3 -2
View File
@@ -41,6 +41,7 @@
#define CACHE_LINE_SIZE 8
#endif
#define DIVIDE_RATE_MAX 2
#ifndef DIVIDE_RATE
#define DIVIDE_RATE 2
#endif
@@ -93,7 +94,7 @@ typedef struct {
#else
volatile
#endif
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE_MAX];
} job_t;
@@ -294,7 +295,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
FLOAT *a, *b, *c;
job_t *job = (job_t *)args -> common;
BLASLONG xxx, bufferside;
FLOAT *buffer[DIVIDE_RATE];
FLOAT *buffer[DIVIDE_RATE_MAX];
BLASLONG ls, min_l, jjs, min_jj;
BLASLONG is, min_i, div_n;
+75 -2
View File
@@ -41,6 +41,8 @@
#define CACHE_LINE_SIZE 8
#endif
#define DIVIDE_RATE_MAX 2
#ifndef DIVIDE_RATE
#define DIVIDE_RATE 2
#endif
@@ -69,7 +71,7 @@ _Atomic
#else
volatile
#endif
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE_MAX];
} job_t;
@@ -133,7 +135,7 @@ _Atomic
static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG mypos){
FLOAT *buffer[DIVIDE_RATE];
FLOAT *buffer[DIVIDE_RATE_MAX];
BLASLONG k, lda, ldc;
BLASLONG m_from, m_to, n_from, n_to;
@@ -504,6 +506,33 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG mypos){
#ifdef USE_OPENMP
static omp_lock_t level3_lock, critical_section_lock;
static volatile BLASULONG init_lock = 0, omp_lock_initialized = 0,
parallel_section_left = MAX_PARALLEL_NUMBER;
// Lock initialization; Todo : Maybe this part can be moved to blas_init() in blas_server_omp.c
while(omp_lock_initialized == 0)
{
blas_lock(&init_lock);
{
if(omp_lock_initialized == 0)
{
omp_init_lock(&level3_lock);
omp_init_lock(&critical_section_lock);
omp_lock_initialized = 1;
WMB;
}
blas_unlock(&init_lock);
}
}
#elif defined(OS_WINDOWS)
CRITICAL_SECTION level3_lock;
InitializeCriticalSection((PCRITICAL_SECTION)&level3_lock);
#else
static pthread_mutex_t level3_lock = PTHREAD_MUTEX_INITIALIZER;
#endif
blas_arg_t newarg;
#ifndef USE_ALLOC_HEAP
@@ -560,6 +589,30 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLO
#endif
#endif
#ifdef USE_OPENMP
omp_set_lock(&level3_lock);
omp_set_lock(&critical_section_lock);
parallel_section_left--;
/*
How OpenMP locks works with NUM_PARALLEL
1) parallel_section_left = Number of available concurrent executions of OpenBLAS - Number of currently executing OpenBLAS executions
2) level3_lock is acting like a master lock or barrier which stops OpenBLAS calls when all the parallel_section are currently busy executing other OpenBLAS calls
3) critical_section_lock is used for updating variables shared between threads executing OpenBLAS calls concurrently and for unlocking of master lock whenever required
4) Unlock master lock only when we have not already exhausted all the parallel_sections and allow another thread with a OpenBLAS call to enter
*/
if(parallel_section_left != 0)
omp_unset_lock(&level3_lock);
omp_unset_lock(&critical_section_lock);
#elif defined(OS_WINDOWS)
EnterCriticalSection((PCRITICAL_SECTION)&level3_lock);
#else
pthread_mutex_lock(&level3_lock);
#endif
newarg.m = args -> m;
newarg.n = args -> n;
newarg.k = args -> k;
@@ -706,5 +759,25 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLO
free(job);
#endif
#ifdef USE_OPENMP
omp_set_lock(&critical_section_lock);
parallel_section_left++;
/*
Unlock master lock only when all the parallel_sections are already exhausted and one of the thread has completed its OpenBLAS call
otherwise just increment the parallel_section_left
The master lock is only locked when we have exhausted all the parallel_sections, So only unlock it then and otherwise just increment the count
*/
if(parallel_section_left == 1)
omp_unset_lock(&level3_lock);
omp_unset_lock(&critical_section_lock);
#elif defined(OS_WINDOWS)
LeaveCriticalSection((PCRITICAL_SECTION)&level3_lock);
#else
pthread_mutex_unlock(&level3_lock);
#endif
return 0;
}
+56 -34
View File
@@ -1,6 +1,6 @@
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* Copyright 2023 The OpenBLAS Project. */
/* Copyright 2023, 2025 The OpenBLAS Project. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
@@ -41,12 +41,17 @@
#define CACHE_LINE_SIZE 8
#endif
#define DIVIDE_RATE_MAX 2
#ifndef DIVIDE_RATE
#define DIVIDE_RATE 2
#endif
#ifndef GEMM_PREFERED_SIZE
#define GEMM_PREFERED_SIZE 1
#ifdef DYNAMIC_ARCH
#define GEMM_PREFERRED_SIZE gotoblas->preferred_size
#endif
#ifndef GEMM_PREFERRED_SIZE
#define GEMM_PREFERRED_SIZE 1
#endif
//The array of job_t may overflow the stack.
@@ -93,7 +98,7 @@
typedef struct {
volatile
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE_MAX];
} job_t;
@@ -216,9 +221,25 @@ typedef struct {
#define STOP_RPCC(COUNTER)
#endif
#if defined(BUILD_BFLOAT16)
#if defined(DYNAMIC_ARCH)
#if defined(BGEMM)
#define BFLOAT16_ALIGN_K gotoblas->bgemm_align_k
#else
#define BFLOAT16_ALIGN_K gotoblas->sbgemm_align_k
#endif
#else
#if defined(BGEMM)
#define BFLOAT16_ALIGN_K BGEMM_ALIGN_K
#else
#define BFLOAT16_ALIGN_K SBGEMM_ALIGN_K
#endif
#endif
#endif
static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, IFLOAT *sa, IFLOAT *sb, BLASLONG mypos){
IFLOAT *buffer[DIVIDE_RATE];
IFLOAT *buffer[DIVIDE_RATE_MAX];
BLASLONG k, lda, ldb, ldc;
BLASLONG m_from, m_to, n_from, n_to;
@@ -230,6 +251,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
BLASLONG nthreads_m;
BLASLONG mypos_m, mypos_n;
BLASLONG divide_rate = DIVIDE_RATE;
BLASLONG is, js, ls, bufferside, jjs;
BLASLONG min_i, min_l, div_n, min_jj;
@@ -264,6 +286,11 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
alpha = (FLOAT *)args -> alpha;
beta = (FLOAT *)args -> beta;
/* Disable divide_rate when N of all threads are less than to DIVIDE_LIMIT */
#ifdef DIVIDE_LIMIT
if (N < DIVIDE_LIMIT) divide_rate = 1;
#endif
/* Initialize 2D CPU distribution */
nthreads_m = args -> nthreads;
if (range_m) {
@@ -305,9 +332,9 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
) return 0;
/* Initialize workspace for local region of B */
div_n = (n_to - n_from + DIVIDE_RATE - 1) / DIVIDE_RATE;
div_n = (n_to - n_from + divide_rate - 1) / divide_rate;
buffer[0] = sb;
for (i = 1; i < DIVIDE_RATE; i++) {
for (i = 1; i < divide_rate; i++) {
buffer[i] = buffer[i - 1] + GEMM_Q * ((div_n + GEMM_UNROLL_N - 1)/GEMM_UNROLL_N) * GEMM_UNROLL_N * COMPSIZE;
}
@@ -324,12 +351,8 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
BLASLONG pad_min_l = min_l;
#if defined(HALF)
#if defined(DYNAMIC_ARCH)
pad_min_l = (min_l + gotoblas->sbgemm_align_k - 1) & ~(gotoblas->sbgemm_align_k-1);
#else
pad_min_l = (min_l + SBGEMM_ALIGN_K - 1) & ~(SBGEMM_ALIGN_K - 1);;
#endif
#if defined(BFLOAT16)
pad_min_l = (min_l + BFLOAT16_ALIGN_K - 1) & ~(BFLOAT16_ALIGN_K - 1);
#endif
/* Determine step size in m
@@ -353,7 +376,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
STOP_RPCC(copy_A);
/* Copy local region of B into workspace and apply kernel */
div_n = (n_to - n_from + DIVIDE_RATE - 1) / DIVIDE_RATE;
div_n = (n_to - n_from + divide_rate - 1) / divide_rate;
for (js = n_from, bufferside = 0; js < n_to; js += div_n, bufferside ++) {
/* Make sure if no one is using workspace */
@@ -422,7 +445,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
if (current >= (mypos_n + 1) * nthreads_m) current = mypos_n * nthreads_m;
/* Split other region of B into parts */
div_n = (range_n[current + 1] - range_n[current] + DIVIDE_RATE - 1) / DIVIDE_RATE;
div_n = (range_n[current + 1] - range_n[current] + divide_rate - 1) / divide_rate;
for (js = range_n[current], bufferside = 0; js < range_n[current + 1]; js += div_n, bufferside ++) {
if (current != mypos) {
@@ -473,7 +496,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
do {
/* Split region of B into parts and apply kernel */
div_n = (range_n[current + 1] - range_n[current] + DIVIDE_RATE - 1) / DIVIDE_RATE;
div_n = (range_n[current + 1] - range_n[current] + divide_rate - 1) / divide_rate;
for (js = range_n[current], bufferside = 0; js < range_n[current + 1]; js += div_n, bufferside ++) {
/* Apply kernel with local region of A and part of region of B */
@@ -508,7 +531,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
/* Wait until all other threads are done with local region of B */
START_RPCC();
for (i = 0; i < args -> nthreads; i++) {
for (js = 0; js < DIVIDE_RATE; js++) {
for (js = 0; js < divide_rate; js++) {
while (job[mypos].working[i][CACHE_LINE_SIZE * js] ) {YIELDING;};
}
}
@@ -570,8 +593,6 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
InitializeCriticalSection((PCRITICAL_SECTION)&level3_lock);
#else
static pthread_mutex_t level3_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t level3_wakeup = PTHREAD_COND_INITIALIZER;
volatile static BLASLONG CPU_AVAILABLE = MAX_CPU_NUMBER;
#endif
blas_arg_t newarg;
@@ -641,12 +662,6 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
EnterCriticalSection((PCRITICAL_SECTION)&level3_lock);
#else
pthread_mutex_lock(&level3_lock);
while(CPU_AVAILABLE < nthreads) {
pthread_cond_wait(&level3_wakeup, &level3_lock);
}
CPU_AVAILABLE -= nthreads;
WMB;
pthread_mutex_unlock(&level3_lock);
#endif
#ifdef USE_ALLOC_HEAP
@@ -697,7 +712,7 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
while (m > 0){
width = blas_quickdivide(m + nthreads_m - num_parts - 1, nthreads_m - num_parts);
width = round_up(m, width, GEMM_PREFERED_SIZE);
width = round_up(m, width, GEMM_PREFERRED_SIZE);
m -= width;
@@ -748,7 +763,7 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
if (width < switch_ratio) {
width = switch_ratio;
}
width = round_up(width_n, width, GEMM_PREFERED_SIZE);
width = round_up(width_n, width, GEMM_PREFERRED_SIZE);
width_n -= width;
if (width_n < 0) {
@@ -798,10 +813,6 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
#elif defined(OS_WINDOWS)
LeaveCriticalSection((PCRITICAL_SECTION)&level3_lock);
#else
pthread_mutex_lock(&level3_lock);
CPU_AVAILABLE += nthreads;
WMB;
pthread_cond_signal(&level3_wakeup);
pthread_mutex_unlock(&level3_lock);
#endif
@@ -851,9 +862,20 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, IFLOAT *sa, IF
/* Objective function come from sum of partitions in m and n. */
/* (n / nthreads_n) + (m / nthreads_m) */
/* = (n * nthreads_m + m * nthreads_n) / (nthreads_n * nthreads_m) */
while (nthreads_m % 2 == 0 && n * nthreads_m + m * nthreads_n > n * (nthreads_m / 2) + m * (nthreads_n * 2)) {
nthreads_m /= 2;
nthreads_n *= 2;
BLASLONG cost = 0, div = 0;
BLASLONG i;
for (i = 1; i <= sqrt(nthreads_m); i++) {
if (nthreads_m % i) continue;
BLASLONG j = nthreads_m / i;
BLASLONG cost_i = n * j + m * nthreads_n * i;
BLASLONG cost_j = n * i + m * nthreads_n * j;
if (cost == 0 ||
cost_i < cost) {cost = cost_i; div = i;}
if (cost_j < cost) {cost = cost_j; div = j;}
}
if (div > 1) {
nthreads_m /= div;
nthreads_n *= div;
}
}
+5 -1
View File
@@ -13,6 +13,8 @@ if (USE_THREAD)
set(BLAS_SERVER blas_server_omp.c)
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(BLAS_SERVER blas_server_win32.c)
elseif (${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN)
set(BLAS_SERVER blas_server_win32.c)
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
set(BLAS_SERVER blas_server_win32.c)
endif ()
@@ -25,7 +27,6 @@ if (USE_THREAD)
${BLAS_SERVER}
divtable.c # TODO: Makefile has -UDOUBLE
blas_l1_thread.c
blas_server_callback.c
)
if (NOT NO_AFFINITY)
@@ -40,6 +41,7 @@ set(COMMON_SOURCES
openblas_env.c
openblas_get_num_procs.c
openblas_get_num_threads.c
blas_server_callback.c
)
# these need to have NAME/CNAME set, so use GenerateNamedObjects, but don't use standard name mangling
@@ -52,6 +54,8 @@ if (DYNAMIC_ARCH)
list(APPEND COMMON_SOURCES dynamic_arm64.c)
elseif (POWER)
list(APPEND COMMON_SOURCES dynamic_power.c)
elseif (ZARCH)
list(APPEND COMMON_SOURCES dynamic_zarch.c)
elseif (RISCV64)
list(APPEND COMMON_SOURCES dynamic_riscv64.c detect_riscv64.c)
elseif (LOONGARCH64)
+2 -2
View File
@@ -1,12 +1,12 @@
TOPDIR = ../..
include ../../Makefile.system
COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX) openblas_set_num_threads.$(SUFFIX) openblas_get_num_threads.$(SUFFIX) openblas_get_num_procs.$(SUFFIX) openblas_get_config.$(SUFFIX) openblas_get_parallel.$(SUFFIX) openblas_error_handle.$(SUFFIX) openblas_env.$(SUFFIX)
COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX) openblas_set_num_threads.$(SUFFIX) openblas_get_num_threads.$(SUFFIX) openblas_get_num_procs.$(SUFFIX) openblas_get_config.$(SUFFIX) openblas_get_parallel.$(SUFFIX) openblas_error_handle.$(SUFFIX) openblas_env.$(SUFFIX) blas_server_callback.$(SUFFIX)
#COMMONOBJS += slamch.$(SUFFIX) slamc3.$(SUFFIX) dlamch.$(SUFFIX) dlamc3.$(SUFFIX)
ifdef SMP
COMMONOBJS += blas_server.$(SUFFIX) divtable.$(SUFFIX) blasL1thread.$(SUFFIX) blas_server_callback.$(SUFFIX)
COMMONOBJS += blas_server.$(SUFFIX) divtable.$(SUFFIX) blasL1thread.$(SUFFIX)
ifneq ($(NO_AFFINITY), 1)
COMMONOBJS += init.$(SUFFIX)
endif
+3 -5
View File
@@ -119,11 +119,11 @@ static void * blas_thread_buffer[MAX_CPU_NUMBER];
/* Local Variables */
#if defined(USE_PTHREAD_LOCK)
static pthread_mutex_t server_lock = PTHREAD_MUTEX_INITIALIZER;
volatile static pthread_mutex_t server_lock = PTHREAD_MUTEX_INITIALIZER;
#elif defined(USE_PTHREAD_SPINLOCK)
static pthread_spinlock_t server_lock = 0;
volatile static pthread_spinlock_t server_lock = 0;
#else
static unsigned long server_lock = 0;
volatile static unsigned long server_lock = 0;
#endif
#define THREAD_STATUS_SLEEP 2
@@ -637,9 +637,7 @@ int exec_blas_async(BLASLONG pos, blas_queue_t *queue){
#ifdef SMP_SERVER
// Handle lazy re-init of the thread-pool after a POSIX fork
LOCK_COMMAND(&server_lock);
if (unlikely(blas_server_avail == 0)) blas_thread_init();
UNLOCK_COMMAND(&server_lock);
#endif
BLASLONG i = 0;
blas_queue_t *current = queue;
+2 -2
View File
@@ -63,12 +63,12 @@ uint64_t detect_riscv64_rvv100(void)
* RVV 1.0 and we return 0.
*/
asm volatile("vsetvli x0, x0, e8, m1, ta, ma\n\t"
asm volatile("vsetvli t0, x0, e8, m1, ta, ma\n\t"
"csrr %0, vtype\n\t"
"slt %0, x0, %0\n"
: "=r" (rvv10_supported)
:
:);
:"t0", "vtype");
return rvv10_supported;
}
+59 -17
View File
@@ -38,6 +38,7 @@
/*********************************************************************/
#include "common.h"
#include <strings.h>
#if (defined OS_LINUX || defined OS_ANDROID)
#include <asm/hwcap.h>
#include <sys/auxv.h>
@@ -128,6 +129,18 @@ extern gotoblas_t gotoblas_ARMV9SME;
#else
#define gotoblas_ARMV9SME gotoblas_ARMV8
#endif
#ifdef DYN_VORTEX
extern gotoblas_t gotoblas_VORTEX;
#elif defined(DYN_NEOVERSEN1)
#define gotoblas_VORTEX gotoblas_NEOVERSEN1
#else
#define gotoblas_VORTEX gotoblas_ARMV8
#endif
#ifdef DYN_VORTEXM4
extern gotoblas_t gotoblas_VORTEXM4;
#else
#define gotoblas_VORTEXM4 gotoblas_ARMV8
#endif
#ifdef DYN_CORTEXA55
extern gotoblas_t gotoblas_CORTEXA55;
#else
@@ -138,7 +151,7 @@ extern gotoblas_t gotoblas_A64FX;
#else
#define gotoblas_A64FX gotoblas_ARMV8
#endif
#else
#else //not a user-specified dynamic_list
extern gotoblas_t gotoblas_CORTEXA53;
#define gotoblas_CORTEXA55 gotoblas_CORTEXA53
extern gotoblas_t gotoblas_CORTEXA57;
@@ -150,22 +163,32 @@ extern gotoblas_t gotoblas_THUNDERX2T99;
extern gotoblas_t gotoblas_TSV110;
extern gotoblas_t gotoblas_EMAG8180;
extern gotoblas_t gotoblas_NEOVERSEN1;
#define gotoblas_VORTEX gotoblas_NEOVERSEN1
#ifndef NO_SVE
extern gotoblas_t gotoblas_NEOVERSEV1;
extern gotoblas_t gotoblas_NEOVERSEN2;
extern gotoblas_t gotoblas_ARMV8SVE;
extern gotoblas_t gotoblas_A64FX;
#ifndef NO_SME
extern gotoblas_t gotoblas_ARMV9SME;
#else
#define gotoblas_ARMV9SME gotoblas_ARMV8SVE
#endif
#else
#define gotoblas_NEOVERSEV1 gotoblas_ARMV8
#define gotoblas_NEOVERSEN2 gotoblas_ARMV8
#define gotoblas_ARMV8SVE gotoblas_ARMV8
#define gotoblas_A64FX gotoblas_ARMV8
#define gotoblas_ARMV9SME gotoblas_ARMV8
#endif
#ifndef NO_SME
extern gotoblas_t gotoblas_ARMV9SME;
#if defined (__clang__) && defined(OS_DARWIN)
extern gotoblas_t gotoblas_VORTEXM4;
#else
#define gotoblas_VORTEXM4 gotoblas_NEOVERSEN1
#endif
#else
#ifndef NO_SVE
#define gotoblas_ARMV9SME gotoblas_ARMV8SVE
#else
#define gotoblas_ARMV9SME gotoblas_NEOVERSEN1
#endif
#define gotoblas_VORTEXM4 gotoblas_NEOVERSEN1
#endif
extern gotoblas_t gotoblas_THUNDERX3T110;
@@ -176,7 +199,7 @@ extern void openblas_warning(int verbose, const char * msg);
#define FALLBACK_VERBOSE 1
#define NEOVERSEN1_FALLBACK "OpenBLAS : Your OS does not support SVE instructions. OpenBLAS is using Neoverse N1 kernels as a fallback, which may give poorer performance.\n"
#define NUM_CORETYPES 19
#define NUM_CORETYPES 21
/*
* In case asm/hwcap.h is outdated on the build system, make sure
@@ -216,6 +239,8 @@ static char *corename[] = {
"armv8sve",
"a64fx",
"armv9sme",
"vortex",
"vortexm4",
"unknown"
};
@@ -239,6 +264,8 @@ char *gotoblas_corename(void) {
if (gotoblas == &gotoblas_ARMV8SVE) return corename[16];
if (gotoblas == &gotoblas_A64FX) return corename[17];
if (gotoblas == &gotoblas_ARMV9SME) return corename[18];
if (gotoblas == &gotoblas_VORTEX) return corename[19];
if (gotoblas == &gotoblas_VORTEXM4) return corename[20];
return corename[NUM_CORETYPES];
}
@@ -277,6 +304,8 @@ static gotoblas_t *force_coretype(char *coretype) {
case 16: return (&gotoblas_ARMV8SVE);
case 17: return (&gotoblas_A64FX);
case 18: return (&gotoblas_ARMV9SME);
case 19: return (&gotoblas_VORTEX);
case 20: return (&gotoblas_VORTEXM4);
}
snprintf(message, 128, "Core not found: %s\n", coretype);
openblas_warning(1, message);
@@ -288,12 +317,12 @@ static gotoblas_t *get_coretype(void) {
char coremsg[128];
#if defined (OS_DARWIN)
//future #if !defined(NO_SME)
// if (support_sme1()) {
// return &gotoblas_ARMV9SME;
// }
// #endif
return &gotoblas_NEOVERSEN1;
#if !defined(NO_SME)
if (support_sme1()) {
return &gotoblas_VORTEXM4;
}
#endif
return &gotoblas_VORTEX;
#endif
#if (!defined OS_LINUX && !defined OS_ANDROID)
@@ -378,6 +407,8 @@ static gotoblas_t *get_coretype(void) {
case 0xd08: // Cortex A72
return &gotoblas_CORTEXA72;
case 0xd09: // Cortex A73
case 0xd0a: // Cortex A75
case 0xd0b: // Cortex A76
return &gotoblas_CORTEXA73;
case 0xd0c: // Neoverse N1
return &gotoblas_NEOVERSEN1;
@@ -395,6 +426,9 @@ static gotoblas_t *get_coretype(void) {
}else
return &gotoblas_NEOVERSEV1;
case 0xd4f:
case 0xd83:
case 0xd85:
case 0xd87:
if (!(getauxval(AT_HWCAP) & HWCAP_SVE)) {
openblas_warning(FALLBACK_VERBOSE, NEOVERSEN1_FALLBACK);
return &gotoblas_NEOVERSEN1;
@@ -440,13 +474,21 @@ static gotoblas_t *get_coretype(void) {
return &gotoblas_TSV110;
}
break;
case 0x50: // Ampere
case 0x50: // Ampere/AppliedMicro
switch (part)
{
case 0x000: // Skylark/EMAG8180
return &gotoblas_EMAG8180;
}
break;
case 0xc0: // Ampere
switch(part)
{
case 0xac3:
case 0xac4:
return &gotoblas_NEOVERSEN1;
}
break;
case 0x51: // Qualcomm
switch (part)
{
@@ -455,8 +497,8 @@ static gotoblas_t *get_coretype(void) {
}
break;
case 0x61: // Apple
//future if (support_sme1()) return &gotoblas_ARMV9SME;
return &gotoblas_NEOVERSEN1;
if (support_sme1()) return &gotoblas_VORTEXM4;
return &gotoblas_VORTEX;
break;
default:
snprintf(coremsg, 128, "Unknown CPU model - implementer %x part %x\n",implementer,part);
+11 -1
View File
@@ -69,7 +69,10 @@ static int cpuid(void)
else if (arch == POWER_9) return CPU_POWER9;
#endif
#ifdef POWER_10
else if (arch >= POWER_10) return CPU_POWER10;
else if (arch == POWER_10) return CPU_POWER10;
#endif
#ifdef POWER_11
else if (arch >= POWER_11) return CPU_POWER10;
#endif
return CPU_UNKNOWN;
}
@@ -173,6 +176,13 @@ static struct {
.cpu_type = CPU_POWER10,
},
{ /* Power11 */
.pvr_mask = 0xffff0000,
.pvr_value = 0x00820000,
.cpu_name = "POWER11 (raw)",
.cpu_type = CPU_POWER10,
},
{ /* End of table, pvr_mask and pvr_value must be zero */
.pvr_mask = 0x0,
.pvr_value = 0x0,
+22 -1
View File
@@ -97,6 +97,9 @@ struct riscv_hwprobe {
#define RISCV_HWPROBE_KEY_IMA_EXT_0 4
#define RISCV_HWPROBE_IMA_V (1 << 2)
#define RISCV_HWPROBE_EXT_ZFH (1 << 27)
#define RISCV_HWPROBE_EXT_ZVFH (1 << 30)
#define RISCV_HWPROBE_EXT_ZVFBFWMA (1ULL << 54)
#ifndef NR_riscv_hwprobe
#ifndef NR_arch_specific_syscall
@@ -147,6 +150,7 @@ char* gotoblas_corename(void) {
}
static gotoblas_t* get_coretype(void) {
uint64_t vector_mask;
unsigned vlenb = 0;
#if !defined(OS_LINUX)
@@ -165,14 +169,31 @@ static gotoblas_t* get_coretype(void) {
};
int ret = syscall(NR_riscv_hwprobe, pairs, 1, 0, NULL, 0);
if (ret == 0) {
if (!(pairs[0].value & RISCV_HWPROBE_IMA_V))
#if defined(BUILD_HFLOAT16)
vector_mask = (RISCV_HWPROBE_IMA_V | RISCV_HWPROBE_EXT_ZFH | RISCV_HWPROBE_EXT_ZVFH);
#elif defined(BUILD_BFLOAT16)
vector_mask = (RISCV_HWPROBE_IMA_V | RISCV_HWPROBE_EXT_ZVFBFWMA);
#else
vector_mask = RISCV_HWPROBE_IMA_V;
#endif
if ((pairs[0].value & vector_mask) != vector_mask)
return NULL;
} else {
#if defined(BUILD_HFLOAT16)
snprintf(coremsg, sizeof(coremsg), "Cpu support for Zfh+Zvfh extensions required due to BUILD_HFLOAT16=1\n");
openblas_warning(1, coremsg);
return NULL;
#elif defined(BUILD_BFLOAT16)
snprintf(coremsg, sizeof(coremsg), "Cpu support for Zvfbfwma extensions required due to BUILD_BFLOAT16=1\n");
openblas_warning(1, coremsg);
return NULL;
#else
if (!(getauxval(AT_HWCAP) & DETECT_RISCV64_HWCAP_ISA_V))
return NULL;
if (!detect_riscv64_rvv100())
return NULL;
#endif
}
/*
+12
View File
@@ -391,7 +391,15 @@ static void numa_mapping(void) {
core = 0;
for (cpu = 0; cpu < common -> num_procs; cpu ++) {
bitmask_idx = CPUELT(cpu);
/*
* When common->avail[i] = 0x5555555555555555UL (indicating that adjacent logical cores share a physical core),
* using it as a mask may overlap with the local_cpu_map function's role, leading to only half of the real physical cores being detected.
*/
#ifdef ARCH_LOONGARCH64
if (common -> node_info[node][bitmask_idx]) {
#else
if (common -> node_info[node][bitmask_idx] & common -> avail[bitmask_idx] & CPUMASK(cpu)) {
#endif
common -> cpu_info[count] = WRITE_CORE(core) | WRITE_NODE(node) | WRITE_CPU(cpu);
count ++;
core ++;
@@ -930,8 +938,12 @@ void gotoblas_affinity_init(void) {
if (common -> num_nodes > 1) numa_mapping();
#ifdef ARCH_LOONGARCH64
common -> final_num_procs = common -> num_procs;
#else
common -> final_num_procs = 0;
for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1; //Make the max cpu number.
#endif
for (cpu = 0; cpu < common -> final_num_procs; cpu ++) common -> cpu_use[cpu] = 0;
+31 -9
View File
@@ -1317,7 +1317,11 @@ UNLOCK_COMMAND(&alloc_lock);
error:
printf("OpenBLAS : Program will terminate because you tried to allocate too many TLS memory regions.\n");
printf("This library was built to support a maximum of %d threads - either rebuild OpenBLAS\n", NUM_BUFFERS);
printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n");
#ifdef USE_OPENMP
printf("with a larger NUM_THREADS value or set the environment variable OMP_NUM_THREADS to\n");
#else
printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n");
#endif
printf("a sufficiently small number. This error typically occurs when the software that relies on\n");
printf("OpenBLAS calls BLAS functions from many threads in parallel, or when your computer has more\n");
printf("cpu cores than what OpenBLAS was configured to handle.\n");
@@ -1601,7 +1605,7 @@ void DESTRUCTOR gotoblas_quit(void) {
}
#if defined(_MSC_VER) && !defined(__clang__)
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
BOOL APIENTRY OpenBLASDllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
@@ -1650,10 +1654,10 @@ static int on_process_term(void)
#endif
#ifdef _WIN64
static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = OpenBLASDllMain;
#pragma const_seg()
#else
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = OpenBLASDllMain;
#pragma data_seg()
#endif
@@ -2922,6 +2926,7 @@ void *blas_memory_alloc(int procpos){
blas_unlock(&memory[position].lock);
#endif
if (!memory[position].addr) {
int failcount = 0;
do {
#ifdef DEBUG
printf("Allocation Start : %lx\n", base_address);
@@ -2973,8 +2978,16 @@ void *blas_memory_alloc(int procpos){
#ifdef DEBUG
printf(" Success -> %08lx\n", map_address);
#endif
if (((BLASLONG) map_address) == -1) base_address = 0UL;
if (((BLASLONG) map_address) == -1) {
base_address = 0UL;
failcount++;
if (failcount >10) {
fprintf(stderr, "OpenBLAS error: Memory allocation still failed after 10 retries, giving up.\n");
exit(1);
}
} else {
failcount = 0;
}
if (base_address) base_address += BUFFER_SIZE + FIXED_PAGESIZE;
} while ((BLASLONG)map_address == -1);
@@ -3030,8 +3043,13 @@ void *blas_memory_alloc(int procpos){
#endif
if (memory_overflowed) goto terminate;
fprintf(stderr,"OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.\n");
fprintf(stderr,"Note that your application may still crash, if it is calling OpenBLAS from multiple threads in parallel\n");
fprintf(stderr,"To avoid this warning, please rebuild your copy of OpenBLAS with a larger NUM_THREADS setting\n");
#ifdef USE_OPENMP
fprintf(stderr,"or set the environment variable OMP_NUM_THREADS to %d or lower\n", MAX_CPU_NUMBER);
#else
fprintf(stderr,"or set the environment variable OPENBLAS_NUM_THREADS to %d or lower\n", MAX_CPU_NUMBER);
#endif
memory_overflowed=1;
MB;
new_release_info = (struct release_t*) malloc(NEW_BUFFERS * sizeof(struct release_t));
@@ -3133,7 +3151,11 @@ terminate:
#endif
printf("OpenBLAS : Program is Terminated. Because you tried to allocate too many memory regions.\n");
printf("This library was built to support a maximum of %d threads - either rebuild OpenBLAS\n", NUM_BUFFERS);
printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n");
#ifdef USE_OPENMP
printf("with a larger NUM_THREADS value or set the environment variable OMP_NUM_THREADS to\n");
#else
printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n");
#endif
printf("a sufficiently small number. This error typically occurs when the software that relies on\n");
printf("OpenBLAS calls BLAS functions from many threads in parallel, or when your computer has more\n");
printf("cpu cores than what OpenBLAS was configured to handle.\n");
@@ -3464,7 +3486,7 @@ void DESTRUCTOR gotoblas_quit(void) {
}
#if defined(_MSC_VER) && !defined(__clang__)
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
BOOL APIENTRY OpenBLASDllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
@@ -3508,7 +3530,7 @@ static int on_process_term(void)
#else
#pragma data_seg(".CRT$XLB")
#endif
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = OpenBLASDllMain;
#ifdef _WIN64
#pragma const_seg()
#else

Some files were not shown because too many files have changed in this diff Show More