Compare commits

...
938 Commits
Author SHA1 Message Date
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 fc042d928b fix symbol naming (underscoring) 2025-09-21 19:01:11 +02: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 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
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
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 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
Martin Kroeker 8afddc1a81 Merge pull request #5262 from guoyuanplct/develop
kernel/riscv64:Fixed the bug of openblas_utest_ext failing in c/zgemv and some c/zgbmv tests:
2025-05-14 02:40:32 -07:00
guoyuanplct 9a7e3f102b kernel/riscv64:Fixed the bug of openblas_utest_ext failing in c/zgemv and some c/zgbmv tests: 2025-05-14 00:09:26 +08:00
Martin Kroeker 5366902f9d Merge pull request #5261 from ErnstPeng/fix-lasx
Fix cgemm_ncopy_16_lasx function for lapack-test and add it C function
2025-05-13 05:48:05 -07:00
pengxu a978ad3180 Loongarch64: add C functions of zgemm_ncopy_16 2025-05-13 16:09:12 +08:00
pengxu 0ccb050583 Loongarch64: fixed cgemm_ncopy_16_lasx 2025-05-13 16:08:33 +08:00
Ye Tao 7321444660 enable sbgemm to be forward to sbgemv on arm64 2025-05-12 15:37:32 +00:00
Martin Kroeker cf9e34c1f4 Merge pull request #5258 from martin-frbg/issue5255
Fix empty prototypes in files converted from Fortran (fixes compilation with GCC15)
2025-05-11 00:23:28 -07:00
Martin Kroeker 5141a90993 Fix ARMV9SME target in DYNAMIC_ARCH and add SME query code for MacOS (#5222)
* Fix ARMV9SME target and add support_sme1 code for MacOS
* make sgemm_direct unconditionally available on all arm64
* build a (dummy) sgemm_direct kernel on all arm64





* Update dynamic_arm64.c
2025-05-10 22:39:32 +02:00
Martin Kroeker 2320e0b757 Merge pull request #5244 from chitao1234/develop
allow the use of LAPACK_COMPLEX_CPP when using MSVC compiler
2025-05-10 09:49:18 -07:00
Martin Kroeker 0d69a2930d Fix empty prototypes of select/selctg 2025-05-10 08:39:57 -07:00
Martin Kroeker ebbe682f7d Fix function prototypes 2025-05-10 08:38:06 -07:00
Martin Kroeker 151b74284e Merge pull request #5203 from quic/fix-sgemmdirect-sme1
Add vector registers to clobber list to prevent compiler optimization.
2025-05-09 05:39:47 -07:00
Martin Kroeker 3c878f3e70 Cirrus CI: Update xcode version in the Apple crossbuilds (#5254)
* Update xcode version in the Apple crossbuilds
2025-05-09 14:38:53 +02:00
Martin Kroeker 3e961c2771 Merge pull request #5251 from martin-frbg/issue5250
Fix out-of-bounds accesses in ?/SCAL/?GEEV triggered by preceding errrors/invalid inputs
2025-05-05 05:49:06 -07:00
Martin Kroeker 0ea9205a6c Merge pull request #5249 from scottt/fix-build-on-intel-arrow-lake
cpuid_x86: improve Intel Arrow Lake detection
2025-05-01 13:17:34 -07:00
Martin Kroeker cba32d001a Merge pull request #5245 from guoyuanplct/develop
Optimized RVV_ZVL256B Implementation of zgemv_n
2025-05-01 03:04:38 -07:00
Martin Kroeker 5c958dfe1e Avoid of out of bounds accesses in SCAL when INFO<0 2025-05-01 11:58:21 +02:00
Martin Kroeker 4c0445aed1 Avoid out of bounds accesses in SCAL when INFO <0 2025-05-01 11:56:07 +02:00
Martin Kroeker d48a2fc469 Avoid out of bounds accesses in SCAL when INFO<0 2025-05-01 11:53:50 +02:00
Martin Kroeker 47b43054f1 Avoid out of bounds accesses in SCAL when INFO<0 2025-05-01 11:52:22 +02:00
Martin Kroeker 52367eac67 Merge pull request #5248 from ErnstPeng/fix-lasx
Loongarch64: fixed some functions of LASX for lapck test
2025-05-01 01:09:38 -07:00
Scott Tsai 4bee135cc1 cpuid_x86: improve Intel Arrow Lake detection
Add Intel Arrow Lake CPUIDs. See the datasheet:
https://edc.intel.com/content/www/us/en/design/products/platforms/details/arrow-lake-s/core-ultra-200s-series-processors-datasheet-volume-1-of-2/cpuid/
2025-04-30 21:01:31 +08:00
pengxu f19e72c402 Loongarch64: fixed swap_lasx 2025-04-30 16:42:52 +08:00
pengxu b471fa337b Loongarch64: fixed snrm2_lasx 2025-04-30 16:42:36 +08:00
pengxu 57bb46bedf Loongarch64: fixed rot_lasx 2025-04-30 16:42:22 +08:00
pengxu 6dc4ca2391 Loongarch64: fixed icamax_lasx 2025-04-30 16:42:12 +08:00
pengxu b528b1b8ea Loongarch64: fixed iamax_lasx 2025-04-30 16:41:58 +08:00
pengxu ba9569e382 Loongarch64: fixed dot_lasx 2025-04-30 16:41:48 +08:00
pengxu dc5fa29851 Loongarch64: fixed cscal_lasx 2025-04-30 16:41:39 +08:00
pengxu a98dd6d911 Loongarch64: fixed copy_lasx 2025-04-30 16:41:28 +08:00
pengxu d49319c2d2 Loongarch64: fixed cnrm2_lasx 2025-04-30 16:41:18 +08:00
pengxu 74c97ef814 Loongarch64: fixed cdot_lasx 2025-04-30 16:41:05 +08:00
pengxu be525521ad Loongarch64: fixed asum_lasx 2025-04-30 16:40:55 +08:00
pengxu 0cd5ca5527 Loongarch64: fixed amax_lasx 2025-04-30 16:40:44 +08:00
guoyuanplct 11ffc8680e Format the code 2025-04-25 00:27:27 +08:00
guoyuanplct 7616c42095 Optimized RVV_ZVL256B Implementation of zgemv_n
The implementation of zgemv_n using RVV_ZVL256B has been optimized.
Compared to the previous implementation, it has achieved a 1.5x
performance improvement.
2025-04-25 00:05:15 +08:00
chitao1234 e1bd631593 allow the use of LAPACK_COMPLEX_CPP when using MSVC compiler 2025-04-24 18:59:10 +08:00
Martin Kroeker 70dff3b84f Merge pull request #5242 from abhishek-iitmadras/abhishekk_dot
optimise dot using thread throttling for NEOVERSE V1
2025-04-23 13:53:55 -07:00
abhishek-fujitsu 0c239c9d48 update contribution list 2025-04-23 22:35:05 +05:30
abhishek-fujitsu 9c02cdb073 optimise dot using thread throttling for NEOVERSE V1 2025-04-23 22:35:05 +05:30
Martin Kroeker d0e8fd6d40 Merge pull request #5239 from annop-w/gemv_n_sve
Use SVE kernel for S/DGEMVN for SVE machines
2025-04-22 10:19:49 -07:00
Martin Kroeker ddfefd9bf8 Merge pull request #5240 from iha-taisei/fixedIssue5231
Fix: Potential out-of-bounds read in non-transposed [SD]GEMV kernels for A64FX and Neoverse V1.
2025-04-22 06:04:26 -07:00
Iha, Taisei 08b5c18d70 fixed a potential out-of-bounds on gemv. 2025-04-22 19:56:44 +09:00
Annop Wongwathanarat e11744a411 Use SVE kernel for S/DGEMVN for SVE machines 2025-04-22 09:40:13 +00:00
Martin Kroeker db0abfa907 Merge pull request #5238 from martin-frbg/revert5125
remove non-vectorized SGEMV transpose reduce path for POWER8, restoring optimizations frpm PR4880
2025-04-22 02:12:19 -07:00
Martin Kroeker 7389b6c483 Merge pull request #5237 from martin-frbg/revert5219
Fix and reinstate the Cooper Lake/Sapphire Rapids microkernel for non-transpose SBGEMV
2025-04-21 23:36:23 -07:00
Martin Kroeker 4ec62d7f73 remove non-vectorized code path for power8, restoring PR4880 2025-04-21 23:14:10 +02:00
Martin Kroeker 1df8738f27 Merge pull request #5235 from quickwritereader/issue_unaligned_ppc64le
Explicit unaligned vector load/stores in PPC64LE GEMV kernels
2025-04-21 14:03:56 -07:00
Martin Kroeker 99d9f1ff38 Fix conditional 2025-04-21 22:55:45 +02:00
Martin Kroeker 96d80801bc Reinstate the CooperLake microkernel 2025-04-21 22:53:26 +02:00
Martin Kroeker f5bc97c37e Merge pull request #5227 from zanpeeters/develop
Wrong output from getarch on Apple M4
2025-04-21 10:28:53 -07:00
Martin Kroeker 050c3b26ae Merge pull request #5236 from ywwry66/apple_workaround
Follow-up to #5233, fixing "Argument list too long"
2025-04-21 03:04:14 -07:00
Ruiyang Wu 9aa7a0b2a7 Follow-up to d659f3c 2025-04-21 00:22:11 -04:00
Martin Kroeker 94fceaeac5 Merge pull request #5233 from ywwry66/apple_workaround
Fix "Argument list too long" compilation error for Intel macOS
2025-04-20 13:38:43 -07:00
Ruiyang Wu d659f3c3f6 Fix "Argument list too long" compilation error for Intel macOS 2025-04-20 11:57:55 -04:00
Martin Kroeker 2e4309315c Merge pull request #5219 from martin-frbg/sbgemvn_cooper
Temporarily disable the Cooper Lake/Sapphire Rapids microkernel for non-transpose SBGEMV
2025-04-20 07:29:20 -07:00
Martin Kroeker afc1dc69cd Merge pull request #5234 from RevySR/bump-xuantie-qemu
Bump xuantie qemu for c910v
2025-04-20 07:28:21 -07:00
Ubuntu 0cc2485594 Explicit unaligned vector load/stores in PPC64LE GEMV kernels 2025-04-20 08:00:29 +00:00
Han Gao 1f687b2f60 Bump xuantie qemu for c910v
Signed-off-by: Han Gao <rabenda.cn@gmail.com>
2025-04-20 14:20:49 +08:00
Martin Kroeker dd38b4e811 Merge pull request #5225 from annop-w/gemv_n
Improve performance for SGEMVN on NEONVERSEN1
2025-04-17 01:54:10 -07:00
Martin Kroeker 3a088de2d1 Merge pull request #5228 from martin-frbg/cmakecrossarm
Update and amend parameters for Neoverse cpus in CMake crossbuilds
2025-04-17 00:51:26 -07:00
Martin Kroeker 0241d516f6 Merge pull request #5220 from iha-taisei/sdgemv_n_unroll
Further performance improvements to non-transposed [SD]GEMV kernels for A64FX and Neoverse V1.
2025-04-16 12:55:55 -07:00
Martin Kroeker afb664527f Merge pull request #5221 from tetsuzo-usui/tune_symv_for_arm64
Add AArch64-optimized SYMV kernels
2025-04-16 10:01:38 -07:00
Annop Wongwathanarat d535728803 Improve performance for SGEMVN on NEONVERSEN1 2025-04-16 09:54:30 +00:00
Martin Kroeker d9369bda1e Update and amend parameters for Neoverse cpus 2025-04-16 01:09:57 -07:00
zanpeeters acef78c778 Reset buffer length before every call to sysctlbyname. 2025-04-15 17:17:17 -07:00
zanpeeters d1c2528aed Add L1_DATA_LINESIZE for ifdef __APPLE__ 2025-04-15 17:14:19 -07:00
zanpeeters 7b66330dea hw.perflevel[01].cpusperl changed to hw.perflevel[01].cpusperl2 2025-04-15 17:12:03 -07:00
Usui, Tetsuzo d711906e3e Add symv kernels for arm64 2025-04-11 20:39:52 +09:00
Iha, Taisei f1e628b889 Further performance improvements to [SD]GEMV. 2025-04-11 20:00:33 +09:00
Martin Kroeker 39718cd28e Merge pull request #5218 from martin-frbg/lapacke_mangling
lapacke_mangling.h is no longer generated, so don't delete on make clean
2025-04-10 22:40:10 -07:00
Martin Kroeker 211dfd0754 disable the CooperLake microkernel as it produces wrong results 2025-04-10 22:21:57 +02:00
Martin Kroeker fd3afef122 lapacke_mangling.h is no longer generated, so don't delete on make clean 2025-04-10 22:09:19 +02:00
Martin Kroeker b30dc9701f Merge pull request #5215 from annop-w/gemv_t
Use SVE kernel for S/DGEMVT for SVE machines
2025-04-10 13:06:07 -07:00
Martin Kroeker 2893d0add4 Merge pull request #5211 from guoyuanplct/develop
Optimizing the Implementation of GEMV on the RISC-V V Extension
2025-04-10 09:43:03 -07:00
Martin Kroeker ed1e470663 Merge pull request #5217 from haampie/hs/fix/darwin-gcc
test_potrs.c: do not use GCC pragma on darwin-aarch64
2025-04-10 08:19:46 -07:00
Harmen Stoppels 3d6d026fe1 no-gcse when loongarch64 2025-04-10 15:44:31 +02:00
Harmen Stoppels 51ba70f47b test_potrs.c: remove pragma darwin-aarch64 support
Using GCC 14.2.0 on Darwin, the pragma ultimately causes a linker error
"ld: invalid r_symbolnum=". The current workaround is to use the old
linker, but (a) it's deprecated and (b) it can produce libraries that
are subsequently not linkable with the newer linker in dependents: the
new ld64 does not link to libraries with duplicate rpaths created by the
classic linker.
2025-04-10 15:20:34 +02:00
Annop Wongwathanarat ec146157d3 Use SVE kernel for S/DGEMVT for SVE machines 2025-04-09 20:38:14 +00:00
Martin Kroeker de2380e5a6 Merge pull request #5214 from martin-frbg/issue5200
Remove spurious cast from Alpha and Cell's DEFAULT_ALIGN
2025-04-09 10:37:52 -07:00
Martin Kroeker a34b487f22 Remove spurious cast from Alpha and Cell's DEFAULT_ALIGN 2025-04-09 17:25:46 +02:00
Martin Kroeker 1b3e7cc491 Merge pull request #5212 from martin-frbg/lapack1119
Fix incomplete error message in EIG test (Reference-LAPACK PR 1119)
2025-04-09 04:37:14 -07:00
Martin Kroeker 4270d5bc43 Merge pull request #5204 from martin-frbg/issue4692
Repeat the libs target's "ln" in the all target to ensure completeness of copy on Windows
2025-04-09 01:48:31 -07:00
Martin Kroeker 880e43ee54 Merge pull request #5198 from martin-frbg/woadlldebug
Fix pdb file creation in debug dll builds with CMake on Windows/WoA
2025-04-08 14:22:51 -07:00
Martin Kroeker 70865a894e Merge pull request #5180 from ywwry66/openmp_use_cmake
CMake: Pass `OpenMP` compiler and linker flags through CMake targets
2025-04-08 13:16:07 -07:00
Martin Kroeker f0f274725d Merge pull request #5207 from martin-frbg/issue5202
Fix MacOS compilation with xcode16.3/clang17/gcc14
2025-04-08 07:14:16 -07:00
Martin Kroeker 94fb7033a4 Fix incomplete error message (Reference-LAPACK PR 1119) 2025-04-08 07:03:11 -07:00
lglglglgy 1ff303f36e Optimizing the Implementation of GEMV on the RISC-V V Extension
Specialized some scenarios, performed loop unrolling, and reduced the
number of multiplications.
2025-04-08 21:18:00 +08:00
Martin Kroeker fc8090b607 Move additional omp dependency to EXTRALIB 2025-04-08 11:54:36 +02:00
Martin Kroeker 1c5d0d5539 move libomp to extralib 2025-04-08 10:44:36 +02:00
Martin Kroeker 67c5bdd639 Azure CI: Update flang call in OSX_LLVM_flangnew job (#5208)
* Update flang call in OSX_LLVM_flangnew job
2025-04-07 21:20:43 +02:00
Martin Kroeker 1ed962d259 Fix compilation with xcode16.3/clang17/gcc14 2025-04-06 10:44:48 -07:00
Martin Kroeker f0008f50cc Merge pull request #5206 from ColumbusAI/develop
Update zsum.c -- fixed spelling error to successfully compile
2025-04-05 23:43:31 +02:00
ColumbusAI 7bf848454d Update zsum.c -- fixed spelling error to successfully compile
spelling error where zsum_kernel is used and it should be zasum_kernel. Will not compile without fix.
2025-04-05 09:57:53 -07:00
Martin Kroeker 0aa5ef29ec Repeat the libs target's "ln" in the all target to ensure completeness 2025-04-03 23:54:56 +02:00
Martin Kroeker f90eff306d Merge pull request #5197 from e4t/z-arch-exec-stack
On zarch don't produce objects from assembler with a writable stack s…
2025-04-03 18:10:41 +02:00
Vaisakh K V 04915be829 Add vector registers to clobber list to prevent compiler optimization.
SME based SGEMMDIRECT kernel uses the vector registers (z) and adding
    clobber list informs compiler not to optimize these registers.
2025-04-03 12:18:43 +05:30
Martin Kroeker 3fc15ad81c Fix pdb file creation in debug dll builds with CMake on Windows/WoA 2025-03-30 23:22:09 +02:00
Egbert Eich 61b9339d3a getarch/cpuid.S: Fix warning about executable stack
When using the GNU toolchain a warning is printed about an executible
stack:
 /usr/lib64/gcc/.../x86_64-suse-linux/bin/ld: warning: /tmp/ccyG3xBB.o: missing .note.GNU-stack section implies executable stack
[   15s] /usr/lib64/gcc/.../x86_64-suse-linux/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
to prevent this warning, add:
    ```
            .section        .note.GNU-stack,"",@progbits
    ```

Signed-off-by: Egbert Eich <eich@suse.com>
2025-03-28 18:50:46 +01:00
Egbert Eich ea6515c4b3 On zarch don't produce objects from assembler with a writable stack section
On z-series, the current version of the GNU toolchain produces warnings
such as:
```
/usr/lib64/gcc/[...]/s390x-suse-linux/bin/ld: warning: ztrmm_kernel_RC_Z14.o: missing .note.GNU-stack section implies
executable stack
/usr/lib64/[...]/s390x-suse-linux/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
```
To prevent this message and make sure we are future proof, add
```
	.section        .note.GNU-stack,"",@progbits
```
Also add the `.size` bit to give the asm defined functions a proper size
in the symbol table.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-03-28 18:47:48 +01:00
Martin Kroeker f33943d73e Merge pull request #5196 from martin-frbg/issue5193
Fix misinterpretation of NO_LAPACK=0 and SPMV settings in CMake builds
2025-03-27 09:17:54 +01:00
Ruiyang Wu 251c3f857d gh m1: fix mixed linkage when built with OpenMP and clang+gfortran 2025-03-26 23:52:44 -04:00
Ruiyang Wu 1b0c0f00e9 CMake: Avoid mixed OpenMP linkage 2025-03-26 23:52:13 -04:00
Ruiyang Wu 02fd1df10b CMake: Pass OpenMP compiler and linker flags through CMake targets
Using `OpenMP::OpenMP_LANG` targets for CMake is less error-prone than
passing the compiler and linker flags manually. Furthermore, it allows
the user to customize those flags by setting `OpenMP_LANG_FLAGS`,
`OpenMP_LANG_LIB_NAMES`, and `OpenMP_omp_LIBRARY`.
2025-03-26 23:09:54 -04:00
Martin Kroeker 8b35534201 Merge pull request #5195 from martin-frbg/update-gensymbolpl
Re-synchronize gensymbol.pl with the posix shell version
2025-03-26 23:39:53 +01:00
Martin Kroeker 51c1fb1f93 Fix ?spmv build and misinterpretation of NO_LAPACK=0 2025-03-26 23:36:49 +01:00
Martin Kroeker 3ca1ba1be3 resynchronize with the posix shell version 2025-03-26 18:37:11 +01:00
Martin Kroeker 72f0abeed5 Merge pull request #5191 from Harishmcw/CMake_Symbol_Fix
Fix DLL symbol name pre/postfixing in CMake builds on Windows
2025-03-26 11:22:07 +01:00
Harishmcw 1724b3f104 DLL symbol pre/postfixing in CMake builds 2025-03-26 10:55:50 +05:30
Harishmcw c2e7ab5351 DLL symbol pre/postfixing in CMake builds 2025-03-26 10:50:29 +05:30
Martin Kroeker 200771078f Merge pull request #5190 from Harishmcw/develop
Fix missing commas in gensymbol.pl and DLL symbol pre/postfixing in CMake builds
2025-03-25 22:32:43 +01:00
Martin Kroeker 4e3afa7beb Merge pull request #5175 from shubhamsvc/dgemv_thread_throttling
Add thread throttling profile for DGEMV on NEOVERSEV1
2025-03-25 22:02:48 +01:00
Harishmcw c0a5c9655e Fix missing commas in gensymbol.pl 2025-03-24 13:49:55 +05:30
shubham.chaudhari 8e289ecddc Simplified thread throttling function in gemv 2025-03-18 13:24:05 +05:30
shubham.chaudhari 189dbbc04f Add thread throttling for dynamic arch neoversev1 2025-03-18 13:14:30 +05:30
shubham.chaudhari b6cb5ece58 Add thread throttling profile for DGEMV on NEOVERSEV1 2025-03-18 13:14:30 +05:30
Martin Kroeker 51c244a098 Merge pull request #5184 from taoye9/fix_sbgemv_n_bug
fix bugs in aarch64 sbgemv_n kernel
2025-03-15 17:25:33 +01:00
Ye Tao f27ba5efd1 fix bugs in aarch64 sbgemv_n kernel 2025-03-14 17:55:40 +00:00
Martin Kroeker e9fbe0a838 Merge pull request #5183 from annop-w/fix_sbgemv_t
Fix bug in ARM64 sbgemv_t
2025-03-13 23:04:09 +01:00
Annop Wongwathanarat edef2e4441 Fix bug in ARM64 sbgemv_t 2025-03-13 20:55:31 +00:00
Martin Kroeker b55ca71d5b Merge pull request #5182 from annop-w/sgemm_ncopy
Optimize aarch64 sgemm_ncopy
2025-03-13 16:04:39 +01:00
Martin Kroeker 2f778554b8 Merge pull request #5181 from taoye9/change_sbgemn_cast_bf16
replace customize bf16_to_fp32 with arm neon vcvtah_f32_bf16
2025-03-13 13:50:26 +01:00
Martin Kroeker 66e0f1e621 Merge pull request #5178 from martin-frbg/lapack_cplx_dummy
Add dummy implementations of make_complex_(float/double) to simplify Windows DLL linking
2025-03-13 11:57:29 +01:00
Annop Wongwathanarat 9807f56580 Optimize aarch64 sgemm_ncopy 2025-03-13 10:17:43 +00:00
Martin Kroeker 1ba02656e6 Merge pull request #5177 from martin-frbg/cmakelapacke
Fix omission of LAPACKE interfaces for cgesvdq,strsyl3 and deprecated functions in CMAKE builds
2025-03-13 07:33:52 +01:00
Martin Kroeker 8a418b1aab Add dummy implementations for the LAPACK_COMPLEX_CUSTOM case 2025-03-12 23:20:16 +01:00
Martin Kroeker b34235ca66 Fix inclusion of deprecated interfaces and cgesvdq/strsyl3 2025-03-12 22:41:50 +01:00
Martin Kroeker 37b854769b Merge pull request #5173 from nakagawa-fj/gemm_load_imbalance
Improving Load Imbalance in Thread-Parallel GEMM
2025-03-12 22:38:02 +01:00
Martin Kroeker a3e7b16072 Merge pull request #5157 from manaalmj/feature
Optimize gemv_n_sve kernel
2025-03-12 21:08:23 +01:00
Martin Kroeker 8865850496 Merge pull request #5176 from annop-w/fix_sbgemv_t
Fix aarch64 sbgemv_t compilation error for GCC < 13
2025-03-12 18:49:54 +01:00
Ye Tao 4c00099ed6 replace customize bf16_to_fp32 with arm neon vcvtah_f32_bf16 2025-03-12 16:20:15 +00:00
Annop Wongwathanarat a085b6c9ec Fix aarch64 sbgemv_t compilation error for GCC < 13 2025-03-12 14:52:42 +00:00
Masato Nakagawa 80d3c2ad95 Add Improving Load Imbalance in Thread-Parallel GEMM 2025-03-11 20:18:20 +09:00
manjam01 5c4e38ab17 Optimize gemv_n_sve kernel 2025-03-10 16:39:20 +00:00
Martin Kroeker 39eb43d441 Improve thread safety of pthreads builds that rely on C11 atomic operations for locking (#5170)
* Tighten memory orders for C11 atomic operations
2025-03-07 13:48:28 +01:00
Martin Kroeker 1d5ed5c46b Merge pull request #5168 from taoye9/add_sbgemvn_on_neonversen2
Add dispatch of SBGEMVNKERNEL for NEOVERSEN2 and NEOVERSEV2
2025-03-04 16:39:22 +01:00
Martin Kroeker 7338a473a7 Merge pull request #5150 from Harishmcw/WoA-Experiments
Redefined threading logic for GESV and GEMV on WoA
2025-03-03 21:45:53 +01:00
Martin Kroeker 5f200dca54 Merge pull request #5166 from martin-frbg/issue5158
Expose the option to build without LAPACKE to ccmake
2025-03-03 16:02:02 +01:00
Martin Kroeker 8b98db13e3 Merge pull request #5167 from taoye9/fix_sbgemv_n_kernel_typo
fix minior issues of redeclaration of float x0,x1 in sbgemv_n_neon.c
2025-03-03 14:47:53 +01:00
Ye Tao 6b8b35cdf2 fix minior issues of redeclaration of float x0,x1 in sbgemv_n_neon.c 2025-03-03 11:55:27 +00:00
Ye Tao 38ee7c9301 Add dispatch of SBGEMVNKERNEL for NEOVERSEN2 and NEOVERSEV2 2025-03-03 11:32:05 +00:00
Martin Kroeker 217324d880 Merge pull request #5162 from taoye9/add_sbgemv_tests
add beta and alpha testcase for sbgemv
2025-03-03 08:10:12 +01:00
Martin Kroeker e4630ed15a Merge pull request #5160 from taoye9/sbgemv_n_neon
Add SBGEMVN Kernel for ARM64
2025-03-02 23:50:42 +01:00
Martin Kroeker 35914aa9a2 Expose the option to build without LAPACKE to ccmake 2025-03-02 22:54:59 +01:00
Martin Kroeker 2b941c44b5 Merge branch 'develop' into sbgemv_n_neon 2025-03-02 22:39:32 +01:00
Martin Kroeker c797e27a1c Merge pull request #5159 from annop-w/sbgemv_t_bfdot
Add sbgemv_t_bfdot kernel for ARM64
2025-03-02 22:23:19 +01:00
Ye Tao 4346b91559 add beta and alpha testcase for sbgemv 2025-02-28 16:48:47 +00:00
Ye Tao 35bdbca153 Add sbgemv_n_neon kernel for arm64. 2025-02-28 14:37:06 +00:00
Annop Wongwathanarat edaf51dd99 Add sbgemv_t_bfdot kernel for ARM64
This improves performance for sbgemv_t by up to 100x on NEOVERSEV1.
The geometric mean speedup is ~61x for M=N=[2,512].
2025-02-28 12:31:50 +00:00
Martin Kroeker ef9e3f7159 Merge pull request #5149 from martin-frbg/fixup5077-5088
Make the Neoverse GEMM/GEMV throttling code conditional on SMP
2025-02-25 14:01:13 +01:00
Martin Kroeker 09ba099461 make throttling code conditional on SMP 2025-02-25 12:10:48 +01:00
Harishmcw 030ae1fd97 Redefined threading logic for WoA 2025-02-25 15:40:39 +05:30
Martin Kroeker 1533fe49be Merge pull request #5144 from taoye9/dispatch_neoversve2_to_neoversven2
dispatch NEOVERSEV2 to NEOVERSEN2 under dynamic setting
2025-02-24 16:07:06 +01:00
Martin Kroeker c03a81b927 Merge pull request #5141 from michalowski-arm/fork-throttle
Add throttling profile for SGEMM and SGEMV on `NEOVERSEV2`
2025-02-23 12:16:09 +01:00
Martin Kroeker 643966d9c7 Merge pull request #5146 from martin-frbg/issue5123
Fix "dummy2" flag reading in PPC970 S/DSCAL
2025-02-22 21:57:09 +01:00
Martin Kroeker 77fba0f400 Fix "dummy2" flag handling 2025-02-22 20:09:21 +01:00
Ye Tao f0bea79a6e dispatch NEOVERSEV2 to NEOVERSEN2 under dynamic setting 2025-02-21 10:30:11 +00:00
Martin Kroeker 20d1118865 Merge pull request #5143 from martin-frbg/issue5111
Fix GEMMT transforming the input array B in some complex cases
2025-02-21 09:20:39 +01:00
Martin Kroeker 75b958a018 Transform the B array back if necessary before returning 2025-02-20 23:54:12 +01:00
Marek Michalowski 650a062e19 Add thread throttling profile for SGEMV on NEOVERSEV2 2025-02-20 10:28:31 +00:00
Marek Michalowski b723c1b7b7 Add thread throttling profile for SGEMM on NEOVERSEV2 2025-02-20 10:28:21 +00:00
Martin Kroeker ceb8f1e34b Merge pull request #5140 from martin-frbg/issue5139
Add ARM64 options for NVIDIA HPC
2025-02-19 18:17:15 +01:00
Martin Kroeker f1fa370579 fix missing endif 2025-02-19 15:22:26 +01:00
Martin Kroeker 6d1444be3a Add ARM64 options for NVIDIA HPC 2025-02-19 14:26:43 +01:00
Martin Kroeker eb84aac7ad Merge pull request #5084 from quic/topic/sgemm_direct_sme1
Support for SGEMM_DIRECT Kernel based on SME1
2025-02-19 10:56:49 +01:00
Martin Kroeker abbd78aa59 Merge pull request #5138 from martin-frbg/issue5131
Ensure that gmake builds with flang-new link the flang runtime into the shared library
2025-02-18 09:53:31 +01:00
Martin Kroeker ebcab90976 Handle flang-new runtime library linking on Linux like classic-flang 2025-02-17 23:12:58 +01:00
Martin Kroeker ed1584666c Merge pull request #5137 from martin-frbg/issue5136
Fix the CMake build to define USE_TRMM for RISCV64 targets as well
2025-02-17 07:37:07 +01:00
Martin Kroeker b9ae246f20 define USE_TRMM for RISCV64 targets as well 2025-02-16 23:18:04 +01:00
Martin Kroeker 86cf9d8a2e Merge pull request #5133 from OpenMathLib/revert-4920-issue4917
Revert "Fix potential inaccuracy in multithreaded level3 related to SWITCH_RATIO"
2025-02-16 19:16:43 +01:00
Martin Kroeker 0b3c56968d Merge pull request #5135 from martin-frbg/ghwf-n2
CI: remove the express NeoverseN2 target from the Cobalt100 job in the gh workflow
2025-02-16 19:16:10 +01:00
Martin Kroeker c1bb90a823 remove the express NeoverseN2 target from the Cobalt100 job 2025-02-16 14:23:07 +01:00
Martin Kroeker 77c638db67 Revert "Fix potential inaccuracy in multithreaded level3 related to SWITCH_RATIO"
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-02-15 20:37:48 +01:00
Vaisakh K V f66ca05b31 Merge branch 'develop' into topic/sgemm_direct_sme1 2025-02-13 14:54:37 +05:30
Vaisakh K V d23eb3b93e Support for SME1 based sgemm_direct kernel for cblas_sgemm level 3 API
* Added ARMV9SME target
* Added SGEMM_DIRECT kernel based on SME1
2025-02-13 14:51:21 +05:30
Martin Kroeker a64b75a2e0 Merge pull request #5127 from Harishmcw/gesv-threshold
Refined GESV Parallelization Logic for Windows on ARM64
2025-02-12 22:02:37 +01:00
Martin Kroeker 453efbd103 Merge pull request #5128 from martin-frbg/issue5120
Add -O2 to flang flags when building on WoA in Release mode
2025-02-12 21:02:06 +01:00
Martin Kroeker 877d5a5be6 Add -O2 to flang flags when building on WoA in Release mode 2025-02-12 17:01:06 +01:00
Martin Kroeker 8d487ef6eb Merge pull request #5124 from XiWeiGu/LoongArch64-LA264-lapack-fixed
LoongArch64: Fixed lapack test for LA264
2025-02-12 14:58:30 +01:00
Harish-Gits daf16b8229 Adjusted GESV threading logic for optimal performance on WoA 2025-02-12 19:25:25 +05:30
Martin Kroeker e8b11a126b Merge pull request #5125 from martin-frbg/issue5122
Fix SGEMV on POWER8 by reverting to the non-vectorized earlier code
2025-02-12 12:50:44 +01:00
Martin Kroeker 9a3948df82 Merge pull request #5126 from martin-frbg/cirrusbsd4
CirrusCI: Update FreeBSD jobs to 14.2
2025-02-12 12:50:21 +01:00
Martin Kroeker 7f1f776f58 Update FreeBSD jobs to 14.2 2025-02-12 11:23:02 +01:00
Martin Kroeker 81eed868b6 Restore the non-vectorized code from before PR4880 for POWER8 2025-02-12 09:07:20 +01:00
Martin Kroeker 98b5ef929c Restore the non-vectorized code from before PR4880 for POWER8 2025-02-12 09:04:22 +01:00
gxw 2c4a5cc6e6 LoongArch64: Fixed snrm2_lsx.S and cnrm2_lsx.S
When the data type is single-precision real or single-precision complex,
converting it to double precision does not prevent overflow (as exposed in LAPACK tests).
The only solution is to follow C's approach: find the maximum value in the
array and divide each element by that maximum to avoid this issue
2025-02-12 15:48:01 +08:00
gxw 9e75d6b3d1 LoongArch64: Fixed swap_lsx.S
Fixed the error when the stride is zero
2025-02-12 14:57:35 +08:00
gxw e8c740368c LoongArch64: Fixed rot_lsx.S ane crot_lsx.S
Do not check whether the input parameters c and s are zero,
as this may cause errors with special values (same as scal).
Although OpenBLAS's own test suite doesn't catch this, it will
cause LAPACK test cases to fail.
2025-02-12 14:52:49 +08:00
Hao Chen c2212d0abd LoongArch64: Fixed copy_lsx.S
Fixed incorrect store operation

Signed-off-by: gxw <guxiwei-hf@loongson.cn>
2025-02-12 14:52:20 +08:00
Hao Chen 7f1ebc7ae6 LoongArch64: Fixed iamax_lsx.S
Fixed index retrieval issue when there are
identical maximum absolute values

Signed-off-by: Hao Chen <chenhao@loongson.cn>
Signed-off-by: gxw <guxiwei-hf@loongson.cn>
2025-02-12 14:44:44 +08:00
Hao Chen 31d326f895 LoongArch64: Fixed dot_lsx.S
Fixed incorrect register usage in instructions

Signed-off-by: gxw <guxiwei-hf@loongson.cn>
2025-02-12 14:44:11 +08:00
Hao Chen 5d6356bc16 LoongArch64: Fixed amax_lsx.S
Fixed register zeroing operation

Signed-off-by: Hao Chen <chenhao@loongson.cn>
Signed-off-by: gxw <guxiwei-hf@loongson.cn>
2025-02-12 14:39:29 +08:00
Martin Kroeker f42ce7067f Merge pull request #5116 from martin-frbg/issue5110
Handle INCX=0 in ?NRM2
2025-02-09 23:17:20 +01:00
Martin Kroeker 7478c10268 Merge branch 'OpenMathLib:develop' into issue5110 2025-02-09 21:40:02 +01:00
Martin Kroeker c54f5417cc Merge pull request #5118 from martin-frbg/zrot_utestext
Disable extended utests for CSROT/ZDROT that invoke undefined behavior
2025-02-09 21:39:30 +01:00
Martin Kroeker 57208b8bce Disable tests with incx,incy=0 (undefined behavior) 2025-02-09 20:17:29 +01:00
Martin Kroeker 3a4a9b21eb Disable tests with incx,incy=0 (undefined behavior) 2025-02-09 20:16:03 +01:00
Martin Kroeker 60d0be0e97 Update nrm2.c 2025-02-08 23:42:21 +01:00
Martin Kroeker 0fd5448b2c Handle INCX=0 2025-02-08 19:33:05 +01:00
Martin Kroeker 1b85b6a396 Merge pull request #5108 from taoye9/sbgemm_neoversev1
Add SBGEMM for arm neoversev1
2025-02-07 20:30:41 +01:00
Martin Kroeker cae480683a Merge pull request #5113 from martin-frbg/issue5112
Ensure that GEMMTR name appears in XERBLA if GEMMT was called as such
2025-02-07 09:37:53 +01:00
Martin Kroeker db7e5f1fa7 Update gemmt.c 2025-02-06 21:26:20 +01:00
Martin Kroeker ff30ac9666 Update Makefile 2025-02-06 19:51:23 +01:00
Martin Kroeker 7c3e169b67 Update gemmt.c 2025-02-06 19:21:08 +01:00
Martin Kroeker 09414a4187 Ensure that GEMMTR name appears in XERBLA if gemmt was called as such 2025-02-06 18:52:00 +01:00
Ye Tao c748e6a338 optimized sbgemm kernel for neoverse-v1 (sve-256)
Signed-off-by: Ye Tao <ye.tao@arm.com>
2025-02-05 10:06:37 +00:00
Aditya Tewari 4379a6fbe3 * checkpoint sbgemm for SVE-256 2025-02-03 12:49:49 +00:00
Martin Kroeker c139b63342 Merge pull request #5107 from jhgit/develop
fix signedness of pointer to integer type passed to blas_lock()
2025-02-02 08:12:45 +01:00
John Hein 6cd9bbe531 fix signedness of pointer to integer type passed to blas_lock() 2025-02-01 17:22:57 -07:00
Martin Kroeker 5de5072940 Improve flang-new identification and add CI job for it on OSX-x86_64 (#5103)
* AzureCI: Add LLVM/flang-new build on OSX-x86_64
* distinguish classic flang from flang-new in name based recognition
2025-01-30 16:55:26 +01:00
Martin Kroeker 1f74fb9a07 Merge pull request #5101 from martin-frbg/issue5100
Fix CMake build for PPCG4 breaking due to unparsable KERNEL file
2025-01-27 13:19:37 +01:00
Martin Kroeker d7036cfd74 Remove trailing blanks that break the cmake parser 2025-01-27 09:32:17 +01:00
Martin Kroeker 3375a0c990 Merge pull request #5099 from martin-frbg/issue5097-2
Simplify build instructions for Windows on Arm
2025-01-26 21:00:28 +01:00
Martin Kroeker 7a27e2b00d Simplify build instructions for Windows on Arm 2025-01-26 18:36:58 +01:00
Martin Kroeker fdeac17237 Merge pull request #5098 from martin-frbg/issue5095
Fix compilation with BUILD_BFLOAT16 enabled
2025-01-25 19:32:19 +01:00
Martin Kroeker 1829ac5b44 Add (dummy) declaration of SBROT_M 2025-01-25 17:32:11 +01:00
Martin Kroeker 53d20a83f3 Merge pull request #5089 from annop-w/gemv_t
Simplify gemv_t_sve_v1x3 kernel
2025-01-25 14:17:26 +01:00
Martin Kroeker 6e393a5599 Merge branch 'develop' into gemv_t 2025-01-25 12:54:04 +01:00
Martin Kroeker 9b11fd5802 Merge pull request #5088 from michalowski-arm/develop
Add thread throttling profile for SGEMV on `NEOVERSEV1`
2025-01-24 21:54:45 +01:00
Martin Kroeker 5930c162ef Merge pull request #5097 from matthew-brett/fix-woa-cmd
Fix Windows on ARM build instructions
2025-01-24 15:31:15 +01:00
Marek Michalowski 838bb57e27 Merge branch 'develop' into develop 2025-01-24 14:19:35 +00:00
Matthew Brett 252c43265d Fix Windows on ARM build instructions
The command as merged uses the compiler target as the compiler path.

I have run and tested a build with this command.

@Mugundanmcw - is this correct?
2025-01-24 12:58:20 +00:00
Martin Kroeker 876ba58e28 Merge pull request #5091 from goplanid/develop
Small gemm kernel improvements for AArch64
2025-01-24 10:59:16 +01:00
Martin Kroeker a54f9a9c69 Merge pull request #5071 from annop-w/sgemm_throttling
Add thread throttling profile for SGEMM on NEOVERSEV1
2025-01-23 22:42:12 +01:00
Martin Kroeker 9f2319b46d Merge pull request #5094 from martin-frbg/issue5093
Fix "make install" operation when CPP_THREAD_SAFETY_TEST is selected
2025-01-23 19:50:27 +01:00
Martin Kroeker 9faebb3c97 fix lost indentation in the rules for the thread safety test 2025-01-23 17:59:45 +01:00
Martin Kroeker 262018f14c Merge pull request #5092 from XiWeiGu/la64_fixed_cmake
LoongArch64: Fixed cmake
2025-01-23 13:54:27 +01:00
Martin Kroeker 180ba5e7d0 Merge pull request #5069 from tingboliao/dev_rotm_20250107
Further rearranged the rotm kernel for the different architectures.
2025-01-23 10:16:43 +01:00
gxw 1ebcbdbab3 LoongArch64: Fixed the issue of using the old-style TARGET in cmake builds 2025-01-23 09:08:42 +00:00
Deeksha Goplani d1bfa979f7 small gemm kernel packing modifications 2025-01-23 09:41:45 +05:30
Martin Kroeker 1a6a9fb22f add another generator line for rotm 2025-01-23 00:17:04 +01:00
Martin Kroeker 518e376820 Merge pull request #5090 from martin-frbg/cmakeutils
Fix CMake interpretation of KERNEL file variables relevant to WoA
2025-01-22 21:21:38 +01:00
Martin Kroeker 111c9b0733 Add translations for C_COMPILER and OSNAME 2025-01-22 19:51:43 +01:00
Martin Kroeker 4924319c50 fix position of srotm, qrotm 2025-01-22 16:07:35 +01:00
Martin Kroeker b58cba9eb6 fix qrotm build rules 2025-01-22 15:51:49 +01:00
Marek Michalowski 4d5b13f765 Add thread throttling profile for SGEMV on NEOVERSEV1 2025-01-22 10:50:04 +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
tingbo.liao 3c8df6358f Further rearranged the rotm kernel for the different architectures.
Signed-off-by: tingbo.liao <tingbo.liao@starfivetech.com>
2025-01-22 11:41:12 +08:00
Annop Wongwathanarat c0318cea6e Simplify gemv_t_sve_v1x3 kernel 2025-01-21 13:40:17 +00: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
Martin Kroeker 76db346f7e Merge pull request #5082 from martin-frbg/woa_cpuid
Get ARM64 TARGET information from the registry on Windows
2025-01-18 20:28:31 +01:00
Martin Kroeker 5f7b03a441 Merge pull request #5083 from martin-frbg/fixmips64ci
MIPS64 CI :fix breakage from inadvertent line join in yml file
2025-01-18 20:27:37 +01:00
Martin Kroeker 100e74d4d6 restore deleted line break 2025-01-18 18:09:58 +01:00
Martin Kroeker ca3e1c8f9c Get TARGET information from the registry on Windows 2025-01-18 16:50:45 +01:00
Martin Kroeker 87083fdbf6 [WIP] Work around assembler limitations in current LLVM for Windows on Arm (#5076)
* Protect align directives in assembly files that are currently problematic with LLVM on WoA

* use the armv8 zdot on WoA to work around other LLVM issues
2025-01-18 16:45:56 +01:00
Martin Kroeker 2954dc1a70 CI: Add NeoverseN2 build on the new Cobalt-100 (#5080)
* Add NeoverseN2 build
2025-01-17 12:28:26 +01:00
Martin Kroeker 7c3a920a81 CI: Update ubuntu-latest runners to fix side effects of switch to 24.04 (#5079) 2025-01-16 20:48:30 +01:00
Martin Kroeker a7483d181b Merge pull request #5074 from tingboliao/develop
Optimize the gemm_tcopy_8_rvv to be compatible with the vlens 128 and 256.
2025-01-16 09:54:36 +01:00
tingbo.liao ef7f54b357 Optimized the gemm_tcopy_8_rvv to be compatible with the vlens 128 and 256.
Signed-off-by: tingbo.liao <tingbo.liao@starfivetech.com>
2025-01-15 11:31:28 +08:00
Martin Kroeker eba7338484 Merge pull request #5073 from XiWeiGu/la64_update_symv_lsx_version
LoongArch64: Update symv lsx version
2025-01-14 07:20:15 -08:00
gxw e0a8216554 LoongArch64: Update dsymv LSX version 2025-01-14 19:45:42 +08:00
gxw a9070ba3f9 LoongArch64: Update ssymv LSX version 2025-01-14 09:06:59 +00:00
Martin Kroeker 9b981035db Merge pull request #5070 from xry111/xry111/lasx-la664
LoongArch64: Fix dsymv and ssymv LASX version
2025-01-13 10:37:47 -08:00
Martin Kroeker fee353e63d Merge pull request #5072 from martin-frbg/azureosx13
Azure CI: update deprecated macos-12 jobs to macos-13 image
2025-01-13 10:14:47 -08:00
Martin Kroeker 0c0112dfef update deprecated macos-12 jobs to macos-13 image 2025-01-13 17:29:38 +01:00
Annop Wongwathanarat c8cd8da496 Add thread throttling profile for SGEMM on NEOVERSEV1 2025-01-13 15:43:08 +00:00
Xi Ruoyao af10c132b8 LoongArch64: Fix dsymv and ssymv LASX version
"fmov.d $f2, $f4" leaves all the bits higher than the 63-th bit
unpredictable but it's obvious that the following code uses the value of
those high bits.  We actually want to replicate the lower 64 bits here,
so we should use xvreplve0.d instead.

LA464 (Loongson 3[A-Z]-5000) happens to replicate them for us due to
some uarch internal details so the issue was not detected, but for LA664
(Loongson 3[A-Z]-6000) and future uarch we need to do things correctly
or we end up getting a lot of test failures.

Closes: https://bbs.aosc.io/t/topic/302
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
2025-01-13 22:16:00 +08:00
Martin Kroeker 4e817f804c Update version to 0.3.29.dev 2025-01-12 17:39:00 +01:00
Martin Kroeker 8a316e68a5 Update version to 0.3.29.dev 2025-01-12 17:38:20 +01:00
Martin Kroeker 07756abb3e Merge pull request #5067 from OpenMathLib/release-0.3.0
merge release 0.3.29 back into develop to copy tag
2025-01-12 08:37:35 -08:00
Martin Kroeker 8795fc7985 set version to 0.3.29
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-latest, 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
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-01-12 15:02:02 +01:00
Martin Kroeker e0c134e1f6 set version to 0.3.29 2025-01-12 15:01:08 +01:00
Martin Kroeker 9207052d85 Merge pull request #5066 from OpenMathLib/develop
Merge changes from develop in preparation of the 0.3.29 release
2025-01-12 05:59:50 -08:00
Martin Kroeker 7f5b703a80 Merge pull request #5065 from martin-frbg/changelog0329
Update the Changelog for version 0.3.29
2025-01-12 04:36:39 -08:00
Martin Kroeker 20f6114e98 add descriptions of build/runtime vars to 0.3.29 improvements 2025-01-12 13:12:41 +01:00
Martin Kroeker f422845b6d Merge pull request #5064 from martin-frbg/lapack1080
Replace LAPACK ?LARFT with a recursive implementation (Reference-LAPACK PR 1080)
2025-01-12 00:06:10 -08:00
Martin Kroeker ce66ffe7bb Update the Changelog for version 0.3.29 2025-01-12 00:57:10 +01:00
Martin Kroeker d035e80d33 move the original non-recursive ?LARFT here (Reference-LAPACK PR 1080) 2025-01-11 15:42:56 -08:00
Martin Kroeker 459fa8102b Create subdirectory for the old non-recursive ?larft 2025-01-12 00:41:54 +01:00
Martin Kroeker 0c4b4cd78c move the non-recursive original ?larft here (Reference-LAPACK PR 1080) 2025-01-11 15:38:44 -08:00
Martin Kroeker ed516994d6 replace ?larft with a recursive implementation (Reference-LAPACK PR 1080) 2025-01-11 15:37:32 -08:00
Martin Kroeker 5527eda561 Merge pull request #5063 from martin-frbg/lapack1062
Remove comparison that is always false (Reference-LAPACK PR 1062)
2025-01-11 14:38:14 -08:00
Martin Kroeker 4c1a23673a Remove comparison that is always false (Reference-LAPACK PR 1062) 2025-01-11 11:40:31 -08:00
Martin Kroeker d74eb02954 Merge pull request #5057 from martin-frbg/issue5050
Replace while loop in generic C/ZGEMM_BETA to avoid going out of bounds
2025-01-11 11:33:56 -08:00
Martin Kroeker 30f7a4120b Merge pull request #5056 from tingboliao/dev_omatcopy_20250108
Optimize the omatcopy_cn/zomatcopy_cn kernels with RVV 1.0 intrinsic.
2025-01-11 09:42:57 -08:00
Martin Kroeker 0b9de3ef7d Merge pull request #5042 from tingboliao/develop
Add the test cases of rot to improve the unit tests for rot_rvv.
2025-01-10 07:57:21 -08:00
Martin Kroeker c31f148c76 Merge pull request #5061 from XiWeiGu/la64_update_symv
LoongArch64: Update symv
2025-01-10 07:24:07 -08:00
gxw 20a8e48f25 LoongArch64: Update ssymv LASX version 2025-01-10 16:02:54 +08:00
gxw e0748588b8 LoongArch64: Update dsymv LASX version 2025-01-10 14:52:57 +08:00
Martin Kroeker d91d4fa6e9 convert the beta=0 branch to a for loop as well 2025-01-09 23:11:26 +01:00
Martin Kroeker 8cc32f5461 Merge branch 'OpenMathLib:develop' into issue5050 2025-01-09 14:09:31 -08:00
Martin Kroeker a588ea90fd Merge pull request #5052 from martin-frbg/issue5051
Do not check LDVT in LAPACKE_?gesvd_work if VT is not used anyway
2025-01-09 05:11:01 -08:00
Martin Kroeker 21013fdb66 Merge pull request #5058 from martin-frbg/cirrusbsd3
Cirrus CI: Update FreeBSD jobs to 14.1
2025-01-09 05:06:23 -08:00
Martin Kroeker b67a963412 gcc remains at 13 even for freebsd-14.1 2025-01-09 11:54:35 +01:00
Martin Kroeker a9eec233d3 Update FreeBSD jobs to 14.1 2025-01-09 11:34:09 +01:00
Martin Kroeker 09e75f1588 fix absurd typo 2025-01-09 00:52:14 +01:00
Martin Kroeker 2891fd8d6d Replace while loop with for 2025-01-08 23:17:45 +01:00
tingbo.liao 0a5dbf13d3 Optimize the omatcopy_cn and zomatcopy_cn kernels with RVV 1.0 intrinsic.
Signed-off-by: tingbo.liao <tingbo.liao@starfivetech.com>
2025-01-08 11:00:35 +08:00
Martin Kroeker 69d3541488 Merge pull request #5055 from fleclairTT/develop
remove fastmath from x280 target
2025-01-07 15:21:41 -08:00
Felix LeClair d0350a08b7 Merge pull request #1 from fleclairTT/fleclairTT-remove-fast-math
Update Makefile.riscv64
2025-01-07 17:11:13 -05:00
Felix LeClair 05dce05c24 Update Makefile.riscv64
remove fast-math
2025-01-07 17:10:34 -05:00
Martin Kroeker 8385e02ae1 Do not check LDVT when VT is not going to be referenced 2025-01-06 14:42:40 -08:00
Martin Kroeker 74be676936 Merge pull request #5049 from rgommers/docs-buildsystem-page
Rewrite the "Build system" documentation page
2025-01-04 14:14:24 -08:00
Martin Kroeker 91d861a0d4 Merge pull request #5048 from barracuda156/powerpc
PPC970: fix scal
2025-01-04 12:34:45 -08:00
Ralf Gommers f697cfe0d0 docs: improve the rendering of the HarmonyOS build instructions 2025-01-04 21:18:07 +01:00
Ralf Gommers eda80f436a docs: improve rendering of Windows on Arm instructions 2025-01-04 21:10:43 +01:00
Ralf Gommers 1833e68bee docs: improve rendering of "Runtime variables" page 2025-01-04 20:55:39 +01:00
Ralf Gommers c0bf48fbf3 docs: remove warning on the Build system page
Content is reviewed fairly carefully, and should be up to the
same standard as the rest of the docs now.
2025-01-04 20:42:10 +01:00
Ralf Gommers f764d76a4a docs: improve the Makefile dependency graph
Uses Mermaid to render it as a diagram in the html docs.
2025-01-04 20:42:05 +01:00
Ralf Gommers 5aa1845a43 docs: fix two broken links related to MSVC
The doc build is now clean of warnings again.
2025-01-04 20:37:47 +01:00
Ralf Gommers ed114150d1 docs: add the build variables for BLAS/LAPACK functionality 2025-01-04 20:37:47 +01:00
Ralf Gommers c526b10b68 docs: add library and symbol name build variables 2025-01-04 20:37:47 +01:00
Ralf Gommers d4addc0688 docs: improve description of library, data type and toolchain build variables 2025-01-04 20:37:47 +01:00
Ralf Gommers 970e48e9e5 docs: improve readability of the Build system page
This only fixes Markdown syntax, and adds a few headers to bring
some structure into the long list of variables that influence the
build. It does not add or remove variables.
2025-01-04 20:37:47 +01:00
Martin Kroeker 0be97edd7e Merge pull request #5047 from martin-frbg/issue3967
Add a documentation page for the runtime variables
2025-01-04 09:00:22 -08:00
Sergey Fedorov 229efa42ff scal.S: use r11 on 32-bit Darwin on powerpc 2025-01-05 00:31:27 +08:00
Sergey Fedorov 81e1be8d90 Revert "temporarily disable the default S/DSCAL kernel"
This reverts commit 9b9c0aa5c9.
2025-01-04 22:54:54 +08:00
Martin Kroeker b6c906f805 Add OPENBLAS_L2_SIZE and improve formatting 2025-01-04 13:02:35 +01:00
Martin Kroeker 33b9e5b143 Add a documentation page for the runtime variables 2025-01-03 23:32:34 +01:00
Martin Kroeker 6f9b9e2da8 Merge pull request #5046 from martin-frbg/doc5044
Add build instructions for Huawei's HarmonyOS to the documentation
2025-01-03 13:50:26 -08:00
Martin Kroeker afd572511f Add build instructions for Huawei's HarmonyOS from #5043 2025-01-03 22:47:38 +01:00
Martin Kroeker a71041e402 Merge pull request #5045 from martin-frbg/issue5034
Temporarily disable the default S/DSCAL kernel on PPC970
2025-01-03 12:45:39 -08:00
Martin Kroeker 9b9c0aa5c9 temporarily disable the default S/DSCAL kernel 2025-01-03 21:36:46 +01:00
Martin Kroeker 52c7695be1 Merge pull request #5044 from martin-frbg/issue5043
[WIP,Testing] Add CI workflow to test crossbuilding for Huawei HarmonyOS
2025-01-03 11:30:09 -08:00
Martin Kroeker 14e68355d2 Update harmonyos.yml 2025-01-03 18:29:39 +01:00
Martin Kroeker 593427c8a1 Update harmonyos.yml 2025-01-03 18:10:05 +01:00
Martin Kroeker 67bbde71e5 Update harmonyos.yml 2025-01-03 17:47:17 +01:00
Martin Kroeker 108bf599ae Create harmonyos.yml 2025-01-03 17:19:41 +01:00
Martin Kroeker e4f83d4485 Merge pull request #5041 from martin-frbg/issue2715
Identify all cores in ARM64 autodetection, return fastest TARGET and performance group sizes
2025-01-02 10:22:37 -08:00
Martin Kroeker 7fd73a40dc Fix accidentally dropped cpu ids and add MacOS performance groups 2025-01-02 06:13:07 -08:00
tingbo.liao 14c72d616a Add the test cases of rot to improve unit testing.
Signed-off-by: tingbo.liao <tingbo.liao@starfivetech.com>
2025-01-02 10:05:57 +08:00
Martin Kroeker a182251284 fix typo 2025-01-02 00:04:33 +01:00
Martin Kroeker ed95791618 fix conflicting variables 2025-01-01 23:27:38 +01:00
Martin Kroeker 3c3d1c4849 Identify all cores and select the most performant one as TARGET 2025-01-01 22:21:29 +01:00
Martin Kroeker be807c98a6 Identify all cores, group by performance and report the fastest TARGET 2025-01-01 21:42:10 +01:00
Martin Kroeker a63282a688 Merge pull request #5037 from tingboliao/develop
Optimize the nrm2_rvv function to further improve performance.
2024-12-31 21:08:28 +01:00
Martin Kroeker 2f86913209 Merge pull request #5040 from martin-frbg/issue922
Add an install_tests target to facilitate testing cross-compiles
2024-12-31 19:29:19 +01:00
Martin Kroeker e9ff70b394 Add an install_tests target to facilitate testing on cross-compiled targets 2024-12-31 15:55:13 +01:00
Martin Kroeker 85a33326a1 Merge pull request #5039 from martin-frbg/fixgmakenaming
Fix "make install" creating incorrect names for suffixed libraries in the cmake and pkgconfig files
2024-12-31 15:52:50 +01:00
Martin Kroeker 6ad793d65e Fix naming of suffixed libraries in the cmake and pkgconfig files 2024-12-31 14:34:55 +01:00
Martin Kroeker 0a2d9aaf32 Merge pull request #4982 from svillemot/develop
Restore libsuffix support in pkg-config file
2024-12-31 14:30:49 +01:00
Martin Kroeker 9297c46dfb Merge pull request #5036 from martin-frbg/issue4032
Add a paragraph on "benign" LAPACK-TEST errors to the FAQ document
2024-12-31 08:53:41 +01:00
tingbo.liao c37509c213 Optimize the nrm2_rvv function to further improve performance.
Signed-off-by: tingbo.liao <tingbo.liao@starfivetech.com>
2024-12-31 08:46:55 +08:00
Martin Kroeker a1075477c3 Merge pull request #4994 from martin-frbg/issue4886
Disable multithreading in ?TRTRI for small workloads
2024-12-30 23:10:55 +01:00
Martin Kroeker fff2e214ca Add LAPACK-TEST errors topic 2024-12-30 23:05:17 +01:00
Martin Kroeker 718fb73bd8 Merge pull request #4976 from martin-frbg/m3m_exprec
[WIP]Add better workaround for GEMM3M on GENERIC and re-enable EXPRECISION for x86/x86_64 targets
2024-12-30 18:55:21 +01:00
Martin Kroeker 73527aab3c Merge pull request #5030 from tingboliao/develop
Optimize the zgemm_tcopy_4_rvv function to be compatible with the situations where the vector lengths(vlens) are 128 and 256.
2024-12-30 16:02:46 +01:00
Martin Kroeker c1258662db Merge branch 'OpenMathLib:develop' into m3m_exprec 2024-12-30 15:58:15 +01:00
Martin Kroeker 36b0fb3aff Merge pull request #5035 from martin-frbg/issue4396
Improve OpenBLASConfig.cmake contents in gmake builds
2024-12-30 09:34:33 +01:00
Martin Kroeker d863dcf83c Merge pull request #5033 from rgommers/doc-port-last-wiki-edits
docs: update extensions and install pages with last wiki edits
2024-12-30 00:30:08 +01:00
Martin Kroeker d5e255519e Improve OpenBLASConfig.cmake contents 2024-12-29 22:38:23 +01:00
Ralf Gommers df42f79c4c docs: update extensions and install pages with last wiki edits
I went through the wiki pages and found two pages with edits that
weren't reflected in the html docs yet, so syncing that content here.
2024-12-26 21:10:32 +01:00
Martin Kroeker 17803e7901 Merge pull request #5031 from david-cortes/fix_doc_links
Fix invalid link to FAQ
2024-12-24 23:20:48 +01:00
david-cortes 762fa1afa9 fix link to faq 2024-12-24 19:48:04 +01:00
Martin Kroeker 6af4e76f31 Merge pull request #5029 from martin-frbg/issue5020
Add support for compiling with Intel oneAPI 2025.0 on MS Windows
2024-12-24 16:10:20 +01:00
Martin Kroeker fbf594b62f Guard against empty CMAKE_Fortran_COMPILER_ID 2024-12-24 13:34:33 +01:00
tingbo.liao c4c3d9e68a Merge remote-tracking branch 'refs/remotes/origin/develop' into develop 2024-12-24 10:36:53 +08:00
tingbo.liao 0bea1cfd9d Optimize the zgemm_tcopy_4_rvv function to be compatible with the situations where the vector lengths(vlens) are 128 and 256.
Signed-off-by: tingbo.liao <tingbo.liao@starfivetech.com>
2024-12-24 10:33:27 +08:00
Martin Kroeker e6fd629770 Expressly declare the .S extension for assembly (documented as standard, but current cmake does not set it for icx) 2024-12-23 23:18:52 +01:00
Martin Kroeker 05fe49ddaf Rename local copy functions to avoid name clash with the standard BLAS ones 2024-12-23 19:12:17 +01:00
Martin Kroeker 64c6c79201 Assume no underline suffixes on symbols when compiling with Intel ifx on Windows 2024-12-23 19:09:34 +01:00
Martin Kroeker 5c9417d306 Assume no underline suffixes on symbols when compiling with ifx on Windows 2024-12-23 19:07:39 +01:00
Martin Kroeker 5d81e514e4 Assume no underline suffixes on symbols when compiling with ifx on Windows 2024-12-23 19:06:03 +01:00
Martin Kroeker d78fbe425c Assume no underline suffixes on symbols when compiling with ifx on Windows 2024-12-23 19:04:50 +01:00
Martin Kroeker 30188a55d1 Don't assume underlined symbols for ifx; make cpuid.S inclusion conditional 2024-12-23 19:02:34 +01:00
Martin Kroeker 32319a33ac Add options for Intel oneAPI 2025.0 ifx on Windows 2024-12-23 19:00:48 +01:00
Martin Kroeker 37a4ca7e46 Merge pull request #5025 from martin-frbg/nvidia_arm64
Add target-specific options to enable ARM64 SVE with the NVIDIA compiler
2024-12-19 23:30:53 -08:00
Martin Kroeker 1c4401ebf1 Add target-specific options to enable SVE with the NVIDIA compiler 2024-12-19 14:32:24 -08:00
Martin Kroeker f2be482d43 Merge pull request #5024 from martin-frbg/issue5001
Improve the wording of the build instructions for Windows on Arm in the docs
2024-12-18 23:05:20 -08:00
Martin Kroeker 70dddacb9f Merge pull request #5023 from rgommers/fix-warnings
Fix two compiler warnings in `memory.c`
2024-12-18 16:13:12 -08:00
Martin Kroeker a93d3db34a fix formatting of WoA section 2024-12-19 00:53:10 +01:00
Martin Kroeker e460512685 Update WoA build instructions from rewording in issue #5001 2024-12-19 00:50:37 +01:00
Martin Kroeker d3cc8c65ed Merge pull request #5022 from tingboliao/develop
Replace the __riscv_vid_v_i32m2 and __riscv_vid_v_i64m2 with __riscv…_vid_v_u32m2 and __riscv_vid_v_u64m2 for riscv64-unknown-linux-gnu-gcc compiling.
2024-12-18 14:29:39 -08:00
Ralf Gommers 765ad8bcd2 Fix guard around alloc_hugetlb, fixes compile warning
The warning was:
```
/home/rgommers/code/pixi-dev-scipystack/openblas/OpenBLAS/driver/others/memory.c: At top level:
/home/rgommers/code/pixi-dev-scipystack/openblas/OpenBLAS/driver/others/memory.c:2565:14: warning: 'alloc_hugetlb' defined but not used [-Wunused-function]
 2565 | static void *alloc_hugetlb(void *address){
      |              ^~~~~~~~~~~~~
```

The added define is the same as is already present in the TLS part of
`memory.c`. This follows up on gh-4681.
2024-12-18 09:42:05 +01:00
Ralf Gommers 48caf2303d Fix build warning about discarding volatile qualifier in memory.c
The warning was:
```
[4339/5327] Building C object driver/others/CMakeFiles/driver_others.dir/memory.c.o
/home/rgommers/code/pixi-dev-scipystack/openblas/OpenBLAS/driver/others/memory.c: In function 'blas_shutdown':
/home/rgommers/code/pixi-dev-scipystack/openblas/OpenBLAS/driver/others/memory.c:3257:10: warning: passing argument 1 of 'free' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
 3257 |     free(newmemory);
      |          ^~~~~~~~~
In file included from /home/rgommers/code/pixi-dev-scipystack/openblas/OpenBLAS/common.h:83,
                 from /home/rgommers/code/pixi-dev-scipystack/openblas/OpenBLAS/driver/others/memory.c:74:
/home/rgommers/code/pixi-dev-scipystack/openblas/.pixi/envs/default/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:482:25: note: expected 'void *' but argument is of type 'volatile struct newmemstruct *'
  482 | extern void free (void *__ptr) __THROW;
      |                   ~~~~~~^~~~~
```

The use of `volatile` for `newmemstruct` seems on purpose, and there are
more such constructs in this file. The warning appeared after gh-4451
and is correct. The `free` prototype doesn't expect a volatile pointer,
hence this change adds a cast to silence the warning.
2024-12-18 08:53:29 +01:00
tingbo.liao d00cc400b1 Replaced the __riscv_vid_v_i32m2 and __riscv_vid_v_i64m2 with __riscv_vid_v_u32m2 and __riscv_vid_v_u64m2 for riscv64-unknown-linux-gnu-gcc compiling.
Signed-off-by: tingbo.liao <tingbo.liao@starfivetech.com>
2024-12-18 08:38:30 +08:00
Martin Kroeker 229d8a025e Merge pull request #4959 from CDAC-Bengaluru/level-1-sve
SVE Implementation for Level-1 BLAS Routines
2024-12-13 05:20:51 -08:00
SushilPratap04 3368a4e697 Update swap_kernel_sve.c 2024-12-13 16:47:58 +05:30
CDAC-SSDG dd71e4234a Added Updated swap and rot sve kernels. 2024-12-13 11:15:29 +05:30
CDAC-SSDG 06ffd411a5 Update KERNEL.ARMV8SVE 2024-12-13 11:05:47 +05:30
CDAC-SSDG 41912f9c22 Update CONTRIBUTORS.md 2024-12-13 11:05:10 +05:30
CDAC-SSDG 765850194e Delete kernel/arm64/swap_kernel_sve.c 2024-12-13 11:02:01 +05:30
CDAC-SSDG c17c19fbcf Delete kernel/arm64/swap_kernel_c.c 2024-12-13 11:01:46 +05:30
CDAC-SSDG f6416c0e37 Delete kernel/arm64/swap.c 2024-12-13 11:01:32 +05:30
CDAC-SSDG 3b7b74664c Delete kernel/arm64/scal_kernel_sve.c 2024-12-13 11:01:03 +05:30
CDAC-SSDG 95a97012e8 Delete kernel/arm64/scal_kernel_c.c 2024-12-13 11:00:45 +05:30
CDAC-SSDG 5540f2121e Delete kernel/arm64/scal.c 2024-12-13 11:00:12 +05:30
CDAC-SSDG f62519cc87 Delete kernel/arm64/rot_kernel_sve.c 2024-12-13 10:59:35 +05:30
CDAC-SSDG 10857c9df4 Delete kernel/arm64/rot_kernel_c.c 2024-12-13 10:58:51 +05:30
CDAC-SSDG b9f51a5cf7 Delete kernel/arm64/rot.c 2024-12-13 10:58:06 +05:30
Martin Kroeker 89f02ed394 Merge pull request #5014 from martin-frbg/issue5013
Add some missed lapack 3.11+ symbols to gensymbol
2024-12-10 23:09:33 -08:00
Martin Kroeker 61d5aec7c1 remove typo 2024-12-11 00:41:56 +01:00
Martin Kroeker 5aea097df0 add missing lapack 3.11+ symbols 2024-12-10 23:52:05 +01:00
Martin Kroeker 72f7b7011c Merge pull request #5009 from martin-frbg/pybenchdoc
DOCS, pybench : Add build notes for Windows and flang from gh Discussion 5008
2024-12-06 02:50:14 -08:00
Martin Kroeker 0f8ff82592 Add build notes for Windows and flang from gh Discussion 5008 2024-12-06 01:35:42 -08:00
Martin Kroeker 81666de4ef Merge pull request #5007 from martin-frbg/issue5006
Revert the NRM2 kernels for NeoverseN2 and ARMV8SVE targets to the generic NEON version
2024-12-05 14:43:03 -08:00
Martin Kroeker 230e665bca Merge pull request #4996 from iha-taisei/sdgemv_sve_unroll
Loop-unrolled transposed [SD]GEMV kernels for A64FX and Neoverse V1
2024-12-05 13:36:47 -08:00
Martin Kroeker 3345007d8f retire the thunderx2 NRM2 kernels due to reported inaccuracies and NAN 2024-12-05 21:12:06 +01:00
Martin Kroeker 5fe983db29 retire the thunderx2 nrm2 kernels for now due to NAN and inaccuracies 2024-12-05 21:09:53 +01:00
Martin Kroeker 5dc4d7dd7e Merge pull request #5005 from martin-frbg/evbarm
Improve support for NetBSD on arm64 (evbarm)
2024-12-05 00:02:58 -08:00
Martin Kroeker 4ba471dd5a Merge pull request #5003 from mathomp4/bugfix/nag-pic
Fixes for NAG Compiler
2024-12-04 15:41:12 -08:00
Martin Kroeker a791912cbb handle uname returning evbarm on NetBSD 2024-12-04 15:34:57 -08:00
Martin Kroeker 1a6ecda398 utilize /proc/cpuinfo on NetBSD too 2024-12-04 15:32:26 -08:00
Matthew Thompson c4e8bac5a5 Fix indent 2024-12-04 12:11:35 -05:00
Matthew Thompson d3b2036d49 Move to use ERROR STOP instead of ABORT 2024-12-04 12:09:24 -05:00
Matthew Thompson 35334ed2ea Fixes for Fortran Standards violations for lapack-netlib 2024-12-04 10:53:05 -05:00
Matthew Thompson be19966d3b Fixes for NAG CMake 2024-12-04 10:52:43 -05:00
Martin Kroeker 9c5d20187b Merge pull request #4999 from dg0yt/macro-failed
Fix redefinition of FAILED
2024-12-04 07:37:51 -08:00
Matthew Thompson 2eaf285de5 Use F_COMPILER name 2024-12-04 08:46:40 -05:00
Matthew Thompson a8b1705dbd CMake build has wrong PIC flag for NAG 2024-12-04 08:46:40 -05:00
Martin Kroeker 5f65846691 Merge pull request #4998 from dg0yt/arm-type-function
arm: Declare symbols as .type function
2024-12-04 01:50:53 -08:00
Kai Pastor 93eb42fdc8 Fix redefinition of FAILED 2024-12-03 09:45:04 +01:00
Kai Pastor dc905636d1 arm: Declare symbols as .type function 2024-12-03 07:42:44 +01:00
Iha, Taisei 4918beecbe Loop-unrolled transposed [SD]GEMV kernels for A64FX and Neoverse V1 2024-12-02 18:46:00 +09:00
Martin Kroeker 0c440f8a27 disable multithreading for small workloads 2024-11-27 23:15:41 +01:00
Martin Kroeker 0578a89afd Merge pull request #4993 from martin-frbg/issue4991
Translate CMAKE_SYSTEM_NAME in compilations on or for IOS
2024-11-27 02:54:41 -08:00
Martin Kroeker 57a51d74c9 translate CMAKE_SYSTEM_NAME in compilations on or for IOS 2024-11-27 09:52:56 +01:00
Martin Kroeker 35f2e6afe6 Merge pull request #4992 from mmuetzel/ci-msys2
CI (MinGW): Remove CLANG32 environment from build matrix.
2024-11-26 10:09:29 -08:00
Markus Mützel f5e6b5b5c9 CI (MinGW): Remove CLANG32 environment from build matrix.
The CLANG32 environment is in the process of being removed from MSYS2
currently:
https://www.msys2.org/news/#2024-09-23-starting-to-drop-the-clang32-environment

Remove it from the build matrix ahead of its complete removal from MSYS2.
2024-11-26 15:44:50 +01:00
Martin Kroeker 8e8003a2d1 Merge pull request #4180 from mmuetzel/cmake
CI (MinGW): Remove work-around needed for old versions of LLVM Flang
2024-11-26 06:41:48 -08:00
Martin Kroeker 71963a7bc4 Merge pull request #4985 from CheryDan/RISCV/sched
added optimizations for RISC-V YIELDING
2024-11-26 04:37:38 -08:00
Markus Mützel 7452af4471 CI (MinGW): Remove work-around with NO_AVX512 that was needed for older versions of LLVM Flang. 2024-11-26 13:02:27 +01:00
Martin Kroeker 82088cb266 Merge pull request #4986 from martin-frbg/readme_compilers
Add compiler version notes and mention the f2c fallback LAPACK in the README
2024-11-23 06:34:52 -08:00
Martin Kroeker 8481301f1a Merge pull request #4987 from martin-frbg/issue3973
Update build instructions for WoA (use LLVM19 and its flang-new)
2024-11-23 05:15:35 -08:00
Martin Kroeker 009c1e0387 fix download link for the current WoA binary of LLVM 2024-11-23 14:15:04 +01:00
Martin Kroeker 760a5371f3 Update build instructions for WoA (use LLVM19 and its flang-new) 2024-11-22 15:59:45 +01:00
Martin Kroeker 3a63bbabd1 Add compiler version notes and mention the f2c fallback LAPACK 2024-11-22 12:10:56 +01:00
Martin Kroeker c520ed1916 Merge pull request #4984 from rgommers/docs-link
doc: update README to link to the html docs and fix links
2024-11-22 01:58:45 -08:00
daichengrong 0b3db03d4b added optimizations for RISC-V YIELDING 2024-11-22 11:13:24 +08:00
Ralf Gommers a0131e56e0 doc: update README to link to the html docs and fix links
Also some minor formatting improvements and linking the home page.
2024-11-21 13:57:40 +01:00
Sébastien Villemot bfaf5b9ea4 Restore libsuffix support in pkg-config file
It had been mistakenly removed in 9ef10ffa49.
2024-11-20 11:41:52 +01:00
Martin Kroeker 18014b04c8 Merge pull request #4979 from martin-frbg/issue4978-2
Remove any optimization flags from DEBUG builds on POWER architecture
2024-11-17 15:11:18 -08:00
Martin Kroeker 9db51f790a Remove any optimization flags from DEBUG builds on POWER architecture 2024-11-17 23:19:58 +01:00
Martin Kroeker e334b79b47 Merge pull request #4977 from martin-frbg/issue4973
Add dummy implementations of openblas_get/set_affinity for OpenMP builds
2024-11-17 11:06:20 -08:00
Martin Kroeker 4060dd43e3 Add dummy implementations of openblas_get/set_affinity 2024-11-15 15:16:17 -08:00
Martin Kroeker d04686acd8 Re-enable the EXPRECISION option for non-Windows x86/x86_64 2024-11-14 14:09:01 -08:00
Martin Kroeker 2a290dfc2c forward GEMM3M calls for GENERIC targets to the regular C/ZGEMM for now 2024-11-14 14:07:08 -08:00
Martin Kroeker 926e56e389 Align GEMM3M parameters for GENERIC with ZGEMM and add P/Q/R 2024-11-14 14:04:25 -08:00
Martin Kroeker 2e2f952bfb Merge pull request #4975 from martin-frbg/fixup4974
Update Cray compiler options and calling convention in CMake
2024-11-13 23:51:47 -08:00
Martin Kroeker cea9df3643 Update Cray compiler options and calling convention 2024-11-13 14:56:30 -08:00
Martin Kroeker 3e7e312d7d Merge pull request #4974 from cenewcombe/develop
Corrections for Cray and Nvidia Fortran compiler calling conventions
2024-11-13 14:50:19 -08:00
Caroline Newcombe 10cf06dce1 Merge branch 'OpenMathLib:develop' into develop 2024-11-13 14:05:57 -06:00
Caroline Newcombe 760bf7aa37 Update Fortran return for complex data types (Cray and Nvidia compilers) 2024-11-13 14:05:20 -06:00
Martin Kroeker 2057cd75fd Merge pull request #4971 from martin-frbg/m4init
Add initial autodetection support for Apple M4 as VORTEX with HAVE_SME
2024-11-13 06:14:32 -08:00
Martin Kroeker 50da5c2b34 Add Apple M4 as VORTEX with HAVE_SME 2024-11-12 15:20:21 -08:00
Martin Kroeker 24c5152fbd Merge pull request #4966 from martin-frbg/getrf_indent
Fix misleading indentation warning in getrf
2024-11-06 23:04:02 +01:00
Martin Kroeker 2332ea7e7a fix misleading indentation 2024-11-06 18:35:31 +01:00
Martin Kroeker 794f75a8f7 Merge pull request #4965 from martin-frbg/homebrewjob-2
CI: Update upload-artifacts version in the homebrew workflow again
2024-11-06 18:04:05 +01:00
Martin Kroeker 87a18154ce Update version of upload-artifacts again 2024-11-06 14:44:11 +01:00
Martin Kroeker 453b9e4886 Merge pull request #4961 from h-vetinari/flang
explicitly link to OpenMP
2024-10-31 17:46:55 +01:00
H. Vetinari d3272e51eb explicitly link to OpenMP 2024-11-01 00:55:50 +11:00
Martin Kroeker c634114c8a Merge pull request #4960 from martin-frbg/gemmtr
Provide copies of GEMMT under its new name GEMMTR adopted by the Reference BLAS
2024-10-30 18:37:26 +01:00
Martin Kroeker 598bd21991 Merge pull request #4958 from XiWeiGu/x86_64_opt_somatcopy_ct_avx
x86_64: opt somatcopy_ct with AVX
2024-10-30 16:04:00 +01:00
Martin Kroeker c9d1a3b912 Merge pull request #4954 from XiWeiGu/la64_update_gh_actions
gh-actions: Test LoongArch64 with gcc14 from Ubuntu 24.04
2024-10-30 14:35:57 +01:00
Martin Kroeker c3e7d08fb4 Copy GEMMT to its new name GEMMTR 2024-10-30 12:56:16 +01:00
Martin Kroeker 0cf656fd3e Add copies of GEMMT under its new name GEMMTR 2024-10-30 12:55:14 +01:00
Martin Kroeker 24b5ccaf4b Merge pull request #4202 from TiborGY/inlines_pt2
Remove some unused inline macro definitions
2024-10-30 12:48:35 +01:00
Juliya32 3b2421cba0 Add files via upload 2024-10-30 14:23:42 +05:30
Juliya32 012fe4da36 Delete kernel/arm64/rot_kernel_sve.c 2024-10-30 14:23:15 +05:30
Juliya32 d90ee00f85 Delete kernel/arm64/rot_kernel_c.c 2024-10-30 14:22:51 +05:30
Juliya32 668e28adc4 Delete kernel/arm64/rot.c 2024-10-30 14:22:31 +05:30
SushilPratap04 fa880ab1cf Update KERNEL.ARMV8SVE
updated KERNEL.ARMV8SVE for level 1 sve (swap, rot and scal) kernels.
2024-10-30 14:09:37 +05:30
SushilPratap04 7822ae9617 Added sve kernels for rot routine. 2024-10-30 14:05:21 +05:30
SushilPratap04 b8bc2a752e Added sve optimized kernels for swap routine 2024-10-30 14:02:57 +05:30
CDAC-SSDG 0667cf6c92 Added optimized scal routine files 2024-10-30 14:01:09 +05:30
CDAC-SSDG 2718b37fed Update CONTRIBUTORS.md 2024-10-30 13:57:13 +05:30
gxw 73c6a28073 x86_64: opt somatcopy_ct with AVX 2024-10-29 07:06:15 +00:00
Martin Kroeker f66e6d32c2 Merge pull request #4953 from NickelWenzel/fix_trtrs_return_types
fix: return types of *trtrs routines
2024-10-25 23:29:24 +02:00
Martin Kroeker a8bb105ed6 Merge pull request #4848 from haampie/fix/cmake-min-version
cmake: set `CMP0042` to `NEW`
2024-10-25 20:59:13 +02:00
Martin Kroeker 0e6a2cc93c bump the minimum_required version instead 2024-10-25 16:47:52 +02:00
TGY 815cb24944 remove unused INLINE macro definitions 2024-10-25 15:29:51 +02:00
Martin Kroeker ac736820d7 Merge pull request #4955 from cdaley/optimize_gemv_forwarding
Optimize gemv forwarding on ARM64 systems
2024-10-25 13:43:54 +02:00
gxw 8f595382c4 gh-actions: Test LoongArch64 with gcc14 from Ubuntu 24.04 2024-10-25 05:00:54 +00:00
Chris Daley cb48505251 optimize gemv forwarding on ARM64 systems 2024-10-24 21:05:26 -07:00
nickel 79f4bbd4cd fix: return types of *trtrs routines 2024-10-24 11:20:02 +02:00
Martin Kroeker 72461f1c8c Merge pull request #4950 from ayappanec/fix-aix-build
Fix AIX build
2024-10-23 16:40:02 +02:00
Ayappan Perumal 020cce1068 Fix build issues with gcc compiler as well 2024-10-23 04:24:06 -05:00
Ayappan Perumal b6ec73e77c Fix AIX build 2024-10-21 07:38:03 -05:00
Martin Kroeker 8a0cd5fcef Merge pull request #4949 from martin-frbg/mingw32-14.2
work around mingw32-gfortran 14.2 miscompiling CBLAS1 tests
2024-10-20 21:52:57 +02:00
Martin Kroeker 4dba6ce6ea work around mingw32-gfortran 14.2 miscompiling CBLAS1 tests 2024-10-20 20:25:06 +02:00
Martin Kroeker a93ec74e95 Merge pull request #4948 from martin-frbg/fixhavesve
Properly report HAVE_SVE in ARM64 autodetection where applicable
2024-10-18 20:00:42 +02:00
Martin Kroeker c4bb4e74fc NeoverseN2 has SVE too 2024-10-18 14:50:55 +02:00
Martin Kroeker 86720778ef write HAVE_SVE to config where applicable 2024-10-18 14:14:43 +02:00
Martin Kroeker 016bdb9b0b Merge pull request #4946 from XiWeiGu/la64_omatcopy_lasx
LoongArch64: Opt somatcopy with LASX
2024-10-18 14:03:06 +02:00
gxw ffaa5765a4 Bench: Add omatcopy 2024-10-18 11:07:52 +08:00
Martin Kroeker a93897276b Merge pull request #4943 from martin-frbg/update_readme
Update README.md
2024-10-17 21:13:48 +02:00
Martin Kroeker 3fc1225dd6 Merge branch 'OpenMathLib:develop' into update_readme 2024-10-17 21:08:58 +02:00
Martin Kroeker 33078d11e4 stress importance of TARGET setting in DYNAMIC_ARCH builds 2024-10-17 21:07:49 +02:00
Martin Kroeker 15a57598f5 Merge pull request #4944 from ChipKerchner/vectorizeBF16GEMV
[POWER] Vectorize BF16 GEMV
2024-10-17 19:21:07 +02:00
Chip Kerchner ab71a1edf2 Better VSX. 2024-10-17 08:25:02 -05:00
gxw bb31bbef52 LoongArch64: Opt somatcopy_ct with LASX 2024-10-17 11:45:13 +00:00
gxw b37129341b LoongArch64: Opt somatcopy_cn with LASX 2024-10-17 11:27:55 +00:00
gxw acf6cab304 LoongArch64: Opt somatcopy_rn with LASX 2024-10-17 09:50:02 +00:00
gxw 15edb441bf LoongArch64: Opt somatcopy_rt with LASX 2024-10-17 09:15:42 +00:00
Martin Kroeker 457d1c6972 remove unused CI badges, wiki->docs, xianyi->OpenMathLib 2024-10-17 10:33:08 +02:00
Martin Kroeker 6a60eb1a02 Merge pull request #4924 from XiWeiGu/la64_readme
LoongArch64: Update README.md
2024-10-16 09:38:18 +02:00
Martin Kroeker 8483a71169 Merge pull request #4937 from martin-frbg/lapack1064
Fix leading dimension for B in LAPACK tests for GGEV (Reference-LAPACK PR 1064)
2024-10-14 21:52:41 +02:00
Martin Kroeker 22628f1a69 Fix leading dimension for B (Reference-LAPACK PR 1064) 2024-10-14 18:59:03 +02:00
Martin Kroeker 27ed6da331 Fix leading dimension for B (Reference-LAPACK PR 1064) 2024-10-14 18:57:50 +02:00
Martin Kroeker 7018c1b001 Fix leading dimension for B (Reference-LAPACK PR 1064) 2024-10-14 18:56:44 +02:00
Martin Kroeker a659f40fe1 Fix leading dimension for B (Reference-LAPACK PR 1064) 2024-10-14 18:53:30 +02:00
Martin Kroeker c979c1d948 Merge pull request #4936 from martin-frbg/fixmips64generic
Fix unroll parameter selection for MIPS64_GENERIC
2024-10-14 08:13:27 +02:00
Martin Kroeker a47b3c8867 Fix unroll parameter selection for MIPS64_GENERIC 2024-10-13 22:54:34 +02:00
Chip Kerchner 2391dc1c0f Merge branch 'vectorizeBF16GEMV' of github.ibm.com:PowerAppLibs/OpenBLAS into vectorizeBF16GEMV 2024-10-13 13:48:33 -05:00
Chip Kerchner 36bd3eeddf Vectorize BF16 GEMV (VSX & MMA). Use GEMM_GEMV_FORWARD_BF16 (for Power). 2024-10-13 13:46:11 -05:00
Chip Kerchner f8e113f27b Replace types with include file. 2024-10-13 10:55:03 -05:00
Chip Kerchner a53a197934 Merge remote-tracking branch 'origin/develop' into vectorizeBF16GEMV 2024-10-12 15:15:17 -05:00
Martin Kroeker 3184b7f209 Merge pull request #4933 from ChipKerchner/thread_sbgemv
Change multi-threading logic for SBGEMV to be the same as SGEMV.
2024-10-12 17:19:41 +02:00
Chip Kerchner 0082240044 Merge branch 'thread_sbgemv' into vectorizeBF16GEMV 2024-10-11 16:13:59 -05:00
Chip Kerchner 1d51ca5798 Change multi-threading logic for SBGEMV to be the same as SGEMV. 2024-10-11 16:08:48 -05:00
Chip Kerchner c8f53b85ce Merge remote-tracking branch 'origin/develop' into vectorizeBF16GEMV 2024-10-11 11:10:20 -05:00
Martin Kroeker 18a23c23f7 Merge pull request #4929 from martin-frbg/issue4905
Fix CBLAS_?GEMMT filling in the wrong triangle for Row-Major
2024-10-11 08:54:02 +02:00
Martin Kroeker 5a79446bdb Merge pull request #4918 from HaoZeke/testFixes
TST,BUG: Explicitly allow running tests multiple times
2024-10-10 21:53:18 +02:00
Martin Kroeker 7ba6591ff2 Merge branch 'OpenMathLib:develop' into issue4905 2024-10-10 21:50:38 +02:00
Martin Kroeker 550bc77832 Fix expectation values for CblasRowMajor order 2024-10-10 20:39:29 +02:00
Martin Kroeker e0ad20f72b Merge pull request #4932 from martin-frbg/cirrusosxndk
Update Android NDK install path for M1/armv7 crossbuild on CirrusCI
2024-10-10 16:18:07 +02:00
Martin Kroeker e4bc5e4718 remove stray quote 2024-10-10 11:02:56 +02:00
Martin Kroeker b89fb9632f Update Android NDK install path for M1/armv7 crossbuild 2024-10-10 10:19:11 +02:00
Martin Kroeker e52d9b4cf1 Merge pull request #4928 from austinpagan/czgemm_in_c
CGEMM & ZGEMM using C code, Power only, P10 only.
2024-10-09 20:26:21 +02:00
Martin Kroeker dbd83762f9 Merge pull request #4926 from NickelWenzel/fix_arm64_windows_and_uwp
fix: add missing NO_AFFINITY checks
2024-10-09 19:48:16 +02:00
Martin Kroeker 9762464718 Fix CBLAS interface filling in the wrong triangle for Row-Major 2024-10-09 18:06:39 +02:00
Gordon Fossum 0b7fb5c791 CGEMM & ZGEMM using C code. 2024-10-09 09:42:23 -05:00
NickelWenzel bee123e8e3 fix: add missing NO_AFFINITY checks 2024-10-09 16:36:40 +02:00
Martin Kroeker 7ac5b9011f Merge pull request #4923 from martin-frbg/zen5
Add preliminary cpu autodetection for Zen5/5c
2024-10-09 16:18:47 +02:00
gxw 3ab8b1408e LoongArch64: Update README.md 2024-10-09 16:32:54 +08:00
Martin Kroeker 2c3b87a082 Add preliminary cpu autodetection for Zen5/5c 2024-10-08 23:07:42 +02:00
Martin Kroeker 73c1882129 Merge pull request #4922 from martin-frbg/issue4904-2
Update names of Loongarch64 targets in cmake cross-building
2024-10-07 13:24:14 +02:00
Martin Kroeker bc0691a556 Merge pull request #4920 from martin-frbg/issue4917
Fix potential inaccuracy in multithreaded level3 related to SWITCH_RATIO
2024-10-07 08:26:03 +02:00
Martin Kroeker b0346e72f4 update names of loongarch64 targets for cross-compilation 2024-10-06 22:48:33 +02:00
Martin Kroeker 9c707dc6b9 Update dynamic arch list to new target scheme 2024-10-06 22:46:03 +02:00
Martin Kroeker 9783dd07ab Rename KERNEL.LOONGSONGENERIC to KERNEL.LA64_GENERIC 2024-10-06 22:43:11 +02:00
Martin Kroeker 0dfe42d62a Merge pull request #4919 from martin-frbg/issue4916-2
Handle inf/nan in ppc440 s/dscal
2024-10-06 22:29:28 +02:00
Chip Kerchner d6bb8dcfd1 Common code. 2024-10-06 14:13:43 -05:00
Martin Kroeker 8a1710dd0d don't apply switch_ratio to tail of loop 2024-10-06 20:03:32 +02:00
Martin Kroeker c9e92348a6 Handle inf/nan if dummy2 flag is set 2024-10-06 19:57:17 +02:00
Rohit Goswami d9f368dfe6 TST: Signal abort for ctest failures correctly 2024-10-05 16:24:16 +00:00
Rohit Goswami 722e4ae07a MAINT: Explicitly replace instead of unknown 2024-10-05 16:23:02 +00:00
Rohit Goswami a6b7751881 BUG: Allow tests to be run multiple times
Without failures due to existing files
2024-10-05 16:22:56 +00:00
Chip Kerchner 9ac0fb0111 Merge branch 'develop' into vectorizeBF16GEMV 2024-10-04 06:49:53 -05:00
Martin Kroeker 624e9d110e Merge pull request #4916 from martin-frbg/issue4901
Fix SIGILL/SIGSEGV in PPCG4 SGEMM and fix NAN handling in PPCG4 SSCAL/DSCAL
2024-10-03 23:25:45 +02:00
Martin Kroeker d714013ab9 change sgemm kernel to 4x4 as the 16x4 altivec goes out of bounds 2024-10-03 22:04:20 +02:00
Martin Kroeker 7c4f3638fd switch PPCG4 SGEMM kernel to 4x4 2024-10-03 22:00:15 +02:00
Chip Kerchner 915a6d6e44 Add casting. 2024-10-03 14:08:21 -05:00
Chip Kerchner 7ec3c16d82 Remove beta from optimized functions. 2024-10-03 13:27:33 -05:00
Martin Kroeker 54afc24e4d Merge pull request #4906 from XiWeiGu/arm64_cmake_small_matrix_opt
ARM64: Enable SMALL_MATRIX_OPT when compiling with CMake
2024-10-03 20:05:11 +02:00
Martin Kroeker b4495a8fb8 Merge branch 'develop' into arm64_cmake_small_matrix_opt 2024-10-03 20:04:52 +02:00
Martin Kroeker 68eefe60b9 Merge pull request #4915 from martin-frbg/issue4907
Support LoongArch64 compilation with LLVM
2024-10-03 18:29:29 +02:00
Martin Kroeker 4f00f02567 Do not add -mabi flags for Loongson when the compiler is flang 2024-10-03 16:06:33 +02:00
Martin Kroeker f817f26062 Add simpler EPILOGUE for clang 2024-10-03 16:01:10 +02:00
Martin Kroeker a492181665 filter out Loongarch -mabi options for flang-new 2024-10-03 15:58:47 +02:00
Martin Kroeker de421b7764 Merge pull request #4904 from XiWeiGu/la64_cross_cmake
LoongArch64: Enable cmake cross-compilation
2024-10-03 15:53:57 +02:00
Martin Kroeker edaf5933c4 Merge pull request #4913 from martin-frbg/issue4912
Declare the input array in CBLAS_?GEADD as const in cblas.h
2024-10-02 23:37:15 +02:00
Martin Kroeker 71131406ae Declare the input array in CBLAS_?GEADD as const 2024-10-02 18:32:48 +02:00
Chip Kerchner 7cc00f68c9 Remove more duplicate. 2024-10-01 11:23:32 -05:00
Chip Kerchner e238a68c03 Remove duplicate. 2024-10-01 11:06:23 -05:00
Martin Kroeker f10d47c4bb Merge pull request #4910 from martin-frbg/issue4908
fix placement of -fopenmp in the pkgconfig file
2024-10-01 17:49:12 +02:00
Chip Kerchner 32095b0cbb Remove parameter. 2024-10-01 09:32:42 -05:00
Martin Kroeker a1073f5eed Merge pull request #4900 from XiWeiGu/la64_core_rename
LoongArch64: Rename core
2024-10-01 15:29:16 +02:00
Martin Kroeker fa77561396 add openmp option to pkgconfig template 2024-10-01 13:32:45 +02:00
Martin Kroeker 176107d23a Add -fopenmp to cflags in pkgconfig file if set 2024-10-01 13:31:14 +02:00
Martin Kroeker 0228d36211 move -fopenmp to CFLAGS 2024-09-30 21:38:05 +02:00
gxw 7087b0a7d0 ARM64: Enable SMALL_MATRIX_OPT when compiling with CMake 2024-09-29 10:31:26 +08:00
gxw 30af9278dc LoongArch64: Enable cmake cross-compilation 2024-09-29 10:13:30 +08:00
gxw 48698b2b1d LoongArch64: Rename core
Use microarchitecture name instead of meaningless strings to name the core,
the legacy core is still retained.
1. Rename LOONGSONGENERIC to LA64_GENERIC
2. Rename LOONGSON3R5 to LA464
3. Rename LOONGSON2K1000 to LA264
2024-09-29 09:35:21 +08:00
Chip Kerchner c8788208c8 Fixing block issue with transpose version. 2024-09-27 13:27:03 -05:00
Chip Kerchner d7c0d87cd1 Small changes. 2024-09-26 15:21:29 -05:00
Chip Kerchner eb6f3a05ef Common MMA code. 2024-09-26 09:28:56 -05:00
Chip Kerchner fb287d17fc Common code. 2024-09-25 16:31:36 -05:00
Chip Kerchner 8ab6245771 Small change. 2024-09-24 16:50:21 -05:00
Chip Kerchner df19375560 Almost final code for MMA. 2024-09-24 16:30:01 -05:00
Chip Kerchner 05aa63e738 More MMA BF16 GEMV code. 2024-09-24 12:54:02 -05:00
Chip Kerchner c9ce37d527 Force vector pairs in clang. 2024-09-23 08:43:58 -05:00
Chip Kerchner 89a12fa083 MMA BF16 GEMV code. 2024-09-23 06:32:14 -05:00
Martin Kroeker 92f7a2dc3e Merge pull request #4899 from martin-frbg/flangmtune
Strip any mtune option from FFLAGS is the compiler is flang-new
2024-09-19 14:15:06 +02:00
Martin Kroeker 969bb949b1 Strip any mtune option from FFLAGS is the compiler is flang-new 2024-09-19 11:10:28 +02:00
Martin Kroeker fca86e359c Merge pull request #4887 from goplanid/develop
Small GEMM improvements for AArch64 with SVE
2024-09-16 11:17:19 +02:00
Chip Kerchner 7947970f9d Move common code. 2024-09-13 06:22:13 -05:00
Martin Kroeker 60c1519e01 Merge pull request #4896 from martin-frbg/update_azure_mac_hpc
AzureCI: Update Intel oneAPI download for Mac to final version
2024-09-12 21:09:28 +02:00
Martin Kroeker c8313d9d80 Merge pull request #4895 from martin-frbg/update_homebrewjob
CI: Update nightly-homebrew workflow
2024-09-12 21:09:10 +02:00
Martin Kroeker b588e922a1 Update oneAPI download location for Mac to final 2024-09-12 18:13:46 +02:00
Martin Kroeker 4178905fa7 Update version of upload-artifacts following deprecation 2024-09-12 16:39:20 +02:00
Martin Kroeker 5f70e245a2 Merge pull request #4894 from martin-frbg/issue4893
Fix function definition in the f2c-converted ctest and remove suppression of gcc14 error
2024-09-12 15:09:54 +02:00
Martin Kroeker 383e0b133e remove suppression of gcc14's incompatible pointer error 2024-09-11 22:21:09 +02:00
Martin Kroeker 869a169c57 Fix ZAXPYTEST prototype 2024-09-11 22:18:14 +02:00
Chip Kerchner 72216d28c2 Fix bug with inc_y adding results twice. 2024-09-11 08:47:32 -05:00
Chip Kerchner 2f142ee857 More common code. 2024-09-09 14:41:55 -05:00
Chip Kerchner 39fd29f1de Minor improvement and turn off BF16 GEMV forwarding by default. 2024-09-08 18:28:31 -05:00
Chip Kerchner 8541b25e1d Special case beta is one. 2024-09-06 14:48:48 -05:00
Chip Kerchner 76227e2948 Initial commit for vectorized BF16 GEMV. Added GEMM_GEMV_FORWARD_BF16 to enable using BF16 GEMV for one dimension matrices. Updated unit test to support inc_x != 1 or inc_y for GEMV. 2024-09-06 14:03:31 -05:00
Deeksha Goplani 4894c54055 Improve TN case with further unrolling 2024-09-02 22:22:49 +05:30
Martin Kroeker 485027563e Merge pull request #4883 from ChipKerchner/fixSGEMMUnitTestZeroSize
Fix SBGEMM unit test to handle zero elements.
2024-08-17 11:47:26 +02:00
Chip Kerchner 89702e1f4a Fix zero element GEMV test. 2024-08-16 11:37:39 -05:00
Chip Kerchner 77f85c7c00 GEMV tests don't like zero elements. 2024-08-16 11:15:32 -05:00
Chip Kerchner 868aa857bc Change malloc zero to return one byte and update the SBGEMM test to again use sizes of zero. 2024-08-16 10:28:10 -05:00
Chip Kerchner b1802f4dc8 Fix unit test to start at 1 instead of 0 - since malloc zero bytes fails on some systems. 2024-08-16 09:51:37 -05:00
Martin Kroeker f61930eb11 Merge pull request #4882 from martin-frbg/issue4805-3
Restore the workaround in the POTRS utest as it is reportedly still needed on 3C6000/gcc14.2
2024-08-16 11:24:51 +02:00
Martin Kroeker dfba3f8841 restore the pragma as it is reportedly still needed on 3C6000/gcc14.2 2024-08-16 11:23:19 +02:00
Martin Kroeker 7129a64d87 Merge pull request #4881 from martin-frbg/issue4805-2
Use fld.d/fst.d in PROLOGUE/EPILOGUE in LOONGSON3R5 GEMM
2024-08-16 08:47:12 +02:00
Martin Kroeker 49080b631e remove optimizer pragma again 2024-08-15 22:15:27 +02:00
Martin Kroeker e05d98d00a expressly use fld.d/fst.d for floating point registers instead of LD/ST macros 2024-08-15 22:14:29 +02:00
Martin Kroeker 3ee9e9d8d0 Merge pull request #4879 from martin-frbg/issue4868-2
Ensure a memory buffer has been allocated for each thread before invoking it (take 2)
2024-08-15 22:06:54 +02:00
Martin Kroeker dd71df8fab Merge pull request #4880 from ChipKerchner/betterPowerGEMVTail
[POWER] Vectorize SGEMV transpose reduce stage
2024-08-15 20:36:22 +02:00
Martin Kroeker a8d6b0219a Merge pull request #4877 from XiWeiGu/fixed_undefined_blas_set_parameter
Fixed the undefined reference to blas_set_parameter
2024-08-15 15:35:26 +02:00
Martin Kroeker d24b3cf393 properly fix buffer allocation and assignment 2024-08-15 15:32:58 +02:00
Chip Kerchner a0aeba631d Merge branch 'develop' into betterPowerGEMVTail 2024-08-15 08:00:00 -05:00
Martin Kroeker eba8615c11 Merge pull request #4876 from martin-frbg/granite
Add autodetection support for Intel Granite Rapids as Sapphire Rapids
2024-08-15 13:50:54 +02:00
Martin Kroeker bc80e7f02d Merge pull request #4878 from martin-frbg/cirrus-androidndk
Cirrus CI: fix installation of NDK in armv7 crossbuild
2024-08-15 13:50:09 +02:00
Martin Kroeker 94c9e0b7ad Update ndk version number 2024-08-15 11:30:23 +02:00
Martin Kroeker ed0321563a fix installation of NDK in armv7 crossbuild 2024-08-15 11:11:07 +02:00
gxw fd033467ac Fixed the undefined reference to blas_set_parameter
Fixed the undefined reference to blas_set_parameter when
enabling USE_OPENMP and DYNAMIC_ARCH.
2024-08-15 16:48:48 +08:00
Martin Kroeker 1b8e40874e Add autodetection support for Intel Granite Rapids as Sapphire Rapids 2024-08-15 09:33:42 +02:00
Martin Kroeker 4944148e66 Merge pull request #4875 from ChipKerchner/addGEMVtoBF16Test
Add GEMV to SBGEMx vs SGEMx testing
2024-08-15 09:32:11 +02:00
Martin Kroeker a388c4b834 Merge pull request #4872 from chenx97/ls3a-fix-stack-fpr-len
Use ldc1 and sdc1 for the prologue and epilogue on LOONGSON3A
2024-08-15 00:10:16 +02:00
Martin Kroeker f24b521709 Merge pull request #4787 from vlad0x00/patch-1
Update cross compile info
2024-08-15 00:09:53 +02:00
Vladimir Nikolić 2d84ed7e76 Update README.md 2024-08-14 14:31:35 -07:00
Chip Kerchner 083faf7556 Merge branch 'develop' into betterPowerGEMVTail 2024-08-14 15:56:03 -05:00
Chip Kerchner c23897f585 Add GEMV testing to SBGEMx vs SGEMx testing. 2024-08-14 15:55:23 -05:00
Martin Kroeker 0d8ee96f1e Merge pull request #4874 from martin-frbg/issue4869
Fix handling of deprecated ?GELQS/?GEQRS in building the shared library
2024-08-14 22:49:12 +02:00
Martin Kroeker b80671d896 Merge pull request #4871 from martin-frbg/issue4868
Ensure a buffer has been allocated for each thread before invoking it
2024-08-14 20:53:39 +02:00
Martin Kroeker 6452f7b46d Merge pull request #4873 from ChipKerchner/fixSBGEMMDefaults
[POWER] Problem with multi-threaded SBGEMM
2024-08-14 19:22:03 +02:00
Chip Kerchner 75472b830a Merge branch 'develop' into betterPowerGEMVTail 2024-08-14 10:52:46 -05:00
Martin Kroeker ca7777de18 Merge pull request #4870 from chenx97/fix-recursive-make-var
Fix recursive variable expansion in Makefiles for LOONGSON3A
2024-08-14 16:03:50 +02:00
Martin Kroeker f6469e21bc move gelqs and geqrs to lapack-deprecated 2024-08-14 16:00:43 +02:00
Chip Kerchner 31226740d6 Cleanup of SBGEMM unit test. 2024-08-14 08:10:25 -05:00
Henry Chen ef94b96530 Use ldc1 and sdc1 for the prologue and epilogue on LOONGSON3A
This fix is similar to
2d8064174c.
2024-08-14 18:05:11 +08:00
Martin Kroeker 23b5d66a86 Ensure a memory buffer has been allocated for each thread before invoking it 2024-08-14 10:35:44 +02:00
Henry Chen 20bdb65882 Fix recursive variable expansion in Makefiles for LOONGSON3A 2024-08-14 15:08:32 +08:00
Chip Kerchner b1737698db Fix DEFAULTS in SBGEMM for POWER10. Also comparisons for SBGEMM unit test can be exactly due to epilison differences. 2024-08-13 07:01:21 -05:00
Martin Kroeker e5525036e7 Merge pull request #4865 from martin-frbg/issue4856
Tweak LAPACK STFSM test threshold a little more to cover POWER10 fma
2024-08-13 07:20:06 +02:00
Martin Kroeker fd52d09490 Merge pull request #4864 from martin-frbg/issue4862
Spell out function prototypes in the SYRK calls of potrf_parallel
2024-08-13 00:16:45 +02:00
Martin Kroeker 35dd625adf Merge pull request #4859 from martin-frbg/cooper_sb
Address clang array overflow warning in the SBGEMV microkernel for Cooper Lake
2024-08-12 22:05:43 +02:00
Martin Kroeker d8f740791a tweak threshold a little more to cover POWER10 fma 2024-08-12 14:50:49 +02:00
Martin Kroeker 73e13b0273 flesh out HERK prototype 2024-08-12 14:45:40 +02:00
Martin Kroeker 824306baab flesh out HERK prototype 2024-08-12 14:44:13 +02:00
Martin Kroeker 7ca835a82c address clang array overflow warning 2024-08-10 13:44:56 +02:00
Martin Kroeker a87c4d26dd Merge pull request #4857 from nekopsykose/ppc
fix cmake typo for power10 cc version check
2024-08-10 00:15:28 +02:00
psykose 1265eee85c fix cmake typo for power10 cc version check
fixes 668f48f4fc
2024-08-09 20:38:58 +02:00
Martin Kroeker cd3945b998 Update version to 0.3.28.dev 2024-08-08 23:09:45 +02:00
Martin Kroeker cbd321aecb Update versin to 0.3.28.dev 2024-08-08 23:08:52 +02:00
Martin Kroeker cb38d666da Merge pull request #4855 from OpenMathLib/release-0.3.0
Merge release branch back into develop to copy tag
2024-08-08 23:08:07 +02:00
Harmen Stoppels fe0a69e308 even less invasive 2024-08-07 16:43:45 +02:00
Harmen Stoppels f49371c1ba Set CMake 3.0 policies to NEW 2024-08-07 16:40:11 +02:00
Harmen Stoppels 1ef9f24b39 Revert "require consistent minimal cmake version"
This reverts commit 5b07ec643c.
2024-08-07 16:37:02 +02:00
Harmen Stoppels 5b07ec643c require consistent minimal cmake version 2024-08-07 09:43:47 +02:00
Chip Kerchner 1a7b8c650d Merge branch 'develop' into betterPowerGEMVTail 2024-08-01 14:59:12 -05:00
Chip Kerchner e2334d0218 Remove GEMV hack. 2024-08-01 14:44:40 -05:00
Chip Kerchner 66622de36d Hack: Test gemv vs gemm. 2024-07-19 07:26:08 -05:00
Chip Kerchner ba47c7f4f3 Vectorize reduction stage of sgemv_t. 2024-07-16 15:57:24 -05:00
Vladimir Nikolić c92104a605 Update cross compile info 2024-07-05 12:32:58 -07:00
508 changed files with 32404 additions and 10080 deletions
+13 -20
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_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -arch x86_64"
- 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"
- 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_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk -arch arm64 -miphoneos-version-min=10.0"
- 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"
- xcrun --sdk iphoneos --show-sdk-path
- ls -l /Applications
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
@@ -89,20 +89,13 @@ task:
type: text/plain
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
task:
name: AppleM1/LLVM armv7-androidndk xbuild
compile_script:
- brew install android-ndk
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
- ls /System/Volumes/Data/opt/homebrew
- ls -l /System/Volumes/Data/opt/homebrew/Caskroom/android-ndk
- find /System/Volumes/Data/opt/homebrew -name "armv7a-linux-androideabi*-ranlib"
- #export CC=/Applications/Xcode-13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
- #export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk -arch arm64 -miphoneos-version-min=10.0"
- export CC=/System/Volumes/Data/opt/homebrew/Caskroom/android-ndk/26d/AndroidNDK*.app/Contents/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
- 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"
always:
config_artifacts:
@@ -132,9 +125,9 @@ task:
- make USE_OPENMP=1
FreeBSD_task:
name: FreeBSD-gcc12
name: FreeBSD-gcc
freebsd_instance:
image_family: freebsd-13-3
image_family: freebsd-14-2
install_script:
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
compile_script:
@@ -143,9 +136,9 @@ FreeBSD_task:
FreeBSD_task:
name: freebsd-gcc12-ilp64
name: freebsd-gcc-ilp64
freebsd_instance:
image_family: freebsd-13-3
image_family: freebsd-14-2
install_script:
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
compile_script:
@@ -155,7 +148,7 @@ FreeBSD_task:
FreeBSD_task:
name: FreeBSD-clang-openmp
freebsd_instance:
image_family: freebsd-13-3
image_family: freebsd-14-2
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
+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,10 +87,16 @@ 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"
case "${{ matrix.build }}" in
@@ -102,6 +108,7 @@ jobs:
mkdir build && cd build
cmake -DDYNAMIC_ARCH=1 \
-DUSE_OPENMP=${{matrix.openmp}} \
-DOpenMP_Fortran_LIB_NAMES=omp \
-DINTERFACE64=${{matrix.ilp64}} \
-DNOFORTRAN=0 \
-DBUILD_WITHOUT_LAPACK=0 \
+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 }} \
+41 -10
View File
@@ -31,27 +31,28 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: install build deps
run: |
sudo apt-get update
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache \
gcc-${{ matrix.apt_triple }} gfortran-${{ matrix.apt_triple }} libgomp1-riscv64-cross
gcc-${{ matrix.apt_triple }} gfortran-${{ matrix.apt_triple }} libgomp1-riscv64-cross libglib2.0-dev
- name: checkout qemu
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: T-head-Semi/qemu
repository: XUANTIE-RV/qemu
path: qemu
ref: 1e692ebb43d396c52352406323fc782c1ac99a42
ref: e0ace167effcd36d1f82c7ccb4522b3126011479 # xuantie-qemu-9.0
- name: build qemu
run: |
# Force use c910v qemu-user
wget https://github.com/revyos/qemu/commit/5164bca5a4bcde4534dc1a9aa3a7f619719874cf.patch
wget https://github.com/revyos/qemu/commit/222729c7455784dd855216d7a2bec4bd8f2a6800.patch
cd qemu
patch -p1 < ../5164bca5a4bcde4534dc1a9aa3a7f619719874cf.patch
patch -p1 < ../222729c7455784dd855216d7a2bec4bd8f2a6800.patch
export CXXFLAGS="-Wno-error"; export CFLAGS="-Wno-error"
./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=riscv64-linux-user --disable-system
make -j$(nproc)
make install
@@ -82,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
+2 -2
View File
@@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os: [ubuntu-22.04]
fortran: [gfortran]
build: [make]
pyver: ["3.12"]
@@ -147,7 +147,7 @@ jobs:
OPENBLAS_NUM_THREADS=1 pytest benchmarks/bench_blas.py -k 'gesdd'
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: |
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
python-version: "3.10"
- name: Install MkDocs and doc theme packages
run: pip install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin
run: pip install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-mermaid2-plugin
- name: Build docs site
run: mkdocs build
+33 -18
View File
@@ -43,11 +43,13 @@ jobs:
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install -y gfortran cmake ccache libtinfo5
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
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
@@ -87,6 +89,14 @@ 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"
# Preserve whatever LDFLAGS may already contain
echo "LDFLAGS=${LDFLAGS:+$LDFLAGS }-L$GFORTRAN_LIBDIR" >> "$GITHUB_ENV"
- name: Build OpenBLAS
run: |
@@ -158,7 +168,7 @@ jobs:
strategy:
fail-fast: false
matrix:
msystem: [UCRT64, MINGW32, CLANG64, CLANG32]
msystem: [UCRT64, MINGW32, CLANG64]
idx: [int32, int64]
build-type: [Release]
include:
@@ -174,14 +184,6 @@ jobs:
idx: int32
target-prefix: mingw-w64-clang-x86_64
fc-pkg: fc
# Compiling with Flang 16 seems to cause test errors on machines
# with AVX512 instructions. Revisit after MSYS2 distributes Flang 17.
no-avx512-flags: -DNO_AVX512=1
- msystem: CLANG32
idx: int32
target-prefix: mingw-w64-clang-i686
fc-pkg: cc
c-lapack-flags: -DC_LAPACK=ON
- msystem: UCRT64
idx: int64
idx64-flags: -DBINARY=64 -DINTERFACE64=1
@@ -192,9 +194,6 @@ jobs:
idx64-flags: -DBINARY=64 -DINTERFACE64=1
target-prefix: mingw-w64-clang-x86_64
fc-pkg: fc
# Compiling with Flang 16 seems to cause test errors on machines
# with AVX512 instructions. Revisit after MSYS2 distributes Flang 17.
no-avx512-flags: -DNO_AVX512=1
- msystem: UCRT64
idx: int32
target-prefix: mingw-w64-ucrt-x86_64
@@ -203,8 +202,6 @@ jobs:
exclude:
- msystem: MINGW32
idx: int64
- msystem: CLANG32
idx: int64
defaults:
run:
@@ -280,8 +277,6 @@ jobs:
-DNUM_THREADS=64 \
-DTARGET=CORE2 \
${{ matrix.idx64-flags }} \
${{ matrix.c-lapack-flags }} \
${{ matrix.no-avx512-flags }} \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_Fortran_COMPILER_LAUNCHER=ccache \
..
@@ -369,3 +364,23 @@ jobs:
- name: Build OpenBLAS
run: |
make -j$(nproc) HOSTCC="ccache gcc" CC="ccache ${{ matrix.triple }}-gcc" FC="ccache ${{ matrix.triple }}-gfortran" ARCH=${{ matrix.target }} ${{ matrix.opts }}
neoverse_build:
if: "github.repository == 'OpenMathLib/OpenBLAS'"
runs-on: ubuntu-24.04-arm
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} lapack-test
+37
View File
@@ -0,0 +1,37 @@
name: harmonyos
on: [push, pull_request]
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: ubuntu-latest
env:
OHOS_NDK_CMAKE: $GITHUB_WORKSPACE/ohos-sdk/linux/native/build-tools/cmake/bin/cmake
COMMON_CMAKE_OPTIONS: |
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/ohos-sdk/linux/native/build/cmake/ohos.toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release \
steps:
- uses: actions/checkout@v4
- name: ndk-install
run: |
wget https://repo.huaweicloud.com/harmonyos/os/4.1.1-Release/ohos-sdk-windows_linux-public.tar.gz
tar -xf ohos-sdk-windows_linux-public.tar.gz
cd ohos-sdk/linux
unzip -q native-linux-x64-4.1.7.8-Release.zip
cd -
- name: build-armv8
run: |
mkdir build && cd build
${{ env.OHOS_NDK_CMAKE }} ${{ env.COMMON_CMAKE_OPTIONS }} -DOHOS_ARCH="arm64-v8a" \
-DTARGET=ARMV8 -DNOFORTRAN=1 ..
${{ env.OHOS_NDK_CMAKE }} --build . -j $(nproc)
+59 -73
View File
@@ -9,22 +9,31 @@ concurrency:
jobs:
TEST:
if: "github.repository == 'OpenMathLib/OpenBLAS'"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- target: LOONGSONGENERIC
triple: loongarch64-unknown-linux-gnu
triple: loongarch64-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC
- target: LOONGSON3R5
triple: loongarch64-unknown-linux-gnu
triple: loongarch64-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5
- target: LOONGSON2K1000
triple: loongarch64-unknown-linux-gnu
triple: loongarch64-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000
- target: LA64_GENERIC
triple: loongarch64-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC
- target: LA464
triple: loongarch64-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464
- target: LA264
triple: loongarch64-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264
- target: DYNAMIC_ARCH
triple: loongarch64-unknown-linux-gnu
triple: loongarch64-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC
steps:
@@ -33,33 +42,9 @@ jobs:
- name: Install APT deps
run: |
sudo apt-get update
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache
- name: Download and install loongarch64-toolchain
run: |
wget https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/download/8.1/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz
#wget https://github.com/loongson/build-tools/releases/download/2023.08.08/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz
tar -xf CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz -C /opt
- name: Checkout qemu
uses: actions/checkout@v3
with:
repository: qemu/qemu
path: qemu
ref: master
- name: Install qemu
run: |
cd qemu
./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=loongarch64-linux-user --disable-system --static
make -j$(nproc)
make install
- name: Set env
run: |
echo "LD_LIBRARY_PATH=/opt/cross-tools/target/usr/lib64:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=$GITHUB_WORKSPACE:/opt/cross-tools/bin:$PATH" >> $GITHUB_ENV
sudo apt-get update && \
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache qemu-user-static \
gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu gfortran-14-loongarch64-linux-gnu
- name: Compilation cache
uses: actions/cache@v3
@@ -80,54 +65,55 @@ jobs:
- name: Disable utest dsdot:dsdot_n_1
run: |
echo -n > utest/test_dsdot.c
echo "Due to the qemu versions 7.2 causing utest cases to fail,"
echo "Due to the current version of qemu causing utest cases to fail,"
echo "the utest dsdot:dsdot_n_1 have been temporarily disabled."
- name: Build OpenBLAS
run: make CC='ccache ${{ matrix.triple }}-gcc -static' FC='ccache ${{ matrix.triple }}-gfortran -static' ${{ matrix.opts }} HOSTCC='ccache gcc' -j$(nproc)
run: |
make CC='ccache ${{ matrix.triple }}-gcc-14 -static' FC='ccache ${{ matrix.triple }}-gfortran-14 -static' \
RANLIB='ccache ${{ matrix.triple }}-gcc-ranlib-14' ${{ matrix.opts }} HOSTCC='ccache gcc' -j$(nproc)
- name: Test
run: |
export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
qemu-loongarch64 ./utest/openblas_utest
qemu-loongarch64 ./utest/openblas_utest_ext
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat2 < ./ctest/sin2
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat2 < ./ctest/din2
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat2 < ./ctest/cin2
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat2 < ./ctest/zin2
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat3 < ./ctest/sin3
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat3 < ./ctest/din3
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat3 < ./ctest/cin3
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat3 < ./ctest/zin3
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat1
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat1
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat1
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat1
qemu-loongarch64-static ./utest/openblas_utest
qemu-loongarch64-static ./utest/openblas_utest_ext
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat2 < ./ctest/sin2
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat2 < ./ctest/din2
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat2 < ./ctest/cin2
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat2 < ./ctest/zin2
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat3 < ./ctest/sin3
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat3 < ./ctest/din3
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat3 < ./ctest/cin3
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat3 < ./ctest/zin3
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat1
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat1
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat1
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat1
rm -f ./test/?BLAT2.SUMM
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat2 < ./test/sblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat2 < ./test/dblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat2 < ./test/cblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat2 < ./test/zblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat2 < ./test/sblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat2 < ./test/dblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat2 < ./test/cblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat2 < ./test/zblat2.dat
rm -f ./test/?BLAT2.SUMM
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat2 < ./test/sblat2.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat2 < ./test/dblat2.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat2 < ./test/cblat2.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat2 < ./test/zblat2.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat2 < ./test/sblat2.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat2 < ./test/dblat2.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat2 < ./test/cblat2.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat2 < ./test/zblat2.dat
rm -f ./test/?BLAT3.SUMM
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat3 < ./test/sblat3.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat3 < ./test/dblat3.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat3 < ./test/cblat3.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat3 < ./test/zblat3.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat3 < ./test/sblat3.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat3 < ./test/dblat3.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat3 < ./test/cblat3.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat3 < ./test/zblat3.dat
rm -f ./test/?BLAT3.SUMM
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat3 < ./test/sblat3.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat3 < ./test/dblat3.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat3 < ./test/cblat3.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat3 < ./test/zblat3.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat3 < ./test/sblat3.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat3 < ./test/dblat3.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat3 < ./test/cblat3.dat
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat3 < ./test/zblat3.dat
+8 -2
View File
@@ -20,6 +20,12 @@ jobs:
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5
- target: LOONGSON2K1000
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000
- target: LA64_GENERIC
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC
- target: LA464
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464
- target: LA264
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264
- target: DYNAMIC_ARCH
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC
@@ -29,13 +35,13 @@ 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
run: |
sudo apt-get update
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache libglib2.0-dev
- name: Download and install loongarch64-toolchain
run: |
+2 -2
View File
@@ -41,14 +41,14 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache \
gcc-${{ matrix.triple }} gfortran-${{ matrix.triple }} libgomp1-mips64el-cross
gcc-${{ matrix.triple }} gfortran-${{ matrix.triple }} libgomp1-mips64el-cross libglib2.0-dev
- name: checkout qemu
uses: actions/checkout@v3
with:
repository: qemu/qemu
path: qemu
ref: 79dfa177ae348bb5ab5f97c0915359b13d6186e2
ref: ae35f033b874c627d81d51070187fbf55f0bf1a7
- name: build qemu
run: |
+1 -1
View File
@@ -69,7 +69,7 @@ jobs:
mv *.bottle.tar.gz bottles
- name: Upload bottle
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: openblas--HEAD.catalina.bottle.tar.gz
path: bottles
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
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_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:
+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
+7 -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
@@ -81,7 +81,10 @@ test/ZBLAT2.SUMM
test/ZBLAT3.SUMM
test/ZBLAT3_3M.SUMM
test/SHBLAT3.SUMM
test/SBBLAT2.SUMM
test/SBBLAT3.SUMM
test/BBLAT2.SUMM
test/BBLAT3.SUMM
test/cblat1
test/cblat2
test/cblat3
@@ -96,6 +99,9 @@ test/sblat3
test/sblat3_3m
test/test_shgemm
test/test_sbgemm
test/test_sbgemv
test/test_bgemm
test/test_bgemv
test/zblat1
test/zblat2
test/zblat3
+118 -26
View File
@@ -2,13 +2,14 @@
## Author: Hank Anderson <hank@statease.com>
##
cmake_minimum_required(VERSION 2.8.5)
cmake_minimum_required(VERSION 3.16.0)
set (CMAKE_ASM_SOURCE_FILE_EXTENSIONS "S")
project(OpenBLAS C ASM)
set(OpenBLAS_MAJOR_VERSION 0)
set(OpenBLAS_MINOR_VERSION 3)
set(OpenBLAS_PATCH_VERSION 28)
set(OpenBLAS_PATCH_VERSION 30.dev)
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
@@ -20,6 +21,8 @@ include(CMakePackageConfigHelpers)
#######
option(BUILD_WITHOUT_LAPACK "Do not build LAPACK and LAPACKE (Only BLAS or CBLAS)" OFF)
option(BUILD_WITHOUT_LAPACKE "Do not build the C interface to LAPACK)" OFF)
option(BUILD_LAPACK_DEPRECATED "When building LAPACK, include also some older, deprecated routines" ON)
set(LAPACK_STRLEN "" CACHE STRING "When building LAPACK, use this type (e.g. \"int\") for character lengths (defaults to size_t)")
@@ -59,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()
@@ -74,12 +78,27 @@ set(SYMBOLPREFIX "" CACHE STRING "Add a prefix to all exported symbol names in
set(SYMBOLSUFFIX "" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" )
if (CMAKE_SYSTEM_NAME MATCHES "Windows" AND BUILD_SHARED_LIBS AND NOT ("${SYMBOLPREFIX}${SYMBOLSUFFIX}" STREQUAL ""))
set (DELETE_STATIC_LIBS "")
if (NOT BUILD_STATIC_LIBS)
message (STATUS "forcing build of a temporary static library for symbol renaming")
set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared library" FORCE)
set (BUILD_STATIC_LIBS ON CACHE BOOL "Build static library" FORCE)
set (DELETE_STATIC_LIBS file (REMOVE $<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.lib))
endif ()
endif()
#######
if(BUILD_WITHOUT_LAPACK)
set(NO_LAPACK 1)
set(NO_LAPACKE 1)
endif()
if (BUILD_WITHOUT_LAPACKE)
set(NO_LAPACKE 1)
endif()
if(BUILD_WITHOUT_CBLAS)
set(NO_CBLAS 1)
endif()
@@ -105,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)
@@ -128,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
@@ -219,6 +246,12 @@ endif ()
# add objects to the openblas lib
if(NOT NO_LAPACK)
add_library(LAPACK_OVERRIDES OBJECT ${LA_SOURCES})
if (USE_OPENMP AND (NOT NOFORTRAN))
# Disable OpenMP for LAPACK Fortran codes on Windows.
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(LAPACK_OVERRIDES OpenMP::OpenMP_Fortran)
endif()
endif()
list(APPEND TARGET_OBJS "$<TARGET_OBJECTS:LAPACK_OVERRIDES>")
endif()
if(NOT NO_LAPACKE)
@@ -258,27 +291,61 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "AIX|Android|Linux|FreeBSD|OpenBSD|NetBSD|Drago
endif()
endif()
if (APPLE AND BUILD_SHARED_LIBS)
set(CMAKE_MACOSX_RPATH ON)
if (USE_OPENMP)
if(BUILD_STATIC_LIBS)
if(NOFORTRAN)
target_link_libraries(${OpenBLAS_LIBNAME}_static OpenMP::OpenMP_C)
else()
target_link_libraries(${OpenBLAS_LIBNAME}_static OpenMP::OpenMP_C OpenMP::OpenMP_Fortran)
endif()
endif()
if(BUILD_SHARED_LIBS)
if(NOFORTRAN)
target_link_libraries(${OpenBLAS_LIBNAME}_shared OpenMP::OpenMP_C)
else()
target_link_libraries(${OpenBLAS_LIBNAME}_shared OpenMP::OpenMP_C OpenMP::OpenMP_Fortran)
endif()
endif()
endif()
# Seems that this hack doesn't required since macOS 11 Big Sur
if (APPLE AND BUILD_SHARED_LIBS AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 20)
set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
if (NOT NOFORTRAN)
set (CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
set (CMAKE_Fortran_CREATE_SHARED_LIBRARY
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' "
"sh -c '${CMAKE_AR} -rs libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' "
"sh -c 'echo \"\" | ${CMAKE_Fortran_COMPILER} -o dummy.o -c -x f95-cpp-input - '"
"sh -c '${CMAKE_Fortran_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,libopenblas.a -Wl,-noall_load dummy.o -o ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib'"
"sh -c 'ls -l ${CMAKE_BINARY_DIR}/lib'")
else ()
set (CMAKE_C_CREATE_SHARED_LIBRARY
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' "
"sh -c '${CMAKE_AR} -rs libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' "
"sh -c '${CMAKE_C_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,libopenblas.a -Wl,-noall_load -o ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib'")
endif ()
# Fix "Argument list too long" for macOS with POWERPC or Intel CPUs
if(APPLE AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64"))
# Use response files
set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
# Always build static library first
if(BUILD_STATIC_LIBS)
set(STATIC_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${OpenBLAS_LIBNAME}.a")
else()
add_library(${OpenBLAS_LIBNAME}_static STATIC ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
set(STATIC_PATH "lib${OpenBLAS_LIBNAME}.a")
endif()
set(CREATE_STATIC_LIBRARY_COMMAND
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/${OpenBLAS_LIBNAME}_static.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru ${STATIC_PATH} && exit 0' "
"sh -c '${CMAKE_AR} -rs ${STATIC_PATH} ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' ")
if(BUILD_SHARED_LIBS)
add_dependencies(${OpenBLAS_LIBNAME}_shared ${OpenBLAS_LIBNAME}_static)
set(SHARED_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib")
endif()
if(USE_OPENMP)
get_target_property(OMP_LIB OpenMP::OpenMP_C INTERFACE_LINK_LIBRARIES)
else()
set(OMP_LIB "")
endif()
if(NOT NOFORTRAN)
set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
set(CMAKE_Fortran_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND})
if(BUILD_SHARED_LIBS)
set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"sh -c 'echo \"\" | ${CMAKE_Fortran_COMPILER} -o dummy.o -c -x f95-cpp-input - '"
"sh -c '${CMAKE_Fortran_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,${STATIC_PATH} dummy.o -o ${SHARED_PATH} ${OMP_LIB}'")
endif()
else()
set(CMAKE_C_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND})
if(BUILD_SHARED_LIBS)
set(CMAKE_C_CREATE_SHARED_LIBRARY
"sh -c '${CMAKE_C_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,${STATIC_PATH} -o ${SHARED_PATH} ${OMP_LIB}'")
endif()
endif()
endif()
# Handle MSVC exports
@@ -363,7 +430,7 @@ if (BUILD_SHARED_LIBS AND BUILD_RELAPACK)
endif()
endif()
if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
if (BUILD_SHARED_LIBS OR DELETE_STATIC_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
if (NOT DEFINED ARCH)
set(ARCH_IN "x86_64")
else()
@@ -451,20 +518,44 @@ if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
else ()
set (BZ 0)
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
if (CMAKE_BUILD_TYPE MATCHES "Debug")
set (CRTLIB msvcrtd)
set (PDBOPT -debug -pdb:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.pdb)
set (PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
else ()
set (CRTLIB msvcrt)
set (PDBOPT "")
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 ${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
${REMOVE_STATIC_LIB} VERBATIM
)
#endif ()
else ()
if (NOT USE_PERL)
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_shared POST_BUILD
COMMAND ${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/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}" "${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 objcopy --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
COMMENT "renaming symbols"
)
endif()
endif()
endif()
if (BUILD_BENCHMARKS)
#find_package(OpenMP REQUIRED)
@@ -635,3 +726,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
install(EXPORT "${PN}${SUFFIX64}Targets"
NAMESPACE "${PN}${SUFFIX64}::"
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
+41
View File
@@ -26,6 +26,9 @@
* Chris Sidebottom <chris.sidebottom@arm.com>
* Optimizations and other improvements targeting AArch64
* Annop Wongwathanarat <annop.wongwathanarat@arm.com>
* Optimizations and other improvements targeting AArch64
## Previous Developers
* Zaheer Chothia <zaheer.chothia@gmail.com>
@@ -226,3 +229,41 @@ In chronological order:
* Dirreke <https://github.com/mseminatore>
* [2024-01-16] Add basic support for the CSKY architecture
* Christopher Daley <https://github.com/cdaley>
* [2024-01-24] Optimize GEMV forwarding on ARM64 systems
* Aniket P. Garade <https://github.com/garadeaniket> Sushil Pratap Singh <https://github.com/SushilPratap04> Juliya James <https://github.com/Juliya32>
* [2024-12-13] Optimized swap and rot Level-1 BLAS routines with ARM SVE
* Annop Wongwathanarat <annop.wongwathanarat@arm.com>
* [2025-01-10] Add thread throttling profile for SGEMM on NEOVERSEV1
* [2025-01-21] Optimize gemv_t_sve_v1x3 kernel
* [2025-02-26] Add sbgemv_t_bfdot kernel
* [2025-03-12] Fix aarch64 sbgemv_t compilation error for GCC < 13
* [2025-03-12] Optimize aarch64 sgemm_ncopy
* Marek Michalowski <marek.michalowski@arm.com>
* [2025-01-21] Add thread throttling profile for SGEMV on `NEOVERSEV1`
* [2025-02-18] Add thread throttling profile for SGEMM on `NEOVERSEV2`
* [2025-02-19] Add thread throttling profile for SGEMV on `NEOVERSEV2`
* 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-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
+229
View File
@@ -1,4 +1,233 @@
OpenBLAS ChangeLog
====================================================================
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
general:
- fixed a potential NULL pointer dereference in multithreaded builds
- added function aliases for GEMMT using its new name GEMMTR adopted by Reference-BLAS
- fixed a build failure when building without LAPACK_DEPRECATED functions
- the minimum required CMake version for CMake-based builds was raised to 3.16.0 in order
to remove many compatibility and deprecation warnings
- added more detailed CMake rules for OpenMP builds (mainly to support recent LLVM)
- fixed the behavior of the recently added CBLAS_?GEMMT functions with row-major data
- improved thread scaling of multithreaded SBGEMV
- improved thread scaling of multithreaded TRTRI
- fixed compilation of the CBLAS testsuite with gcc14 (and no Fortran compiler)
- added support for option handling changes in flang-new from LLVM18 onwards
- added support for recent calling conventions changes in Cray and NVIDIA compilers
- added support for compilation with the NAG Fortran compiler
- fixed placement of the -fopenmp flag and libsuffix in the generated pkgconfig file
- improved the CMakeConfig file generated by the Makefile build
- fixed const-correctness of cblas_?geadd in cblas.h
- fixed a potential inaccuracy in multithreaded BLAS3 calls
- fixed empty implementations of get/set_affinity that print a warning in OpenMP builds
- fixed function signatures for TRTRS in the converted C version of LAPACK
- fixed omission of several single-precision LAPACK symbols in the shared library
- improved build instructions for the provided "pybench" benchmarks
- improved documentation, including added build instructions for WoA and HarmonyOS
as well as descriptions of environment variables that affect build and runtime behavior
- added a separate "make install_tests" target for use with cross-compilations
- integrated improvements and corrections from Reference-LAPACK:
- removed a comparison in LAPACKE ?tpmqrt that is always false (LAPACK PR 1062)
- fixed the leading dimension for B in tests for GGEV (LAPACK PR 1064)
- replaced the ?LARFT functions with a recursive implementation (LAPACK PR 1080)
arm:
- fixed build with recent versions of the NDK (missing .type declaration of symbols)
arm64:
- fixed a long-standing bug in the (generic) c/zgemm_beta kernel that could lead to
reads and writes outside the array bounds in some circumstances
- rewrote cpu autodetection to scan all cores and return the highest performing type
- improved the DGEMM performance for SVE targets and small matrix sizes
- improved dimension criteria for forwarding from GEMM to GEMV kernels
- added SVE kernels for ROT and SWAP
- improved SVE kernels for SGEMV and DGEMV on A64FX and NEOVERSEV1
- added support for using the "small matrix" kernels with CMake as well
- fixed compilation on Windows on Arm
- improved compile-time detection of SVE capability
- added cpu autodetection and initial support for Apple M4
- added support for compilation on systems running IOS
- added support for compilation on NetBSD ("evbarm" architecture)
- fixed NRM2 implementations for generic SVE targets and the Neoverse N2
- fixed compilation for SVE-capable targets with the NVIDIA compiler
x86_64:
- fixed a wrong storage size in the SBGEMV kernel for Cooper Lake
- added cpu autodetection for Intel Granite Rapids
- added cpu autodetection for AMD Ryzen 5 series
- added optimized SOMATCOPY_CT for AVX-capable targets
- fixed the fallback implementation of GEMM3M in GENERIC builds
- tentatively re-enabled builds with the EXPRECISION option
- worked around a miscompilation of tests with mingw32-gfortran14
- added support for compilation with the Intel oneAPI 2025.0 compiler on Windows
power:
- fixed multithreaded SBGEMM
- fixed a CMake build problem on POWER10
- improved the performance of SGEMV
- added vectorized implementations of SBGEMV and support for forwarding 1xN SBGEMM to them
- fixed illegal instructions and potential memory overflow in SGEMM on PPCG4
- fixed handling of NaN and Inf arguments in SSCAL and DSCAL on PPC440,G4 and 970
- added improved CGEMM and ZGEMM kernels for POWER10
- added Makefile logic to remove all optimization flags in DEBUG builds
mips64:
- fixed compilation with gcc14
- fixed GEMM parameter selection for the MIPS64_GENERIC target
- fixed a potential build failure when compiling with OpenMP
loongarch64:
- fixed compilation for Loongson3 with recent versions of gmake
- fixed a potential loss of precision in Loongson3A GEMM
- fixed a potential build failure when compiling with OpenMP
- added optimized SOMATCOPY for LASX-capable targets
- introduced a new cpu naming scheme while retaining compatibility
- added support for cross-compiling Loongarch64 targets with CMake
- added support for compilation with LLVM
riscv64:
- removed thread yielding overhead caused by sched_yield
- replaced some non-standard intrinsics with their official names
- fixed and sped up the implementations of CGEMM/ZGEMM TCOPY for vector lenghts 128 and 256
- improved the performance of SNRM2/DNRM2 for RVV1.0 targets
- added optimized ?OMATCOPY_CN kernels for RVV1.0 targets
====================================================================
Version 0.3.28
8-Aug-2024
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'
}
}
}
}
+9 -1
View File
@@ -93,6 +93,11 @@ ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
echo " Fortran compiler ... $(F_COMPILER) (command line : $(FC))";\
fi
endif
ifeq ($(OSNAME), WINNT)
@-$(LNCMD) $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
endif
ifneq ($(OSNAME), AIX)
@echo -n " Library Name ... $(LIBNAME)"
else
@@ -426,6 +431,9 @@ dummy :
install :
$(MAKE) -f Makefile.install install
install_tests :
$(MAKE) -f Makefile.install install_tests
clean ::
@for d in $(SUBDIRS_ALL) ; \
do if test -d $$d; then \
@@ -444,7 +452,7 @@ endif
@rm -f cblas.tmp cblas.tmp2
@touch $(NETLIB_LAPACK_DIR)/make.inc
@$(MAKE) -C $(NETLIB_LAPACK_DIR) clean
@rm -f $(NETLIB_LAPACK_DIR)/make.inc $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_mangling.h
@rm -f $(NETLIB_LAPACK_DIR)/make.inc
@$(MAKE) -C relapack clean
@rm -f *.grd Makefile.conf_last config_last.h
@(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt)
+80 -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.
###############################################################################
ifneq ($(C_COMPILER), PGI)
ifeq ($(C_COMPILER), CLANG)
@@ -30,6 +58,11 @@ FCOMMON_OPT += -march=armv8-a+sve
endif
endif
ifeq ($(CORE), ARMV9SME)
CCOMMON_OPT += -march=armv9-a+sve2+sme
FCOMMON_OPT += -march=armv9-a+sve2
endif
ifeq ($(CORE), CORTEXA53)
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
ifneq ($(F_COMPILER), NAG)
@@ -101,7 +134,7 @@ ifeq ($(CORE), NEOVERSEV1)
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG)))
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG)))
ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG)))
CCOMMON_OPT += -march=armv8.4-a+sve
CCOMMON_OPT += -march=armv8.4-a+sve+bf16
ifeq (1, $(ISCLANG))
CCOMMON_OPT += -mtune=cortex-x1
else
@@ -111,7 +144,7 @@ ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.4-a -mtune=neoverse-v1
endif
else
CCOMMON_OPT += -march=armv8.4-a+sve
CCOMMON_OPT += -march=armv8.4-a+sve+bf16
ifneq ($(CROSS), 1)
CCOMMON_OPT += -mtune=native
endif
@@ -178,10 +211,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
@@ -351,4 +399,31 @@ endif
endif
else
# NVIDIA HPC options necessary to enable SVE in the compiler
ifeq ($(CORE), THUNDERX2T99)
CCOMMON_OPT += -tp=thunderx2t99
FCOMMON_OPT += -tp=thunderx2t99
endif
ifeq ($(CORE), NEOVERSEN1)
CCOMMON_OPT += -tp=neoverse-n1
FCOMMON_OPT += -tp=neoverse-n1
endif
ifeq ($(CORE), NEOVERSEV1)
CCOMMON_OPT += -tp=neoverse-v1
FCOMMON_OPT += -tp=neoverse-v1
endif
ifeq ($(CORE), NEOVERSEV2)
CCOMMON_OPT += -tp=neoverse-v2
FCOMMON_OPT += -tp=neoverse-v2
endif
ifeq ($(CORE), ARMV8SVE)
CCOMMON_OPT += -tp=neoverse-v2
FCOMMON_OPT += -tp=neoverse-v2
endif
ifeq ($(CORE), ARMV9SVE)
CCOMMON_OPT += -tp=neoverse-v2
FCOMMON_OPT += -tp=neoverse-v2
endif
endif
+131 -4
View File
@@ -14,6 +14,9 @@ endif
ifeq ($(INTERFACE64),1)
USE_64BITINT=1
endif
ifeq ($(USE_OPENMP),1)
FOMP_OPT:= -fopenmp
endif
PREFIX ?= /opt/OpenBLAS
@@ -68,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
@@ -178,6 +181,7 @@ endif
@echo 'libnamesuffix='$(LIBNAMESUFFIX) >> "$(PKGFILE)"
@echo 'libsuffix='$(SYMBOLSUFFIX) >> "$(PKGFILE)"
@echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(PKGFILE)"
@echo 'omp_opt='$(FOMP_OPT) >> "$(PKGFILE)"
@echo 'openblas_config= USE_64BITINT='$(INTERFACE64) 'DYNAMIC_ARCH='$(DYNAMIC_ARCH) 'DYNAMIC_OLDER='$(DYNAMIC_OLDER) 'NO_CBLAS='$(NO_CBLAS) 'NO_LAPACK='$(NO_LAPACK) 'NO_LAPACKE='$(NO_LAPACKE) 'NO_AFFINITY='$(NO_AFFINITY) 'USE_OPENMP='$(USE_OPENMP) $(TARGET) 'MAX_THREADS='$(NUM_THREADS)>> "$(PKGFILE)"
@echo 'version='$(VERSION) >> "$(PKGFILE)"
@echo 'extralib='$(PKG_EXTRALIB) >> "$(PKGFILE)"
@@ -185,25 +189,55 @@ 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 "SET(OpenBLAS_INCLUDE_DIRS ${OPENBLAS_INCLUDE_DIR})" >> "$(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)"
@echo "SET(OpenBLAS_INCLUDE_DIRS \$${_OpenBLAS_ROOT_DIR}/include)" >> "$(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)"
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/lib/$(LIBPREFIX).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)"
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/bin/$(LIBDLLNAME))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
endif
ifeq ($(OSNAME), Darwin)
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/lib/$(LIBPREFIX).dylib)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
endif
@echo "add_library(OpenBLAS::OpenBLAS SHARED IMPORTED)"
@echo "target_include_directories(OpenBLAS::OpenBLAS INTERFACE \$${OpenBLAS_INCLUDE_DIRS})"
ifeq ($(OSNAME), $(filter $(OSNAME),WINNT CYGWIN_NT))
@echo "set_property(TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_LOCATION \$${OpenBLAS_LIBRARIES})"
@echo "set_property(TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB \$${_OpenBLAS_ROOT_DIR}/lib/libopenblas.lib)"
endif
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)"
@@ -216,3 +250,96 @@ endif
@echo " endif ()" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG_VERSION)"
@echo "endif ()" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG_VERSION)"
@echo Install OK!
install_tests : lib.grd
ifneq ($(ONLY_CBLAS), 1)
@install -m 666 utest/openblas_utest $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 utest/openblas_utest_ext $(DESTDIR)$(OPENBLAS_BINARY_DIR)
ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
ifndef NO_FBLAS
ifeq ($(BUILD_BFLOAT16),1)
@install -m 666 test/test_sbgemm $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
ifeq ($(BUILD_SINGLE),1)
@install -m 666 test/sblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/sblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/sblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/sblat2.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/sblat3.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
ifeq ($(BUILD_DOUBLE),1)
@install -m 666 test/dblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/dblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/dblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/dblat2.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/dblat3.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
ifeq ($(BUILD_COMPLEX),1)
@install -m 666 test/cblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/cblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/cblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/cblat2.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/cblat3.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
ifeq ($(ARCH), filter($(ARCH), x86 x86_64 ia64 MIPS))
@install -m 666 test/cblat3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/cblat3_3m.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
endif
ifeq ($(BUILD_COMPLEX16),1)
@install -m 666 test/zblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/zblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/zblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/zblat2.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/zblat3.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
ifeq ($(ARCH), filter($(ARCH), x86 x86_64 ia64 MIPS))
@install -m 666 test/zblat3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 test/zblat3_3m.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
endif
endif
endif
ifneq ($(ONLY_CBLAS), 1)
ifeq ($(BUILD_SINGLE),1)
@install -m 666 ctest/xscblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/xscblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/xscblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/sin2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/sin3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
ifeq ($(BUILD_DOUBLE),1)
@install -m 666 ctest/xdcblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/xdcblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/xdcblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/din2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/din3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
ifeq ($(BUILD_COMPLEX),1)
@install -m 666 ctest/xccblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/xccblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/xccblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/cin2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/cin3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
ifeq ($(ARCH), filter($(ARCH), x86 x86_64 ia64 MIPS))
@install -m 666 ctest/xccblat3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/cin3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
endif
ifeq ($(BUILD_COMPLEX16),1)
@install -m 666 ctest/xzcblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/xzcblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/xzcblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/zin2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/zin3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
ifeq ($(ARCH), filter($(ARCH), x86 x86_64 ia64 MIPS))
@install -m 666 ctest/xzcblat3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 ctest/zin3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
endif
endif
ifeq ($(CPP_THREAD_SAFETY_TEST), 1)
@install -m 666 cpp_thread_test/dgemm_tester $(DESTDIR)$(OPENBLAS_BINARY_DIR)
@install -m 666 cpp_thread_test/dgemv_tester $(DESTDIR)$(OPENBLAS_BINARY_DIR)
endif
endif
+6 -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
+12 -2
View File
@@ -3,17 +3,27 @@ CCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920
FCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -static
endif
ifeq ($(CORE), x280)
CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d -ffast-math
CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d -static
endif
ifeq ($(CORE), RISCV64_ZVL256B)
ifeq ($(BUILD_HFLOAT16), 1)
CCOMMON_OPT += -march=rv64imafdcv_zvl256b_zvfh_zfh -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
else
CCOMMON_OPT += -march=rv64imafdcv_zvl256b -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
endif
endif
ifeq ($(CORE), RISCV64_ZVL128B)
CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
ifeq ($(BUILD_HFLOAT16), 1)
CCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
else
CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
endif
endif
ifeq ($(CORE), RISCV64_GENERIC)
CCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
+3 -1
View File
@@ -3,7 +3,7 @@
#
# This library's version
VERSION = 0.3.28
VERSION = 0.3.30.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
+54 -14
View File
@@ -270,27 +270,37 @@ 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
SBGEMM_GEMV_FORWARD = 1
endif
ifeq ($(SMALL_MATRIX_OPT), 1)
CCOMMON_OPT += -DSMALL_MATRIX_OPT
endif
ifeq ($(GEMM_GEMV_FORWARD), 1)
ifneq ($(ONLY_CBLAS), 1)
ifeq ($(GEMM_GEMV_FORWARD), 1)
CCOMMON_OPT += -DGEMM_GEMV_FORWARD
endif
ifeq ($(SBGEMM_GEMV_FORWARD), 1)
CCOMMON_OPT += -DSBGEMM_GEMV_FORWARD
endif
ifeq ($(BGEMM_GEMV_FORWARD), 1)
CCOMMON_OPT += -DBGEMM_GEMV_FORWARD
endif
endif
# This operation is expensive, so execution should be once.
@@ -376,9 +386,6 @@ OBJCONV = $(CROSS_SUFFIX)objconv
ifeq ($(NOFORTRAN), 1)
C_LAPACK = 1
override FEXTRALIB =
ifeq ($(C_COMPILER), GCC)
CCOMMON_OPT += -Wno-error=incompatible-pointer-types
endif
endif
ifeq ($(C_COMPILER), GCC)
@@ -391,6 +398,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)
@@ -417,9 +426,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
endif
export NO_SME = 1
else
export MACOSX_DEPLOYMENT_TARGET=10.8
endif
@@ -433,6 +441,9 @@ ifeq (x$(XCVER), x 15)
CCOMMON_OPT += -Wl,-ld_classic
FCOMMON_OPT += -Wl,-ld_classic
endif
ifeq (x$(XCVER), x 16)
override CEXTRALIB := $(filter-out(-lto_library, $(CEXTRALIB)))
endif
endif
ifneq (,$(findstring $(OSNAME), FreeBSD OpenBSD DragonFly))
@@ -445,7 +456,7 @@ endif
ifeq ($(OSNAME), Linux)
EXTRALIB += -lm
NO_EXPRECISION = 1
#NO_EXPRECISION = 1
endif
ifeq ($(OSNAME), Android)
@@ -571,7 +582,7 @@ NO_BINARY_MODE = 1
endif
ifeq ($(CORE), generic)
NO_EXPRECISION = 1
#NO_EXPRECISION = 1
endif
ifndef NO_EXPRECISION
@@ -594,7 +605,7 @@ endif
ifeq ($(ARCH), x86_64)
ifeq ($(CORE), generic)
NO_EXPRECISION = 1
#NO_EXPRECISION = 1
endif
ifndef NO_EXPRECISION
@@ -708,6 +719,9 @@ DYNAMIC_CORE += NEOVERSEN2
DYNAMIC_CORE += ARMV8SVE
DYNAMIC_CORE += A64FX
endif
ifneq ($(NO_SME), 1)
DYNAMIC_CORE += ARMV9SME
endif
DYNAMIC_CORE += THUNDERX
DYNAMIC_CORE += THUNDERX2T99
DYNAMIC_CORE += TSV110
@@ -730,7 +744,7 @@ endif
endif
ifeq ($(ARCH), loongarch64)
DYNAMIC_CORE = LOONGSON3R5 LOONGSON2K1000 LOONGSONGENERIC
DYNAMIC_CORE = LA64_GENERIC LA264 LA464
endif
ifeq ($(ARCH), riscv64)
@@ -827,8 +841,8 @@ BINARY_DEFINED = 1
ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(C_COMPILER), GCC)
# EXPRECISION = 1
# CCOMMON_OPT += -DEXPRECISION
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION
endif
endif
endif
@@ -1180,6 +1194,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)
@@ -1471,6 +1492,10 @@ ifeq ($(NO_SVE), 1)
CCOMMON_OPT += -DNO_SVE
endif
ifeq ($(NO_SME), 1)
CCOMMON_OPT += -DNO_SME
endif
ifdef SMP
CCOMMON_OPT += -DSMP_SERVER
@@ -1532,6 +1557,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
@@ -1612,6 +1640,13 @@ NO_AFFINITY = 1
endif
endif
ifeq ($(ARCH), POWER)
ifeq ($(DEBUG), 1)
CCOMMON_OPT := $(filter-out -O%, $(CCOMMON_OPT)) -O0
FCOMMON_OPT := $(filter-out -O%, $(FCOMMON_OPT)) -O0
endif
endif
ifdef NO_AFFINITY
ifeq ($(NO_AFFINITY), 0)
override undefine NO_AFFINITY
@@ -1723,8 +1758,8 @@ LAPACK_FFLAGS := $(filter-out -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx
override FFLAGS := $(filter-out -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 ,$(FFLAGS))
endif
ifeq ($(F_COMPILER),FLANGNEW)
LAPACK_FFLAGS := $(filter-out -m32 -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 ,$(FFLAGS))
override FFLAGS := $(filter-out -m32 -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 ,$(FFLAGS))
LAPACK_FFLAGS := $(filter-out -m32 -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 -mtune=% -mabi=% ,$(FFLAGS))
override FFLAGS := $(filter-out -m32 -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 -mtune=% -mabi=% ,$(FFLAGS))
endif
LAPACK_CFLAGS = $(CFLAGS)
@@ -1867,11 +1902,16 @@ 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)
+72 -34
View File
@@ -2,12 +2,8 @@
[![Join the chat at https://gitter.im/xianyi/OpenBLAS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/xianyi/OpenBLAS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Travis CI: [![Build Status](https://travis-ci.com/xianyi/OpenBLAS.svg?branch=develop)](https://travis-ci.com/xianyi/OpenBLAS)
AppVeyor: [![Build status](https://ci.appveyor.com/api/projects/status/09sohd35n8nkkx64/branch/develop?svg=true)](https://ci.appveyor.com/project/xianyi/openblas/branch/develop)
Cirrus CI: [![Build Status](https://api.cirrus-ci.com/github/xianyi/OpenBLAS.svg?branch=develop)](https://cirrus-ci.com/github/xianyi/OpenBLAS)
<!-- Drone CI: [![Build Status](https://cloud.drone.io/api/badges/xianyi/OpenBLAS/status.svg?branch=develop)](https://cloud.drone.io/xianyi/OpenBLAS/)-->
[![Build Status](https://dev.azure.com/xianyi/OpenBLAS/_apis/build/status/xianyi.OpenBLAS?branchName=develop)](https://dev.azure.com/xianyi/OpenBLAS/_build/latest?definitionId=1&branchName=develop)
@@ -19,36 +15,45 @@ OSUOSL IBMZ-CI [![Build Status](http://ibmz-ci.osuosl.org/buildStatus/icon?job=O
OpenBLAS is an optimized BLAS (Basic Linear Algebra Subprograms) library based on GotoBLAS2 1.13 BSD version.
Please read the documentation on the OpenBLAS wiki pages: <https://github.com/xianyi/OpenBLAS/wiki>.
For more information about OpenBLAS, please see:
- The documentation at [openmathlib.org/OpenBLAS/docs/](http://www.openmathlib.org/OpenBLAS/docs),
- The home page at [openmathlib.org/OpenBLAS/](http://www.openmathlib.org/OpenBLAS).
For a general introduction to the BLAS routines, please refer to the extensive documentation of their reference implementation hosted at netlib:
<https://www.netlib.org/blas>. On that site you will likewise find documentation for the reference implementation of the higher-level library LAPACK - the **L**inear **A**lgebra **Pack**age that comes included with OpenBLAS. If you are looking for a general primer or refresher on Linear Algebra, the set of six
20-minute lecture videos by Prof. Gilbert Strang on either MIT OpenCourseWare <https://ocw.mit.edu/resources/res-18-010-a-2020-vision-of-linear-algebra-spring-2020/> or Youtube <https://www.youtube.com/playlist?list=PLUl4u3cNGP61iQEFiWLE21EJCxwmWvvek> may be helpful.
20-minute lecture videos by Prof. Gilbert Strang on either MIT OpenCourseWare [here](https://ocw.mit.edu/resources/res-18-010-a-2020-vision-of-linear-algebra-spring-2020/) or YouTube [here](https://www.youtube.com/playlist?list=PLUl4u3cNGP61iQEFiWLE21EJCxwmWvvek) may be helpful.
## Binary Packages
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/xianyi/OpenBLAS/releases](https://github.com/xianyi/OpenBLAS/releases).
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).
OpenBLAS is also packaged for many package managers - see [the installation section of the docs](http://www.openmathlib.org/OpenBLAS/docs/install/) for details.
## Installation from Source
Download from project homepage, https://xianyi.github.com/OpenBLAS/, or check out the code
using Git from https://github.com/xianyi/OpenBLAS.git. (If you want the most up to date version, be
sure to use the develop branch - master is several years out of date due to a change of maintainership.)
Buildtime parameters can be chosen in Makefile.rule, see there for a short description of each option.
Most can also be given directly on the make or cmake command line.
Obtain the source code from https://github.com/OpenMathLib/OpenBLAS/. Note that the default branch
is `develop` (a `master` branch is still present, but far out of date).
Build-time parameters can be chosen in `Makefile.rule`, see there for a short description of each option.
Most options can also be given directly on the command line as parameters to your `make` or `cmake` invocation.
### Dependencies
Building OpenBLAS requires the following to be installed:
* GNU Make
* A C compiler, e.g. GCC or Clang
* GNU Make or CMake
* A C compiler, e.g. GCC or Clang
* A Fortran compiler (optional, for LAPACK)
* IBM MASS (optional, see below)
In general, using a recent version of the compiler is strongly recommended.
If a Fortran compiler is not available, it is possible to compile an older version of the included LAPACK
that has been machine-translated to C.
### Normal compile
@@ -64,26 +69,31 @@ For building with `cmake`, the usual conventions apply, i.e. create a build dire
OpenBLAS source directory or separate from it, and invoke `cmake` there with the path to the source tree and any
build options you plan to set.
For more details, see the [Building from source](http://www.openmathlib.org/OpenBLAS/docs/install/#building-from-source)
section in the docs.
### Cross compile
Set `CC` and `FC` to point to the cross toolchains, and set `HOSTCC` to your host C compiler.
Set `CC` and `FC` to point to the cross toolchains, and if you use `make`, also set `HOSTCC` to your host C compiler.
The target must be specified explicitly when cross compiling.
Examples:
* On an x86 box, compile this library for a loongson3a CPU:
* On a Linux system, cross-compiling to an older MIPS64 router board:
```sh
make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A
make BINARY=64 CC=mipsisa64r6el-linux-gnuabi64-gcc FC=mipsisa64r6el-linux-gnuabi64-gfortran HOSTCC=gcc TARGET=P6600
```
or same with the newer mips-crosscompiler put out by Loongson that defaults to the 32bit ABI:
* or to a Windows x64 host:
```sh
make HOSTCC=gcc CC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gcc -mabi=64' FC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gfortran -mabi=64' TARGET=LOONGSON3A
make CC="i686-w64-mingw32-gcc -Bstatic" FC="i686-w64-mingw32-gfortran -static-libgfortran" TARGET=HASWELL BINARY=32 CROSS=1 NUM_THREADS=20 CONSISTENT_FPCSR=1 HOSTCC=gcc
```
* On an x86 box, compile this library for a loongson3a CPU with loongcc (based on Open64) compiler:
```sh
make CC=loongcc FC=loongf95 HOSTCC=gcc TARGET=LOONGSON3A CROSS=1 CROSS_SUFFIX=mips64el-st-linux-gnu- NO_LAPACKE=1 NO_SHARED=1 BINARY=32
```
You can find instructions for other cases both in the "Supported Systems" section below and in
the [Building from source docs](http://www.openmathlib.org/OpenBLAS/docs/install).
The `.yml` scripts included with the sources (which contain the
build scripts for the "continuous integration" (CI) build tests automatically run on every proposed change to the sources) may also provide additional hints.
When compiling for a more modern CPU target of the same architecture, e.g. `TARGET=SKYLAKEX` on a `HASWELL` host, option `CROSS=1` can be used to suppress the automatic invocation of the tests at the end of the build.
### Debug version
@@ -219,6 +229,26 @@ e.g.:
HOSTCC=gcc HOSTFC=gfortran -j
```
#### LOONGARCH64
- **LA64_GENERIC**: Optimized Level-3, Level-2 and Level-1 BLAS with scalar instruction
```sh
make HOSTCC=gcc TARGET=LA64_GENERIC CC=loongarch64-unknown-linux-gnu-gcc FC=loongarch64-unknown-linux-gnu-gfortran USE_SIMPLE_THREADED_LEVEL3=1
```
The old-style TARGET=LOONGSONGENERIC is still supported
- **LA264**: Optimized Level-3, Level-2 and Level-1 BLAS with LSX instruction
```sh
make HOSTCC=gcc TARGET=LA264 CC=loongarch64-unknown-linux-gnu-gcc FC=loongarch64-unknown-linux-gnu-gfortran USE_SIMPLE_THREADED_LEVEL3=1
```
The old-style TARGET=LOONGSON2K1000 is still supported
- **LA464**: Optimized Level-3, Level-2 and Level-1 BLAS with LASX instruction
```sh
make HOSTCC=gcc TARGET=LA464 CC=loongarch64-unknown-linux-gnu-gcc FC=loongarch64-unknown-linux-gnu-gfortran USE_SIMPLE_THREADED_LEVEL3=1
```
The old-style TARGET=LOONGSON3R5 is still supported
### 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.
@@ -236,8 +266,12 @@ on **ZARCH** it comprises Z13 and Z14 as well as generic zarch support.
On **riscv64**, DYNAMIC_ARCH enables support for riscv64_zvl128b and riscv64_zvl256b in addition to generic riscv64 support. A compiler that supports RVV 1.0 is required to build OpenBLAS for riscv64 when DYNAMIC_ARCH is enabled.
The `TARGET` option can be used in conjunction with `DYNAMIC_ARCH=1` to specify which cpu model should be assumed for all the
common code in the library, usually you will want to set this to the oldest model you expect to encounter.
On **LoongArch64**, it comprises LA264 and LA464 as well as generic LoongArch64 support.
The `TARGET` option can - and usually **should** - be used in conjunction with `DYNAMIC_ARCH=1` to specify which cpu model should be assumed for all the common code in the library, usually you will want to set this to the oldest model you expect to encounter.
Failure to specify this may lead to advanced instructions being used by the compiler, just because the build host happens to support them. This is most likely to happen when aggressive optimization options are in effect, and the resulting library may then crash with an
illegal instruction error on weaker hardware, before it even reaches the BLAS routines specifically included for that cpu.
Please note that it is not possible to combine support for different architectures, so no combined 32 and 64 bit or x86_64 and arm64 in the same library.
### Supported OS
@@ -291,24 +325,28 @@ If you compile this library with `USE_OPENMP=1`, you should use the above functi
## Reporting bugs
Please submit an issue in https://github.com/xianyi/OpenBLAS/issues.
Please submit an issue in https://github.com/OpenMathLib/OpenBLAS/issues.
## Contact
+ Use github discussions: https://github.com/OpenMathLib/OpenBLAS/discussions
* OpenBLAS users mailing list: https://groups.google.com/forum/#!forum/openblas-users
* OpenBLAS developers mailing list: https://groups.google.com/forum/#!forum/openblas-dev
## Change log
Please see Changelog.txt to view the differences between OpenBLAS and GotoBLAS2 1.13 BSD version.
Please see Changelog.txt.
## Troubleshooting
* Please read the [FAQ](https://github.com/xianyi/OpenBLAS/wiki/Faq) first.
* Please read the [FAQ](http://www.openmathlib.org/OpenBLAS/docs/faq) section of the docs first.
* Please use GCC version 4.6 and above to compile Sandy Bridge AVX kernels on Linux/MinGW/BSD.
* Please use Clang version 3.1 and above to compile the library on Sandy Bridge microarchitecture.
Clang 3.0 will generate the wrong AVX binary code.
* Please use GCC version 6 or LLVM version 6 and above to compile Skylake AVX512 kernels.
* Please use GCC version 6 or LLVM version 6 and above to compile Skylake/CooperLake AVX512 kernels
* Please use LLVM version 18 and above (version 19 and above on Windows) if you plan to use
its new flang compiler for Fortran
* Please use GCC version 11 and above to compile OpenBLAS on the POWER architecture
* The number of CPUs/cores should be less than or equal to 256. On Linux `x86_64` (`amd64`),
there is experimental support for up to 1024 CPUs/cores and 128 numa nodes if you build
the library with `BIGNUMA=1`.
@@ -321,12 +359,12 @@ Please see Changelog.txt to view the differences between OpenBLAS and GotoBLAS2
## Contributing
1. [Check for open issues](https://github.com/xianyi/OpenBLAS/issues) or open a fresh issue
1. [Check for open issues](https://github.com/OpenMathLib/OpenBLAS/issues) or open a fresh issue
to start a discussion around a feature idea or a bug.
2. Fork the [OpenBLAS](https://github.com/xianyi/OpenBLAS) repository to start making your changes.
2. Fork the [OpenBLAS](https://github.com/OpenMathLib/OpenBLAS) repository to start making your changes.
3. Write a test which shows that the bug was fixed or that the feature works as expected.
4. Send a pull request. Make sure to add yourself to `CONTRIBUTORS.md`.
## Donation
Please read [this wiki page](https://github.com/xianyi/OpenBLAS/wiki/Donation).
Please see [the donations section](http://www.openmathlib.org/OpenBLAS/docs/about/#donations) in the docs.
+12 -1
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
@@ -111,6 +113,7 @@ THUNDERX3T110
VORTEX
A64FX
ARMV8SVE
ARMV9SME
FT2000
9.System Z:
@@ -126,9 +129,17 @@ x280
RISCV64_ZVL256B
11.LOONGARCH64:
// LOONGSONGENERIC/LOONGSON2K1000/LOONGSON3R5 are legacy names,
// and it is recommended to use the more standardized naming conventions
// LA64_GENERIC/LA264/LA464. You can still specify TARGET as
// LOONGSONGENERIC/LOONGSON2K1000/LOONGSON3R5 during compilation or runtime,
// and they will be internally relocated to LA64_GENERIC/LA264/LA464.
LOONGSONGENERIC
LOONGSON3R5
LOONGSON2K1000
LOONGSON3R5
LA64_GENERIC
LA264
LA464
12. Elbrus E2000:
E2K
+41 -15
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'
@@ -141,7 +155,7 @@ jobs:
- job: OSX_OpenMP
pool:
vmImage: 'macOS-12'
vmImage: 'macOS-13'
steps:
- script: |
brew update
@@ -151,7 +165,7 @@ jobs:
- job: OSX_GCC_Nothreads
pool:
vmImage: 'macOS-12'
vmImage: 'macOS-13'
steps:
- script: |
brew update
@@ -164,7 +178,19 @@ jobs:
- script: |
brew update
make CC=gcc-12 FC=gfortran-12
- job: OSX_LLVM_flangnew
pool:
vmImage: 'macOS-latest'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
steps:
- script: |
brew update
brew install llvm flang
make TARGET=NEHALEM CC=/usr/local/opt/llvm/bin/clang FC=/usr/local/opt/flang/bin/flang NO_SHARED=1
- job: OSX_OpenMP_Clang
pool:
vmImage: 'macOS-latest'
@@ -195,7 +221,7 @@ jobs:
- job: OSX_dynarch_cmake
pool:
vmImage: 'macOS-12'
vmImage: 'macOS-13'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
@@ -212,7 +238,7 @@ jobs:
vmImage: 'macOS-latest'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17643/m_HPCKit_p_2021.2.0.2903_offline.dmg
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
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler
steps:
@@ -242,7 +268,7 @@ jobs:
- job: OSX_NDK_ARMV7
pool:
vmImage: 'macOS-12'
vmImage: 'macOS-13'
steps:
- script: |
brew update
@@ -252,7 +278,7 @@ jobs:
- job: OSX_IOS_ARMV8
pool:
vmImage: 'macOS-12'
vmImage: 'macOS-13'
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
@@ -262,7 +288,7 @@ jobs:
- job: OSX_IOS_ARMV7
pool:
vmImage: 'macOS-12'
vmImage: 'macOS-13'
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
@@ -272,7 +298,7 @@ jobs:
- job: OSX_xbuild_DYNAMIC_ARM64
pool:
vmImage: 'macOS-12'
vmImage: 'macOS-13'
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
+102 -6
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)
@@ -103,7 +137,8 @@ goto :: slinpack.goto dlinpack.goto clinpack.goto zlinpack.goto \
sgetri.goto dgetri.goto cgetri.goto zgetri.goto \
spotrf.goto dpotrf.goto cpotrf.goto zpotrf.goto \
ssymm.goto dsymm.goto csymm.goto zsymm.goto \
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto $(GOTO_HALF_TARGETS)
somatcopy.goto domatcopy.goto comatcopy.goto zomatcopy.goto \
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 \
@@ -276,7 +311,8 @@ goto :: sgemm.goto dgemm.goto cgemm.goto zgemm.goto \
samin.goto damin.goto camin.goto zamin.goto \
smin.goto dmin.goto \
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto \
snrm2.goto dnrm2.goto scnrm2.goto dznrm2.goto $(GOTO_LAPACK_TARGETS) $(GOTO_HALF_TARGETS)
somatcopy.goto domatcopy.goto comatcopy.goto zomatcopy.goto \
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 \
@@ -627,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)
@@ -2906,6 +2953,29 @@ dznrm2.goto : dznrm2.$(SUFFIX) ../$(LIBNAME)
dznrm2.atlas : dznrm2.$(SUFFIX)
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBATLAS) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
###################################################################################################
############################################ SOMATCOPY ############################################
somatcopy.goto : somatcopy.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
###################################################################################################
############################################ DOMATCOPY ############################################
domatcopy.goto : domatcopy.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
###################################################################################################
############################################ COMATCOPY ############################################
comatcopy.goto : comatcopy.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
###################################################################################################
############################################ ZOMATCOPY ############################################
zomatcopy.goto : zomatcopy.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
###################################################################################################
@@ -2934,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
@@ -3073,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) $^
@@ -3435,6 +3519,18 @@ scnrm2.$(SUFFIX) : nrm2.c
dznrm2.$(SUFFIX) : nrm2.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
somatcopy.$(SUFFIX) : omatcopy.c
$(CC) $(CFLAGS) -c -UCOMPLEX -UDOUBLE -o $(@F) $^
domatcopy.$(SUFFIX) : omatcopy.c
$(CC) $(CFLAGS) -c -UCOMPLEX -DDOUBLE -o $(@F) $^
comatcopy.$(SUFFIX) : omatcopy.c
$(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^
zomatcopy.$(SUFFIX) : omatcopy.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
smallscaling: smallscaling.c ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm -lpthread
@@ -3442,4 +3538,4 @@ smallscaling: smallscaling.c ../$(LIBNAME)
clean ::
@rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl smallscaling
include $(TOPDIR)/Makefile.tail
include $(TOPDIR)/Makefile.tail
+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++){
+122
View File
@@ -0,0 +1,122 @@
/***************************************************************************
Copyright (c) 2024, 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.
*****************************************************************************/
#include "bench.h"
#undef OMATCOPY
#ifndef COMPLEX
#ifdef DOUBLE
#define OMATCOPY BLASFUNC(domatcopy)
#else
#define OMATCOPY BLASFUNC(somatcopy)
#endif
#else
#ifdef DOUBLE
#define OMATCOPY BLASFUNC(zomatcopy)
#else
#define OMATCOPY BLASFUNC(comatcopy)
#endif
#endif
int main(int argc, char *argv[]){
FLOAT *a, *b;
FLOAT alpha[] = {1.0, 0.0};
char trans = 'N';
char order = 'C';
blasint crows, ccols, clda, cldb;
int loops = 1;
char *p;
int from = 1;
int to = 200;
int step = 1;
int i, j;
double time1, timeg;
argc--;argv++;
if (argc > 0) { from = atol(*argv); argc--; argv++; }
if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++; }
if (argc > 0) { step = atol(*argv); argc--; argv++; }
if ((p = getenv("OPENBLAS_TRANS"))) {
trans=*p;
}
if ((p = getenv("OPENBLAS_ORDER"))) {
order=*p;
}
TOUPPER(trans);
TOUPPER(order);
fprintf(stderr, "From : %3d To : %3d Step=%d : Trans=%c : Order=%c\n", from, to, step, trans, order);
p = getenv("OPENBLAS_LOOPS");
if ( p != NULL ) {
loops = atoi(p);
}
if (( a = (FLOAT *)malloc(sizeof(FLOAT) * to * to * COMPSIZE)) == NULL) {
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
if (( b = (FLOAT *)malloc(sizeof(FLOAT) * to * to * COMPSIZE)) == NULL) {
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef __linux
srandom(getpid());
#endif
for (i = 0; i < to * to * COMPSIZE; i++) {
a[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
for (i = 0; i < to * to * COMPSIZE; i++) {
b[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
}
fprintf(stderr, " SIZE Flops Time\n");
for (i = from; i <= to; i += step) {
cldb = clda = crows = ccols = i;
fprintf(stderr, " ROWS=%4d, COLS=%4d : ", (int)crows, (int)ccols);
begin();
for (j=0; j<loops; j++) {
OMATCOPY (&order, &trans, &crows, &ccols, alpha, a, &clda, b, &cldb);
}
end();
time1 = getsec();
timeg = time1/loops;
fprintf(stderr,
" %10.2f MFlops %10.6f sec\n",
COMPSIZE * COMPSIZE * (double)ccols * (double)crows / timeg * 1.e-6, time1);
}
free(a);
free(b);
return 0;
}
+11 -1
View File
@@ -43,7 +43,17 @@ have all what it takes to build OpenBLAS from source, plus `python` and
$ python -mpip install numpy meson ninja pytest pytest-benchmark
```
The benchmark syntax is consistent with that of `pytest-benchmark` framework. The incantation to run the suite locally is `$ pytest benchmark/pybench/benchmarks/test_blas.py`.
The Meson build system looks for the installed OpenBLAS using pkgconfig, so the openblas.pc created during the OpenBLAS build needs
to be somewhere on the search path of pkgconfig or in a folder pointed to by the environment variable PKG_CONFIG_PATH.
If you want to build the benchmark suite using flang (or flang-new) instead of gfortran for the Fortran parts, you currently need
to edit the meson.build file and change the line `'fortran_std=legacy'` to `'fortran_std=none'` to work around an incompatibility
between Meson and flang.
If you are building and running the benchmark under MS Windows, it may be necessary to copy the generated openblas_wrap module from
your build folder to the `benchmarks` folder.
The benchmark syntax is consistent with that of `pytest-benchmark` framework. The incantation to run the suite locally is `$ pytest benchmark/pybench/benchmarks/bench_blas.py`.
An ASV compatible benchmark suite is planned but currently not implemented.
+22
View File
@@ -6,6 +6,9 @@ hostarch=`uname -m | sed -e 's/i.86/x86/'`
if [ "$hostos" = "AIX" ] || [ "$hostos" = "SunOS" ]; then
hostarch=`uname -p`
fi
if [ "$hostarch" = "evbarm" ]; then
hostarch=`uname -p`
fi
case "$hostarch" in
amd64) hostarch=x86_64 ;;
arm*) [ "$hostarch" = "arm64" ] || hostarch='arm' ;;
@@ -331,6 +334,24 @@ if [ "$architecture" = "arm64" ]; then
rm -rf "$tmpd"
fi
no_sme=0
if [ "$architecture" = "arm64" ]; then
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"
args=" -march=armv9-a+sve2+sme -c -o $tmpf.o $tmpf"
no_sme=0
{
$compiler_name $flags $args >/dev/null 2>&1
} || {
args=" -march=armv9-a+sme -c -o $tmpf.o $tmpf"
$compiler_name $flags $args >/dev/null 2>&1
} || {
no_sme=1
}
rm -rf "$tmpd"
fi
c11_atomics=0
case "$data" in
*HAVE_C11*)
@@ -472,6 +493,7 @@ done
printf "CEXTRALIB=%s %s %s\n" "$linker_L" "$linker_l" "$linker_a"
[ "$no_msa" -eq 1 ] && printf "NO_MSA=1\n"
[ "$no_sve" -eq 1 ] && printf "NO_SVE=1\n"
[ "$no_sme" -eq 1 ] && printf "NO_SME=1\n"
[ "$no_rv64gv" -eq 1 ] && printf "NO_RV64GV=1\n"
[ "$no_avx512" -eq 1 ] && printf "NO_AVX512=1\n"
[ "$no_avx512bf" -eq 1 ] && printf "NO_AVX512BF16=1\n"
+39 -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.
* *****************************************************************************/
#ifndef CBLAS_H
#define CBLAS_H
@@ -407,13 +435,13 @@ void cblas_cimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum
void cblas_zimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double* calpha, double* a,
OPENBLAS_CONST blasint clda, OPENBLAS_CONST blasint cldb);
void cblas_sgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float cbeta,
void cblas_sgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float cbeta,
float *c, OPENBLAS_CONST blasint cldc);
void cblas_dgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double cbeta,
void cblas_dgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double cbeta,
double *c, OPENBLAS_CONST blasint cldc);
void cblas_cgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float *calpha, float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float *cbeta,
void cblas_cgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float *calpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float *cbeta,
float *c, OPENBLAS_CONST blasint cldc);
void cblas_zgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double *calpha, double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double *cbeta,
void cblas_zgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double *calpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double *cbeta,
double *c, OPENBLAS_CONST blasint cldc);
void cblas_sgemm_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,
@@ -437,15 +465,22 @@ 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);
/*** 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 */
+25 -14
View File
@@ -31,22 +31,23 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
set(CCOMMON_OPT "${CCOMMON_OPT} -wd981")
endif ()
if (USE_OPENMP)
# USE_SIMPLE_THREADED_LEVEL3 = 1
# NO_AFFINITY = 1
find_package(OpenMP REQUIRED)
if (OpenMP_FOUND)
set(CCOMMON_OPT "${CCOMMON_OPT} ${OpenMP_C_FLAGS} -DUSE_OPENMP")
set(FCOMMON_OPT "${FCOMMON_OPT} ${OpenMP_Fortran_FLAGS}")
endif()
endif ()
if (DYNAMIC_ARCH)
if (ARM64)
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 9.99)
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) # SVE ACLE supported in GCC >= 10
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
endif ()
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 14) # SME ACLE supported in GCC >= 14
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
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)
endif()
endif ()
if (DYNAMIC_LIST)
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
@@ -93,6 +94,16 @@ 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 ()
if (EXISTS ${PROJECT_SOURCE_DIR}/config_kernel.h)
message (FATAL_ERROR "Your build directory contains a file config_kernel.h, probably from a previous compilation with make. This will conflict with the cmake compilation and cause strange compiler errors - please remove the file before trying again")
+94 -13
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 ()
@@ -84,7 +115,7 @@ endif ()
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC")
if (POWER)
set(CCOMMON_OPT "${CCOMMON_OPT} -tp pwr8")
else ()
elseif (X86_64)
set(CCOMMON_OPT "${CCOMMON_OPT} -tp px")
endif ()
endif ()
@@ -182,7 +213,9 @@ endif ()
if (${CORE} STREQUAL A64FX)
if (NOT DYNAMIC_ARCH)
if (${GCC_VERSION} VERSION_GREATER 11.0 OR ${GCC_VERSION} VERSION_EQUAL 11.0)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" 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")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
@@ -190,15 +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 "NVC" 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)
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 ()
@@ -207,12 +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")
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" 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 ()
@@ -220,10 +275,24 @@ endif ()
if (${CORE} STREQUAL NEOVERSEN1)
if (NOT DYNAMIC_ARCH)
if (${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")
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" 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 -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 "NVC")
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 ()
@@ -232,21 +301,33 @@ 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)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
endif ()
endif ()
endif ()
if (${CORE} STREQUAL ARMV9SME)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv9-a+sme")
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 ()
@@ -258,7 +339,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 ()
+4 -2
View File
@@ -45,13 +45,15 @@ if (NOT ONLY_CBLAS)
# TODO: detect whether underscore needed, set #defines and BU appropriately - use try_compile
# TODO: set FEXTRALIB flags a la f_check?
if (NOT (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND x${CMAKE_Fortran_COMPILER_ID} MATCHES "IntelLLVM"))
set(BU "_")
file(APPEND ${TARGET_CONF_TEMP}
"#define BUNDERSCORE _\n"
"#define NEEDBUNDERSCORE 1\n"
"#define NEED2UNDERSCORES 0\n")
else ()
set (FCOMMON_OPT "${FCOMMON_OPT} /fp:precise /recursive /names:lowercase /assume:nounderscore")
endif()
else ()
#When we only build CBLAS, we set NOFORTRAN=2
+54 -23
View File
@@ -7,7 +7,7 @@ if (${F_COMPILER} STREQUAL "FLANG" AND NOT CMAKE_Fortran_COMPILER_ID STREQUAL "L
# This is for classic Flang. LLVM Flang is handled with gfortran below.
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_FLANG")
if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -fopenmp")
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
set(FCOMMON_OPT "${FCOMMON_OPT} -Mrecursive -Kieee")
endif ()
@@ -61,21 +61,25 @@ if (${F_COMPILER} STREQUAL "GFORTRAN" OR ${F_COMPILER} STREQUAL "F95" OR CMAKE_F
endif ()
if (LOONGARCH64)
if (BINARY64)
CHECK_C_COMPILER_FLAG("-mabi=lp64d" COMPILER_SUPPORT_LP64D_ABI)
if(COMPILER_SUPPORT_LP64D_ABI)
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64d")
else()
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64")
endif ()
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
CHECK_C_COMPILER_FLAG("-mabi=lp64d" COMPILER_SUPPORT_LP64D_ABI)
if(COMPILER_SUPPORT_LP64D_ABI)
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64d")
else()
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64")
endif ()
endif ()
if (INTERFACE64)
set(FCOMMON_OPT "${FCOMMON_OPT} -fdefault-integer-8")
endif ()
else ()
CHECK_C_COMPILER_FLAG("-mabi=ilp32d" COMPILER_SUPPORT_ILP32D_ABI)
if(COMPILER_SUPPORT_ILP32D_ABI)
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=ilp32d")
else()
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp32")
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
CHECK_C_COMPILER_FLAG("-mabi=ilp32d" COMPILER_SUPPORT_ILP32D_ABI)
if(COMPILER_SUPPORT_ILP32D_ABI)
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=ilp32d")
else()
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp32")
endif ()
endif ()
endif ()
endif ()
@@ -113,7 +117,7 @@ if (${F_COMPILER} STREQUAL "GFORTRAN" OR ${F_COMPILER} STREQUAL "F95" OR CMAKE_F
endif ()
if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -fopenmp")
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
@@ -124,14 +128,14 @@ 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(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
if (${F_COMPILER} STREQUAL "FUJITSU")
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_FUJITSU")
if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
@@ -147,7 +151,7 @@ if (${F_COMPILER} STREQUAL "IBM")
set(FCOMMON_OPT "${FCOMMON_OPT} -q32")
endif ()
if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
@@ -164,7 +168,7 @@ if (${F_COMPILER} STREQUAL "PGI" OR ${F_COMPILER} STREQUAL "PGF95")
endif ()
set(FCOMMON_OPT "${FCOMMON_OPT} -Mrecursive")
if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
@@ -191,7 +195,7 @@ if (${F_COMPILER} STREQUAL "PATHSCALE")
endif ()
if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
@@ -229,7 +233,7 @@ if (${F_COMPILER} STREQUAL "OPEN64")
if (USE_OPENMP)
set(FEXTRALIB "${FEXTRALIB} -lstdc++")
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
@@ -241,25 +245,52 @@ if (${F_COMPILER} STREQUAL "SUN")
set(FCOMMON_OPT "${FCOMMON_OPT} -m64")
endif ()
if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -xopenmp=parallel")
set(OpenMP_Fortran_FLAGS "-xopenmp=parallel" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
if (${F_COMPILER} STREQUAL "COMPAQ")
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_COMPAQ")
if (USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
if (${F_COMPILER} STREQUAL "CRAY")
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_INTEL")
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_CRAYFC")
set(FCOMMON_OPT "${FCOMMON_OPT} -hnopattern")
if (INTERFACE64)
set (FCOMMON_OPT "${FCOMMON_OPT} -s integer64")
endif ()
if (NOT USE_OPENMP)
set(FCOMMON_OPT "${FCOMMON_OPT} -O noomp")
set(FCOMMON_OPT "${FCOMMON_OPT} -fno-openmp")
else ()
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
if (${F_COMPILER} STREQUAL "NAGFOR")
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_NAG")
if (INTERFACE64)
set(FCOMMON_OPT "${FCOMMON_OPT} -i8")
endif ()
# Options from Makefile.system
# -dcfuns: Enable non-standard double precision complex intrinsic functions
# -ieee=full: enables all IEEE arithmetic facilities including non-stop arithmetic.
# -w=obs: Suppress warning messages about obsolescent features
# -thread_safe: Compile code for safe execution in a multi-threaded environment.
# -recursive: Specifies that procedures are RECURSIVE by default.
set(FCOMMON_OPT "${FCOMMON_OPT} -dcfuns -recursive -ieee=full -w=obs -thread_safe")
# Options from Reference-LAPACK
# Suppress compiler banner and summary
set(FCOMMON_OPT "${FCOMMON_OPT} -quiet")
# Disable other common warnings
# -w=x77: Suppress warning messages about Fortran 77 features
# -w=ques: Suppress warning messages about questionable usage
# -w=unused: Suppress warning messages about unused variables
set(FCOMMON_OPT "${FCOMMON_OPT} -w=x77 -w=ques -w=unused")
if (USE_OPENMP)
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
endif ()
endif ()
+46
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)
@@ -79,6 +107,10 @@ macro(SetDefaultL1)
SetFallback(CROTKERNEL zrot.S)
SetFallback(ZROTKERNEL zrot.S)
SetFallback(XROTKERNEL zrot.S)
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)
@@ -138,6 +170,8 @@ 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 ()
@@ -190,6 +224,8 @@ 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)
SetFallback(SHGERKERNEL ../generic/ger.c)
@@ -203,6 +239,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)
+10 -5
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
@@ -517,7 +517,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 +536,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
@@ -1018,7 +1018,12 @@ foreach (LA_FILE ${LA_GEN_SRC})
endforeach ()
if (NOT C_LAPACK)
set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS}")
# The below line is duplicating Fortran flags but NAG has a few flags
# that cannot be specified twice. It's possible this is not needed for
# any compiler, but for safety, we only turn off for NAG
if (NOT ${F_COMPILER} STREQUAL "NAGFOR")
set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS}")
endif ()
if (${F_COMPILER} STREQUAL "GFORTRAN")
set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS} -fno-tree-vectorize")
endif()
+8 -6
View File
@@ -98,6 +98,8 @@ set(CSRC
lapacke_cgesv_work.c
lapacke_cgesvd.c
lapacke_cgesvd_work.c
lapacke_cgesvdq.c
lapacke_cgesvdq_work.c
lapacke_cgesvdx.c
lapacke_cgesvdx_work.c
lapacke_cgesvj.c
@@ -1766,8 +1768,8 @@ set(SSRC
lapacke_strsna_work.c
lapacke_strsyl.c
lapacke_strsyl_work.c
lapacke_ctrsyl3.c
lapacke_ctrsyl3_work.c
lapacke_strsyl3.c
lapacke_strsyl3_work.c
lapacke_strtri.c
lapacke_strtri_work.c
lapacke_strtrs.c
@@ -2410,10 +2412,10 @@ set(ZSRC
lapacke_ilaver.c
)
if (BUILD_LAPACK_DEPRECATED)
set(SRCS $SRCS lapacke_sgeqpf.c lapacke_sgeqpf_work.c lapacke_sggsvd.c lapacke_sggsvd_work.c lapacke_sggsvp.c lapacke_sggsvp_work.c)
set(SRCD $SRCD lapacke_dgeqpf.c lapacke_dgeqpf_work.c lapacke_dggsvd.c lapacke_dggsvd_work.c lapacke_dggsvp.c lapacke_dggsvp_work.c)
set(SRCC $SRCC lapacke_cgeqpf.c lapacke_cgeqpf_work.c lapacke_cggsvd.c lapacke_cggsvd_work.c lapacke_cggsvp.c lapacke_cggsvp_work.c)
set(SRCZ $SRCZ lapacke_zgeqpf.c lapacke_zgeqpf_work.c lapacke_zggsvd.c lapacke_zggsvd_work.c lapacke_zggsvp.c lapacke_zggsvp_work.c)
list(APPEND SSRC lapacke_sgeqpf.c lapacke_sgeqpf_work.c lapacke_sggsvd.c lapacke_sggsvd_work.c lapacke_sggsvp.c lapacke_sggsvp_work.c)
list(APPEND DSRC lapacke_dgeqpf.c lapacke_dgeqpf_work.c lapacke_dggsvd.c lapacke_dggsvd_work.c lapacke_dggsvp.c lapacke_dggsvp_work.c)
list(APPEND CSRC lapacke_cgeqpf.c lapacke_cgeqpf_work.c lapacke_cggsvd.c lapacke_cggsvd_work.c lapacke_cggsvp.c lapacke_cggsvp_work.c)
list(APPEND ZSRC lapacke_zgeqpf.c lapacke_zgeqpf_work.c lapacke_zggsvd.c lapacke_zggsvd_work.c lapacke_zggsvp.c lapacke_zggsvp_work.c)
endif()
set(SRCX
+2 -2
View File
@@ -9,5 +9,5 @@ Name: OpenBLAS
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
Version: @OpenBLAS_VERSION@
URL: https://github.com/OpenMathLib/OpenBLAS
Libs: @OpenMP_C_FLAGS@ -L${libdir} -l${libnameprefix}openblas${libnamesuffix}${libsuffix}
Cflags: -I${includedir}
Libs: -L${libdir} -l${libnameprefix}openblas${libnamesuffix}${libsuffix}
Cflags: -I${includedir} @OpenMP_C_FLAGS@
+209 -9
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
@@ -58,7 +86,7 @@ set(TARGET_CONF_TEMP "${PROJECT_BINARY_DIR}/${TARGET_CONF}.tmp")
# c_check
set(FU "")
if (APPLE OR (MSVC AND NOT ${CMAKE_C_COMPILER_ID} MATCHES "Clang"))
if (APPLE OR (MSVC AND NOT (${CMAKE_C_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM")))
set(FU "_")
endif()
if(MINGW AND NOT MINGW64)
@@ -131,6 +159,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)
@@ -1006,15 +1036,15 @@ endif ()
"#define HAVE_SVE\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(SGEMM_UNROLL_N 8)
set(DGEMM_UNROLL_M 4)
set(DGEMM_UNROLL_N 8)
set(CGEMM_UNROLL_M 2)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_M 2)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "NEOVERSEN2")
elseif ("${TCORE}" STREQUAL "NEOVERSEN2" OR "${TCORE}" STREQUAL "ARMV9SME")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_CODE_SIZE\t65536\n"
"#define L1_CODE_LINESIZE\t64\n"
@@ -1195,6 +1225,33 @@ endif ()
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
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")
file(APPEND ${TARGET_CONF_TEMP}
"#define ARMV8\n"
@@ -1249,6 +1306,25 @@ endif ()
set(ZGEMM_UNROLL_M 2)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "ARMV8SVE" OR "${TCORE}" STREQUAL "CORTEXA510" OR "${TCORE}" STREQUAL "CORTEXX2" OR "${TCORE}" STREQUAL "ARMV9")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE\t32768\n"
"#define L1_DATA_LINESIZE\t64\n"
"#define L2_SIZE\t1048576\n"
"#define L2_LINESIZE\t64\n"
"#define DTB_DEFAULT_ENTRIES\t64\n"
"#define DTB_SIZE\t4096\n"
"#define L2_ASSOCIATIVE\t32\n"
"#define ARMV8\n")
set(SGEMM_UNROLL_M 4)
set(SGEMM_UNROLL_N 8)
set(DGEMM_UNROLL_M 4)
set(DGEMM_UNROLL_N 8)
set(CGEMM_UNROLL_M 2)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 2)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "P5600")
file(APPEND ${TARGET_CONF_TEMP}
"#define L2_SIZE 1048576\n"
@@ -1331,6 +1407,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"
@@ -1342,13 +1490,61 @@ 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 "LA64_GENERIC")
file(APPEND ${TARGET_CONF_TEMP}
"#define DTB_DEFAULT_ENTRIES 64\n")
set(SGEMM_UNROLL_M 2)
set(SGEMM_UNROLL_N 8)
set(DGEMM_UNROLL_M 2)
set(DGEMM_UNROLL_N 8)
set(CGEMM_UNROLL_M 1)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 1)
set(ZGEMM_UNROLL_N 4)
set(CGEMM3M_UNROLL_M 2)
set(CGEMM3M_UNROLL_N 8)
set(ZGEMM3M_UNROLL_M 2)
set(ZGEMM3M_UNROLL_N 8)
elseif ("${TCORE}" STREQUAL "LA264")
file(APPEND ${TARGET_CONF_TEMP}
"#define DTB_DEFAULT_ENTRIES 64\n")
set(HAVE_LSX 1)
set(SGEMM_UNROLL_M 2)
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(CGEMM3M_UNROLL_M 2)
set(CGEMM3M_UNROLL_N 8)
set(ZGEMM3M_UNROLL_M 8)
set(ZGEMM3M_UNROLL_N 4)
elseif ("${TCORE}" STREQUAL "LA464")
file(APPEND ${TARGET_CONF_TEMP}
"#define DTB_DEFAULT_ENTRIES 64\n")
set(HAVE_LASX 1)
set(HAVE_LSX 1)
set(SGEMM_UNROLL_M 16)
set(SGEMM_UNROLL_N 8)
set(DGEMM_UNROLL_M 16)
set(DGEMM_UNROLL_N 6)
set(CGEMM_UNROLL_M 16)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 8)
set(ZGEMM_UNROLL_N 4)
set(CGEMM3M_UNROLL_M 16)
set(CGEMM3M_UNROLL_N 8)
set(ZGEMM3M_UNROLL_M 16)
set(ZGEMM3M_UNROLL_N 6)
endif()
set(SBGEMM_UNROLL_M 8)
set(SBGEMM_UNROLL_N 4)
@@ -1361,9 +1557,11 @@ endif ()
# GetArch_2nd
foreach(float_char S;D;Q;C;Z;X)
if (NOT DEFINED ${float_char}GEMM_UNROLL_M)
message(STATUS "setting unrollm=2")
set(${float_char}GEMM_UNROLL_M 2)
endif()
if (NOT DEFINED ${float_char}GEMM_UNROLL_N)
message(STATUS "setting unrolln=2")
set(${float_char}GEMM_UNROLL_N 2)
endif()
endforeach()
@@ -1385,7 +1583,9 @@ else(NOT CMAKE_CROSSCOMPILING)
message(STATUS "MSVC")
set(GETARCH_FLAGS ${GETARCH_FLAGS} -DFORCE_GENERIC)
else()
list(APPEND GETARCH_SRC ${PROJECT_SOURCE_DIR}/cpuid.S)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
list(APPEND GETARCH_SRC ${PROJECT_SOURCE_DIR}/cpuid.S)
endif()
if (DEFINED TARGET_CORE)
set(GETARCH_FLAGS ${GETARCH_FLAGS} -DFORCE_${TARGET_CORE})
endif ()
+124 -33
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
@@ -21,7 +48,15 @@ endif()
# Other files expect CORE, which is actually TARGET and will become TARGET_CORE for kernel build. Confused yet?
# It seems we are meant to use TARGET as input and CORE internally as kernel.
if(NOT DEFINED CORE AND DEFINED TARGET)
set(CORE ${TARGET})
if (${TARGET} STREQUAL "LOONGSON3R5")
set(CORE "LA464")
elseif (${TARGET} STREQUAL "LOONGSON2K1000")
set(CORE "LA264")
elseif (${TARGET} STREQUAL "LOONGSONGENERIC")
set(CORE "LA64_GENERIC)")
else ()
set(CORE ${TARGET})
endif()
endif()
# TARGET_CORE will override TARGET which is used in DYNAMIC_ARCH=1.
@@ -263,7 +298,7 @@ if (DEFINED TARGET)
endif()
if (${TARGET} STREQUAL POWER10)
if (CMAKE_C_COMPILER VERSION VERSION_GREATER 10.2 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.2)
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.2 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.2)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math")
else ()
message(FATAL_ERROR "Compiler GCC ${CMAKE_C_COMPILER_VERSION} does not support Power10.")
@@ -281,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()
@@ -303,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")
@@ -310,6 +365,9 @@ if (${TARGET} STREQUAL NEOVERSEV1)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.2-a+sve")
endif()
endif()
if (${TARGET} STREQUAL ARMV9SME)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv9-a+sme -O3")
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")
@@ -361,6 +419,20 @@ else ()
endif ()
endif ()
if (USE_OPENMP)
find_package(OpenMP COMPONENTS C REQUIRED)
set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_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.")
endif()
endif ()
endif ()
if (BINARY64)
if (INTERFACE64)
# CCOMMON_OPT += -DUSE64BITINT
@@ -382,28 +454,45 @@ if (NEED_PIC)
if (NOT NOFORTRAN)
if (${F_COMPILER} STREQUAL "SUN")
set(FCOMMON_OPT "${FCOMMON_OPT} -pic")
elseif (${F_COMPILER} STREQUAL "NAGFOR")
set(FCOMMON_OPT "${FCOMMON_OPT} -PIC")
else ()
set(FCOMMON_OPT "${FCOMMON_OPT} -fPIC")
endif ()
endif()
endif ()
if (X86_64 OR ${CORE} STREQUAL POWER10)
if (X86_64 OR ${CORE} STREQUAL POWER10 OR ARM64 OR LOONGARCH64)
set(SMALL_MATRIX_OPT TRUE)
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 (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)
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")
@@ -610,11 +699,26 @@ 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()
# TODO: not sure what PFLAGS is -hpa
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 ()
endif ()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FCOMMON_OPT}")
# TODO: not sure what FPFLAGS is -hpa
@@ -627,27 +731,18 @@ if (LAPACK_STRLEN)
endif()
set(LAPACK_FPFLAGS "${LAPACK_FPFLAGS} ${FPFLAGS}")
#Disable -fopenmp for LAPACK Fortran codes on Windows.
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(FILTER_FLAGS "-fopenmp;-mp;-openmp;-xopenmp=parallel")
foreach (FILTER_FLAG ${FILTER_FLAGS})
string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS})
endforeach ()
endif ()
if (CMAKE_Fortran_COMPILER)
if ("${F_COMPILER}" STREQUAL "NAG" OR "${F_COMPILER}" STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
set(FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512")
if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
message(STATUS "removing fortran flags")
set(FILTER_FLAGS "${FILTER_FLAGS};-m32;-m64")
if ("${F_COMPILER}" STREQUAL "NAGFOR" OR "${F_COMPILER}" STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
set(FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512")
if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
message(STATUS "removing fortran flags not supported by the compiler")
set(FILTER_FLAGS "${FILTER_FLAGS};-m32;-m64")
endif ()
foreach (FILTER_FLAG ${FILTER_FLAGS})
string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS})
endforeach ()
endif ()
foreach (FILTER_FLAG ${FILTER_FLAGS})
string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS})
endforeach ()
endif ()
endif ()
if ("${F_COMPILER}" STREQUAL "GFORTRAN")
@@ -667,14 +762,10 @@ endif ()
if (${CMAKE_C_COMPILER} STREQUAL "LSB" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DLAPACK_COMPLEX_STRUCTURE")
endif ()
if (${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM" AND ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DNOCHANGE")
endif ()
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 ()
endif ()
if (NOT DEFINED SUFFIX)
set(SUFFIX o)
+22
View File
@@ -10,6 +10,10 @@ if (${HOST_OS} STREQUAL "WINDOWS")
set(HOST_OS WINNT)
endif ()
if (${HOST_OS} STREQUAL "IOS")
set(HOST_OS DARWIN)
endif ()
if (${HOST_OS} STREQUAL "LINUX")
# check if we're building natively on Android (TERMUX)
EXECUTE_PROCESS( COMMAND uname -o COMMAND tr -d '\n' OUTPUT_VARIABLE OPERATING_SYSTEM)
@@ -46,6 +50,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")
@@ -96,6 +103,8 @@ elseif(X86)
set(ARCH "x86")
elseif(POWER)
set(ARCH "power")
elseif(ZARCH)
set(ARCH "zarch")
elseif(MIPS32)
set(ARCH "mips")
elseif(MIPS64)
@@ -104,6 +113,8 @@ elseif(ARM)
set(ARCH "arm")
elseif(ARM64)
set(ARCH "arm64")
elseif(LOONGARCH64)
set(ARCH "loongarch64")
else()
set(ARCH ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "Target Architecture")
endif ()
@@ -133,6 +144,17 @@ endif()
endif()
endif()
if (ARM64)
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)
if (NO_SME EQUAL 1)
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_SME")
endif()
file(REMOVE "${PROJECT_BINARY_DIR}/sme.c" "${PROJECT_BINARY_DIR}/sme.o")
endif()
endif()
include(CheckIncludeFile)
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
if (HAVE_C11 EQUAL 1)
+37 -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.
###############################################################################
# Functions to help with the OpenBLAS build
# Reads string from getarch into CMake vars. Format of getarch vars is VARNAME=VALUE
@@ -16,6 +44,14 @@ endfunction ()
macro(ParseMakefileVars MAKEFILE_IN)
message(STATUS "Reading vars from ${MAKEFILE_IN}...")
set (C_COMPILER ${CMAKE_C_COMPILER_ID})
set (OSNAME ${CMAKE_SYSTEM_NAME})
if (${C_COMPILER} MATCHES Clang)
set (C_COMPILER CLANG)
endif ()
if (${OSNAME} STREQUAL Windows)
set (OSNAME WINNT)
endif ()
message(STATUS OS ${OSNAME} COMPILER ${C_COMPILER})
set (IfElse 0)
set (ElseSeen 0)
set (SkipIfs 0)
@@ -339,7 +375,7 @@ 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")
if (${float_type} STREQUAL "BFLOAT16" AND NOT "${defines_in}" MATCHES "BGEM")
set (float_char "sb")
endif ()
endif ()
+28 -1
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
@@ -372,6 +392,12 @@ typedef int blasint;
#endif
#endif
#if defined(ARCH_RISCV64)
#ifndef YIELDING
#define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop;\n");
#endif
#endif
#ifdef __EMSCRIPTEN__
#define YIELDING
@@ -696,6 +722,7 @@ void gotoblas_profile_init(void);
void gotoblas_profile_quit(void);
int support_avx512(void);
int support_sme1(void);
#ifdef USE_OPENMP
+16 -3
View File
@@ -47,8 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#define INLINE inline
#define RETURN_BY_COMPLEX
#ifndef ASSEMBLER
@@ -104,12 +102,27 @@ static inline int blas_quickdivide(blasint x, blasint y){
#if defined(ASSEMBLER) && !defined(NEEDPARAM)
#if !defined(__APPLE__) && !defined(_WIN32)
#define OPENBLAS_ARM_TYPE_FUNCTION .type REALNAME, %function ;
#else
#define OPENBLAS_ARM_TYPE_FUNCTION
#endif
#define PROLOGUE \
.arm ;\
.global REALNAME ;\
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
+4 -4
View File
@@ -44,9 +44,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define RMB __asm__ __volatile__ ("dmb ishld" : : : "memory")
#endif
#define INLINE inline
#if defined( F_INTERFACE_FLANG) || defined(F_INTERFACE_PGI)
#if defined( F_INTERFACE_FLANG) || (defined(F_INTERFACE_PGI) && (defined(__NVCOMPILER) && (__NVCOMPILER_MAJOR__ < 23 || (__NVCOMPILER_MAJOR__ == 23 && __NVCOMPILER_MINOR__ < 9))))
#define RETURN_BY_STACK
#else
#define RETURN_BY_COMPLEX
@@ -55,6 +53,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSEMBLER
#ifndef NO_AFFINITY
static __inline int WhereAmI(void){
uint64_t ret;
__asm__ volatile (
@@ -67,6 +66,7 @@ static __inline int WhereAmI(void){
if ((int)ret <0) ret = 0;
return (int)ret;
}
#endif
static __inline void blas_lock(volatile BLASULONG *address){
@@ -175,7 +175,7 @@ REALNAME:
#define HUGE_PAGESIZE ( 4 << 20)
#ifndef BUFFERSIZE
#if defined(NEOVERSEN1) || defined(NEOVERSEN2) || defined(NEOVERSEV1) || defined(A64FX) || defined(ARMV8SVE)
#if defined(NEOVERSEN1) || defined(NEOVERSEN2) || defined(NEOVERSEV1) || defined(A64FX) || defined(ARMV8SVE) || defined(ARMV9SME)
#define BUFFER_SIZE (32 << 22)
#else
#define BUFFER_SIZE (32 << 20)
+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
+2
View File
@@ -22,6 +22,7 @@
#define DSUM_K dsum_k
#define DSWAP_K dswap_k
#define DROT_K drot_k
#define DROTM_K drotm_k
#define DGEMV_N dgemv_n
#define DGEMV_T dgemv_t
@@ -180,6 +181,7 @@
#define DSUM_K gotoblas -> dsum_k
#define DSWAP_K gotoblas -> dswap_k
#define DROT_K gotoblas -> drot_k
#define DROTM_K gotoblas -> drotm_k
#define DGEMV_N gotoblas -> dgemv_n
#define DGEMV_T gotoblas -> dgemv_t
-2
View File
@@ -41,8 +41,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define WMB do { __asm__ __volatile__("": : :"memory"); } while (0)
#define RMB
#define INLINE __attribute__((__always_inline__)) inline
static inline int blas_quickdivide(blasint x, blasint y) {
return x / y;
}
+8
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,6 +257,8 @@ 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(sgemv)(char *, blasint *, blasint *, float *, float *, blasint *,
@@ -481,6 +485,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
+7 -3
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,
@@ -213,9 +217,9 @@ int srotmg_k(float *, float *, float *, float *, float *);
int drotmg_k(double *, double *, double *, double *, double *);
int qrotmg_k(xdouble *, xdouble *, xdouble *, xdouble *, xdouble *);
int srotm_k (BLASLONG, float, BLASLONG, float, BLASLONG, float);
int drotm_k (BLASLONG, double, BLASLONG, double, BLASLONG, double);
int qrotm_k (BLASLONG, xdouble, BLASLONG, xdouble, BLASLONG, xdouble);
int srotm_k (BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
int drotm_k (BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
int qrotm_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *);
int saxpby_k (BLASLONG, float, float *, BLASLONG, float, float *, BLASLONG);
+6
View File
@@ -1,4 +1,5 @@
/*********************************************************************/
/* Copyright 2025 The OpenBLAS Project */
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
@@ -44,6 +45,11 @@
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);
+42 -1
View File
@@ -52,9 +52,19 @@ 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);
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 +88,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 +523,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 +677,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 +784,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 +1984,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__
}
+4 -2
View File
@@ -75,8 +75,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define WMB __sync_synchronize()
#define RMB __sync_synchronize()
#define INLINE inline
#ifndef ASSEMBLER
static inline int blas_quickdivide(blasint x, blasint y){
@@ -281,9 +279,13 @@ REALNAME: ;\
#define GNUSTACK
#endif /* defined(__linux__) && defined(__ELF__) */
#ifdef __clang__
#define EPILOGUE .end
#else
#define EPILOGUE \
.end REALNAME ;\
GNUSTACK
#endif
#define PROFCODE
+109 -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"
@@ -70,6 +73,7 @@
#define SUM_K QSUM_K
#define SWAP_K QSWAP_K
#define ROT_K QROT_K
#define ROTM_K QROTM_K
#define GEMV_N QGEMV_N
#define GEMV_T QGEMV_T
@@ -361,6 +365,7 @@
#define SUM_K DSUM_K
#define SWAP_K DSWAP_K
#define ROT_K DROT_K
#define ROTM_K DROTM_K
#define GEMV_N DGEMV_N
#define GEMV_T DGEMV_T
@@ -654,15 +659,108 @@
#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
#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
@@ -680,8 +778,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
@@ -977,6 +1073,7 @@
#define SUM_K SSUM_K
#define SWAP_K SSWAP_K
#define ROT_K SROT_K
#define ROTM_K SROTM_K
#define GEMV_N SGEMV_N
#define GEMV_T SGEMV_T
@@ -2615,6 +2712,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;
@@ -2987,6 +3087,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
@@ -3008,6 +3110,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
-2
View File
@@ -37,8 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define WMB __sync_synchronize()
#define RMB __sync_synchronize()
#define INLINE inline
#define RETURN_BY_COMPLEX
#ifndef ASSEMBLER
-2
View File
@@ -75,8 +75,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define WMB __sync_synchronize()
#define RMB __sync_synchronize()
#define INLINE inline
#ifndef ASSEMBLER
static inline unsigned int rpcc(void){
+128 -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 */
@@ -48,8 +48,27 @@ typedef struct {
int dtb_entries;
int switch_ratio;
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 *);
#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 +83,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);
@@ -77,11 +96,16 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
double (*dsbdot_k) (BLASLONG, float *, 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 *);
@@ -89,6 +113,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);
@@ -179,12 +211,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
@@ -197,6 +229,7 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
//double (*dsdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
int (*srot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
int (*srotm_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
#endif
#if (BUILD_SINGLE==1) || (BUILD_DOUBLE==1) || (BUILD_COMPLEX==1)
int (*saxpy_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
@@ -221,6 +254,11 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
void (*sgemm_direct) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG , float *, BLASLONG , float * , BLASLONG);
int (*sgemm_direct_performant) (BLASLONG M, BLASLONG N, BLASLONG K);
#endif
#ifdef ARCH_ARM64
void (*sgemm_direct) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG , float *, BLASLONG , float * , BLASLONG);
void (*sgemm_direct_alpha_beta) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float * , BLASLONG);
#endif
int (*sgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG);
int (*sgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
@@ -310,10 +348,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);
@@ -330,6 +368,7 @@ BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
#endif
#if (BUILD_DOUBLE==1) || (BUILD_COMPLEX16==1)
int (*drot_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double);
int (*drotm_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
int (*daxpy_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
int (*dscal_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
int (*dswap_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
@@ -428,10 +467,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);
@@ -439,6 +478,7 @@ BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
int (*qcopy_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
xdouble (*qdot_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
int (*qrot_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble);
int (*qrotm_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *);
int (*qaxpy_k) (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
int (*qscal_k) (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
@@ -520,8 +560,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);
@@ -731,8 +771,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);
@@ -942,8 +982,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);
@@ -1221,7 +1261,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
@@ -1349,7 +1405,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
@@ -1470,6 +1550,7 @@ extern gotoblas_t *gotoblas;
#endif
#endif
#ifndef COMPLEX
@@ -1497,6 +1578,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
+1 -3
View File
@@ -78,8 +78,6 @@
#define RMB __asm__ __volatile__ ("sync")
#endif
#define INLINE inline
#ifdef PPC440
#define STDERR stdout
#define QNONCACHE 0x1
@@ -91,7 +89,7 @@
void *qalloc(int flags, size_t bytes);
static INLINE void blas_lock(volatile unsigned long *address){
static inline void blas_lock(volatile unsigned long *address){
long int ret, val = 1;
+2
View File
@@ -22,6 +22,7 @@
#define QSUM_K qsum_k
#define QSWAP_K qswap_k
#define QROT_K qrot_k
#define QROTM_K qrotm_k
#define QGEMV_N qgemv_n
#define QGEMV_T qgemv_t
@@ -165,6 +166,7 @@
#define QSUM_K gotoblas -> qsum_k
#define QSWAP_K gotoblas -> qswap_k
#define QROT_K gotoblas -> qrot_k
#define QROTM_K gotoblas -> qrotm_k
#define QGEMV_N gotoblas -> qgemv_n
#define QGEMV_T gotoblas -> qgemv_t
-2
View File
@@ -75,8 +75,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define WMB __sync_synchronize()
#define RMB __sync_synchronize()
#define INLINE inline
#ifndef ASSEMBLER
+6 -2
View File
@@ -24,6 +24,7 @@
#define SSCAL_K sscal_k
#define SSWAP_K sswap_k
#define SROT_K srot_k
#define SROTM_K srotm_k
#define SGEMV_N sgemv_n
#define SGEMV_T sgemv_t
@@ -48,6 +49,7 @@
#define SGEMM_DIRECT_PERFORMANT sgemm_direct_performant
#define SGEMM_DIRECT sgemm_direct
#define SGEMM_DIRECT_ALPHA_BETA sgemm_direct_alpha_beta
#define SGEMM_ONCOPY sgemm_oncopy
#define SGEMM_OTCOPY sgemm_otcopy
@@ -189,6 +191,7 @@
#define SSCAL_K gotoblas -> sscal_k
#define SSWAP_K gotoblas -> sswap_k
#define SROT_K gotoblas -> srot_k
#define SROTM_K gotoblas -> srotm_k
#define SGEMV_N gotoblas -> sgemv_n
#define SGEMV_T gotoblas -> sgemv_t
@@ -213,9 +216,10 @@
#ifdef ARCH_X86_64
#define SGEMM_DIRECT_PERFORMANT gotoblas -> sgemm_direct_performant
#define SGEMM_DIRECT gotoblas -> sgemm_direct
#else
#elif ARCH_ARM64
#define SGEMM_DIRECT_PERFORMANT sgemm_direct_performant
#define SGEMM_DIRECT sgemm_direct
#define SGEMM_DIRECT gotoblas -> sgemm_direct
#define SGEMM_DIRECT_ALPHA_BETA gotoblas -> sgemm_direct_alpha_beta
#endif
#define SGEMM_ONCOPY gotoblas -> sgemm_oncopy
+72
View File
@@ -0,0 +1,72 @@
#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
#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
#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
+4
View File
@@ -283,6 +283,10 @@ static __inline unsigned int blas_quickdivide(unsigned int x, unsigned int y){
#define RETURN_BY_STACK
#endif
#ifdef F_INTERFACE_CRAYFC
#define RETURN_BY_PACKED
#endif
#ifdef F_INTERFACE_FUJITSU
#define RETURN_BY_STACK
#endif
+9 -5
View File
@@ -37,9 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define WMB
#define RMB
#define INLINE inline
#define RETURN_BY_COMPLEX
#ifndef ASSEMBLER
@@ -106,9 +103,16 @@ static inline int blas_quickdivide(blasint x, blasint y){
.global REALNAME ;\
.type REALNAME, %function ;\
REALNAME:
#define EPILOGUE
#if defined(__ELF__) && defined(__linux__)
# define GNUSTACK .section .note.GNU-stack,"",@progbits
#else
# define GNUSTACK
#endif
#define EPILOGUE \
.size REALNAME, .-REALNAME; \
GNUSTACK
#define PROFCODE
+7
View File
@@ -65,3 +65,10 @@ _cpuid:
.subsections_via_symbols
#endif
#if defined(__ELF__) && defined(__linux__)
#if defined(__arm__)
.section .note.GNU-stack,"",%progbits
#else
.section .note.GNU-stack,"",@progbits
#endif
#endif
+224 -45
View File
@@ -25,6 +25,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <stdlib.h>
#include <string.h>
#ifdef __APPLE__
#include <sys/sysctl.h>
@@ -33,6 +34,23 @@ size_t length=sizeof(value);
int64_t value64;
size_t length64=sizeof(value64);
#endif
#if (defined OS_LINUX || defined OS_ANDROID)
#include <asm/hwcap.h>
#include <sys/auxv.h>
#ifndef HWCAP_CPUID
#define HWCAP_CPUID (1 << 11)
#endif
#ifndef HWCAP_SVE
#define HWCAP_SVE (1 << 22)
#endif
#if (defined OS_WINDOWS)
#include <winreg.h>
#endif
#define get_cpu_ftr(id, var) ({ \
__asm__ __volatile__ ("mrs %0, "#id : "=r" (var)); \
})
#endif
#define CPU_UNKNOWN 0
#define CPU_ARMV8 1
@@ -42,11 +60,11 @@ size_t length64=sizeof(value64);
#define CPU_CORTEXA57 3
#define CPU_CORTEXA72 4
#define CPU_CORTEXA73 5
#define CPU_CORTEXA76 23
#define CPU_CORTEXA76 23
#define CPU_NEOVERSEN1 11
#define CPU_NEOVERSEV1 16
#define CPU_NEOVERSEN2 17
#define CPU_NEOVERSEV2 24
#define CPU_NEOVERSEV2 24
#define CPU_CORTEXX1 18
#define CPU_CORTEXX2 19
#define CPU_CORTEXA510 20
@@ -61,6 +79,7 @@ size_t length64=sizeof(value64);
#define CPU_TSV110 9
// Ampere
#define CPU_EMAG8180 10
#define CPU_AMPERE1 25
// Apple
#define CPU_VORTEX 13
// Fujitsu
@@ -93,7 +112,8 @@ static char *cpuname[] = {
"CORTEXA710",
"FT2000",
"CORTEXA76",
"NEOVERSEV2"
"NEOVERSEV2",
"AMPERE1"
};
static char *cpuname_lower[] = {
@@ -121,13 +141,19 @@ static char *cpuname_lower[] = {
"cortexa710",
"ft2000",
"cortexa76",
"neoversev2"
"neoversev2",
"ampere1",
"ampere1a"
};
static int cpulowperf=0;
static int cpumidperf=0;
static int cpuhiperf=0;
int get_feature(char *search)
{
#ifdef __linux
#if defined( __linux ) || defined( __NetBSD__ )
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;
@@ -158,33 +184,108 @@ int get_feature(char *search)
#endif
return(0);
}
static int cpusort(const void *model1, const void *model2)
{
return (*(int*)model2-*(int*)model1);
}
int detect(void)
{
#ifdef __linux
#if defined( __linux ) || defined( __NetBSD__ )
int n,i,ii;
int midr_el1;
int implementer;
int cpucap[1024];
int cpucores[1024];
FILE *infile;
char buffer[512], *p, *cpu_part = NULL, *cpu_implementer = NULL;
char cpupart[6],cpuimpl[6];
char *cpu_impl=NULL,*cpu_pt=NULL;
char buffer[2048], *p, *cpu_part = NULL, *cpu_implementer = NULL;
p = (char *) NULL ;
infile = fopen("/proc/cpuinfo", "r");
while (fgets(buffer, sizeof(buffer), infile)) {
if ((cpu_part != NULL) && (cpu_implementer != NULL)) {
break;
}
if ((cpu_part == NULL) && !strncmp("CPU part", buffer, 8)) {
cpu_part = strchr(buffer, ':') + 2;
cpu_part = strdup(cpu_part);
} else if ((cpu_implementer == NULL) && !strncmp("CPU implementer", buffer, 15)) {
cpu_implementer = strchr(buffer, ':') + 2;
cpu_implementer = strdup(cpu_implementer);
cpulowperf=cpumidperf=cpuhiperf=0;
for (i=0;i<1024;i++)cpucores[i]=0;
n=0;
infile = fopen("/sys/devices/system/cpu/possible", "r");
if (!infile) {
infile = fopen("/proc/cpuinfo", "r");
while (fgets(buffer, sizeof(buffer), infile)) {
if (!strncmp("processor", buffer, 9))
n++;
}
} else {
fgets(buffer, sizeof(buffer), infile);
sscanf(buffer,"0-%d",&n);
n++;
}
fclose(infile);
fclose(infile);
cpu_implementer=NULL;
for (i=0;i<n;i++){
sprintf(buffer,"/sys/devices/system/cpu/cpu%d/regs/identification/midr_el1",i);
infile= fopen(buffer,"r");
if (!infile) {
infile = fopen("/proc/cpuinfo", "r");
for (ii=0;ii<n;ii++){
cpu_part=NULL;cpu_implementer=NULL;
while (fgets(buffer, sizeof(buffer), infile)) {
if ((cpu_part != NULL) && (cpu_implementer != NULL)) {
break;
}
if ((cpu_part == NULL) && !strncmp("CPU part", buffer, 8)) {
cpu_pt = strchr(buffer, ':') + 2;
cpu_part = strdup(cpu_pt);
cpucores[i]=strtol(cpu_part,NULL,0);
} else if ((cpu_implementer == NULL) && !strncmp("CPU implementer", buffer, 15)) {
cpu_impl = strchr(buffer, ':') + 2;
cpu_implementer = strdup(cpu_impl);
}
}
if (strstr(cpu_implementer, "0x41")) {
if (cpucores[ii] >= 0xd4b) cpuhiperf++;
else
if (cpucores[ii] >= 0xd07) cpumidperf++;
else cpulowperf++;
}
else cpulowperf++;
}
fclose(infile);
break;
} else {
(void)fgets(buffer, sizeof(buffer), infile);
midr_el1=strtoul(buffer,NULL,16);
fclose(infile);
implementer = (midr_el1 >> 24) & 0xFF;
cpucores[i] = (midr_el1 >> 4) & 0xFFF;
sprintf(buffer,"/sys/devices/system/cpu/cpu%d/cpu_capacity",i);
infile= fopen(buffer,"r");
if (!infile) {
if (implementer== 65) {
if (cpucores[i] >= 0xd4b) cpuhiperf++;
else
if (cpucores[i] >= 0xd07) cpumidperf++;
else cpulowperf++;
}
else cpulowperf++;
} else {
(void)fgets(buffer, sizeof(buffer), infile);
sscanf(buffer,"%d",&cpucap[i]);
if (cpucap[i] >= 1000) cpuhiperf++;
else
if (cpucap[i] >= 500) cpumidperf++;
else cpulowperf++;
fclose(infile);
}
}
sprintf(cpuimpl,"0x%02x",implementer);
cpu_implementer=strdup(cpuimpl);
}
qsort(cpucores,1024,sizeof(int),cpusort);
sprintf(cpupart,"0x%03x",cpucores[0]);
cpu_part=strdup(cpupart);
if(cpu_part != NULL && cpu_implementer != NULL) {
// Arm
if (strstr(cpu_implementer, "0x41")) {
@@ -219,7 +320,7 @@ int detect(void)
else if (strstr(cpu_part, "0xd4f")) //NVIDIA Grace et al.
return CPU_NEOVERSEV2;
else if (strstr(cpu_part, "0xd0b"))
return CPU_CORTEXA76;
return CPU_CORTEXA76;
}
// Qualcomm
else if (strstr(cpu_implementer, "0x51") && strstr(cpu_part, "0xc00"))
@@ -237,6 +338,10 @@ 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;
@@ -277,10 +382,47 @@ int detect(void)
}
#else
#ifdef __APPLE__
length64 = sizeof(value64);
sysctlbyname("hw.ncpu",&value64,&length64,NULL,0);
cpulowperf=value64;
length64 = sizeof(value64);
sysctlbyname("hw.nperflevels",&value64,&length64,NULL,0);
if (value64 > 1) {
length64 = sizeof(value64);
sysctlbyname("hw.perflevel0.cpusperl2",&value64,&length64,NULL,0);
cpuhiperf=value64;
length64 = sizeof(value64);
sysctlbyname("hw.perflevel1.cpusperl2",&value64,&length64,NULL,0);
cpulowperf=value64;
}
length64 = sizeof(value64);
sysctlbyname("hw.cpufamily",&value64,&length64,NULL,0);
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 == 2271604202) return CPU_VORTEX; //A16/M3
if (value64 == 1867590060) return CPU_VORTEX; //M4
#else
#ifdef OS_WINDOWS
HKEY reghandle;
HKEY hklm = HKEY_LOCAL_MACHINE;
WCHAR valstring[512];
PVOID pvalstring=valstring;
DWORD size=sizeof (valstring);
DWORD type=RRF_RT_ANY;
DWORD flags=0;
LPCWSTR subkey= L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
LPCWSTR field=L"ProcessorNameString";
LONG errcode=RegOpenKeyEx(HKEY_LOCAL_MACHINE,TEXT("Hardware\\Description\\System\\CentralProcessor\\0"), 0, KEY_READ, &reghandle);
if (errcode != NO_ERROR) wprintf(L"Could not open registry key for proc0: %x\n",errcode);
errcode=RegQueryValueEx(reghandle, "ProcessorNameString", NULL,NULL ,pvalstring,&size);
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, "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;
#endif
#endif
return CPU_ARMV8;
#endif
@@ -313,7 +455,7 @@ void get_cpucount(void)
{
int n=0;
#ifdef __linux
#if defined( __linux ) || defined( __NetBSD__ )
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;
@@ -330,10 +472,23 @@ int n=0;
fclose(infile);
printf("#define NUM_CORES %d\n",n);
if (cpulowperf >0)
printf("#define NUM_CORES_LP %d\n",cpulowperf);
if (cpumidperf >0)
printf("#define NUM_CORES_MP %d\n",cpumidperf);
if (cpuhiperf >0)
printf("#define NUM_CORES_HP %d\n",cpuhiperf);
#endif
#ifdef __APPLE__
length64 = sizeof(value64);
sysctlbyname("hw.physicalcpu_max",&value,&length,NULL,0);
printf("#define NUM_CORES %d\n",value);
if (cpulowperf >0)
printf("#define NUM_CORES_LP %d\n",cpulowperf);
if (cpumidperf >0)
printf("#define NUM_CORES_MP %d\n",cpumidperf);
if (cpuhiperf >0)
printf("#define NUM_CORES_HP %d\n",cpuhiperf);
#endif
}
@@ -346,7 +501,6 @@ void get_cpuconfig(void)
printf("#define ARMV8\n");
printf("#define HAVE_NEON\n"); // This shouldn't be necessary
printf("#define HAVE_VFPV4\n"); // This shouldn't be necessary
int d = detect();
switch (d)
{
@@ -401,7 +555,8 @@ void get_cpuconfig(void)
break;
case CPU_NEOVERSEV1:
case CPU_CORTEXA76:
printf("#define HAVE_SVE 1\n");
case CPU_CORTEXA76:
printf("#define %s\n", cpuname[d]);
printf("#define L1_CODE_SIZE 65536\n");
printf("#define L1_CODE_LINESIZE 64\n");
@@ -429,29 +584,32 @@ void get_cpuconfig(void)
printf("#define L2_ASSOCIATIVE 8\n");
printf("#define DTB_DEFAULT_ENTRIES 48\n");
printf("#define DTB_SIZE 4096\n");
printf("#define HAVE_SVE 1\n");
break;
case CPU_NEOVERSEV2:
case CPU_NEOVERSEV2:
printf("#define ARMV9\n");
printf("#define %s\n", cpuname[d]);
printf("#define L1_CODE_SIZE 65536\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 1048576\n");
printf("#define L2_LINESIZE 64\n");
printf("#define L2_ASSOCIATIVE 8\n");
// L1 Data TLB = 48 entries
// L2 Data TLB = 2048 entries
printf("#define DTB_DEFAULT_ENTRIES 48\n");
printf("#define DTB_SIZE 4096\n"); // Set to 4096 for symmetry with other configs.
break;
printf("#define HAVE_SVE 1\n");
printf("#define %s\n", cpuname[d]);
printf("#define L1_CODE_SIZE 65536\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 1048576\n");
printf("#define L2_LINESIZE 64\n");
printf("#define L2_ASSOCIATIVE 8\n");
// L1 Data TLB = 48 entries
// L2 Data TLB = 2048 entries
printf("#define DTB_DEFAULT_ENTRIES 48\n");
printf("#define DTB_SIZE 4096\n"); // Set to 4096 for symmetry with other configs.
break;
case CPU_CORTEXA510:
case CPU_CORTEXA710:
case CPU_CORTEXX1:
case CPU_CORTEXX2:
printf("#define ARMV9\n");
printf("#define HAVE_SVE 1\n");
printf("#define %s\n", cpuname[d]);
printf("#define L1_CODE_SIZE 65536\n");
printf("#define L1_CODE_LINESIZE 64\n");
@@ -534,6 +692,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");
@@ -554,12 +727,17 @@ void get_cpuconfig(void)
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
@@ -568,6 +746,7 @@ void get_cpuconfig(void)
break;
case CPU_A64FX:
printf("#define A64FX\n");
printf("#define HAVE_SVE 1\n");
printf("#define L1_CODE_SIZE 65535\n");
printf("#define L1_DATA_SIZE 65535\n");
printf("#define L1_DATA_LINESIZE 256\n");
@@ -600,7 +779,7 @@ void get_libname(void)
void get_features(void)
{
#ifdef __linux
#if defined( __linux ) || defined( __NetBSD__ )
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;
+334 -70
View File
@@ -1,5 +1,5 @@
/*****************************************************************************
Copyright (c) 2011-2020, The OpenBLAS Project
Copyright (c) 2011-2024, The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -32,53 +32,299 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************/
#include <stdint.h>
#include <sys/auxv.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <sys/auxv.h>
/* If LASX extension instructions supported,
* using core LOONGSON3R5
* If only LSX extension instructions supported,
* using core LOONGSON2K1000
* If neither LASX nor LSX extension instructions supported,
* using core LOONGSONGENERIC (As far as I know, there is no such
* CPU yet)
*/
#define CPU_LA64_GENERIC 0
#define CPU_LA264 1
#define CPU_LA364 2
#define CPU_LA464 3
#define CPU_LA664 4
#define CPU_GENERIC 0
#define CPU_LOONGSON3R5 1
#define CPU_LOONGSON2K1000 2
#define CORE_LA64_GENERIC 0
#define CORE_LA264 1
#define CORE_LA464 2
#define LA_HWCAP_LSX (1U << 4)
#define LA_HWCAP_LASX (1U << 5)
#define LOONGARCH_CFG0 0x00
#define LOONGARCH_CFG2 0x02
#define LOONGARCH_CFG10 0x10
#define LOONGARCH_CFG11 0x11
#define LOONGARCH_CFG12 0x12
#define LOONGARCH_CFG13 0x13
#define LOONGARCH_CFG14 0x14
#define LASX_MASK 1<<7
#define LSX_MASK 1<<6
#define PRID_SERIES_MASK 0xf000
#define PRID_SERIES_LA264 0xa000
#define PRID_SERIES_LA364 0xb000
#define PRID_SERIES_LA464 0xc000
#define PRID_SERIES_LA664 0xd000
#define CACHE_INFO_L1_IU 0
#define CACHE_INFO_L1_D 1
#define CACHE_INFO_L2_IU 2
#define CACHE_INFO_L2_D 3
#define CACHE_INFO_L3_IU 4
#define CACHE_INFO_L3_D 5
#define L1_IU_PRESENT_MASK 0x0001
#define L1_IU_UNITY_MASK 0x0002
#define L1_D_PRESENT_MASK 0x0004
#define L2_IU_PRESENT_MASK 0x0008
#define L2_IU_UNITY_MASK 0x0010
#define L2_D_PRESENT_MASK 0x0080
#define L3_IU_PRESENT_MASK 0x0400
#define L3_IU_UNITY_MASK 0x0800
#define L3_D_PRESENT_MASK 0x4000
#define CACHE_WAY_MINUS_1_MASK 0x0000ffff
#define CACHE_INDEX_LOG2_MASK 0x00ff0000
#define CACHE_LINESIZE_LOG2_MASK 0x7f000000
typedef struct {
int size;
int associative;
int linesize;
int unify;
int present;
} cache_info_t;
/* Using microarchitecture representation */
static char *cpuname[] = {
"LOONGSONGENERIC",
"LOONGSON3R5",
"LOONGSON2K1000"
"LA64_GENERIC",
"LA264", /* Loongson 64bit, 2-issue, Like 2K1000LA */
"LA364", /* Loongson 64bit, 3-issue, Like 2K2000 */
"LA464", /* Loongson 64bit, 4-issue, Like 3A5000, 3C5000L, 3C5000 and 3D5000 */
"LA664" /* Loongson 64bit, 6-issue, Like 3A6000, 3C6000 and 3D6000 */
};
static char *cpuname_lower[] = {
"loongsongeneric",
"loongson3r5",
"loongson2k1000"
"la64_generic",
"la264",
"la364",
"la464",
"la664"
};
int detect(void) {
#ifdef __linux
static char *corename[] = {
"LA64_GENERIC", /* Implies using scalar instructions for optimization */
"LA264", /* Implies using LSX instructions for optimization */
"LA464", /* Implies using LASX instructions for optimization */
};
static char *corename_lower[] = {
"la64_generic",
"la264",
"la464",
};
/*
* Obtain cache and processor identification
* through the cpucfg command.
*/
static void get_cacheinfo(int type, cache_info_t *cacheinfo) {
cache_info_t cache_info;
memset(&cache_info, 0, sizeof(cache_info));
uint32_t reg_10 = 0;
__asm__ volatile (
"cpucfg %0, %1 \n\t"
: "+&r"(reg_10)
: "r"(LOONGARCH_CFG10)
);
switch (type) {
case CACHE_INFO_L1_IU:
if (reg_10 & L1_IU_PRESENT_MASK) {
uint32_t reg_11 = 0;
cache_info.present = reg_10 & L1_IU_PRESENT_MASK;
cache_info.unify = reg_10 & L1_IU_UNITY_MASK;
__asm__ volatile (
"cpucfg %0, %1 \n\t"
: "+&r"(reg_11)
: "r"(LOONGARCH_CFG11)
);
cache_info.associative = (reg_11 & CACHE_WAY_MINUS_1_MASK) + 1;
cache_info.linesize = 1 << ((reg_11 & CACHE_LINESIZE_LOG2_MASK) >> 24);
cache_info.size = cache_info.associative * cache_info.linesize *
(1 << ((reg_11 & CACHE_INDEX_LOG2_MASK) >> 16));
}
break;
case CACHE_INFO_L1_D:
if (reg_10 & L1_D_PRESENT_MASK) {
uint32_t reg_12 = 0;
cache_info.present = reg_10 & L1_D_PRESENT_MASK;
__asm__ volatile (
"cpucfg %0, %1 \n\t"
: "+&r"(reg_12)
: "r"(LOONGARCH_CFG12)
);
cache_info.associative = (reg_12 & CACHE_WAY_MINUS_1_MASK) + 1;
cache_info.linesize = 1 << ((reg_12 & CACHE_LINESIZE_LOG2_MASK) >> 24);
cache_info.size = cache_info.associative * cache_info.linesize *
(1 << ((reg_12 & CACHE_INDEX_LOG2_MASK) >> 16));
}
break;
case CACHE_INFO_L2_IU:
if (reg_10 & L2_IU_PRESENT_MASK) {
uint32_t reg_13 = 0;
cache_info.present = reg_10 & L2_IU_PRESENT_MASK;
cache_info.unify = reg_10 & L2_IU_UNITY_MASK;
__asm__ volatile (
"cpucfg %0, %1 \n\t"
: "+&r"(reg_13)
: "r"(LOONGARCH_CFG13)
);
cache_info.associative = (reg_13 & CACHE_WAY_MINUS_1_MASK) + 1;
cache_info.linesize = 1 << ((reg_13 & CACHE_LINESIZE_LOG2_MASK) >> 24);
cache_info.size = cache_info.associative * cache_info.linesize *
(1 << ((reg_13 & CACHE_INDEX_LOG2_MASK) >> 16));
}
break;
case CACHE_INFO_L2_D:
if (reg_10 & L2_D_PRESENT_MASK) {
cache_info.present = reg_10 & L2_D_PRESENT_MASK;
// No date fetch
}
break;
case CACHE_INFO_L3_IU:
if (reg_10 & L3_IU_PRESENT_MASK) {
uint32_t reg_14 = 0;
cache_info.present = reg_10 & L3_IU_PRESENT_MASK;
cache_info.unify = reg_10 & L3_IU_UNITY_MASK;
__asm__ volatile (
"cpucfg %0, %1 \n\t"
: "+&r"(reg_14)
: "r"(LOONGARCH_CFG14)
);
cache_info.associative = (reg_14 & CACHE_WAY_MINUS_1_MASK) + 1;
cache_info.linesize = 1 << ((reg_14 & CACHE_LINESIZE_LOG2_MASK) >> 24);
cache_info.size = cache_info.associative * cache_info.linesize *
(1 << ((reg_14 & CACHE_INDEX_LOG2_MASK) >> 16));
}
break;
case CACHE_INFO_L3_D:
if (reg_10 & L3_D_PRESENT_MASK) {
cache_info.present = reg_10 & L3_D_PRESENT_MASK;
// No data fetch
}
break;
default:
break;
}
*cacheinfo = cache_info;
}
static uint32_t get_prid() {
uint32_t reg = 0;
__asm__ volatile (
"cpucfg %0, %1 \n\t"
: "+&r"(reg)
: "r"(LOONGARCH_CFG0)
);
return reg;
}
static void get_cpucount(uint32_t *count) {
uint32_t num = 0;
FILE *f = fopen("/proc/cpuinfo", "r");
if (!f) return;
char buf[200];
while (fgets(buf, sizeof(buf), f))
{
if (!strncmp("processor", buf, 9))
num ++;
}
fclose(f);
*count = num;
}
/* Detect whether the OS supports the LASX instruction set */
static int os_support_lasx() {
int hwcap = (int)getauxval(AT_HWCAP);
if (hwcap & LA_HWCAP_LASX)
return CPU_LOONGSON3R5;
else if (hwcap & LA_HWCAP_LSX)
return CPU_LOONGSON2K1000;
return 1;
else
return CPU_GENERIC;
#endif
return CPU_GENERIC;
return 0;
}
/* Detect whether the OS supports the LSX instruction set */
static int os_support_lsx() {
int hwcap = (int)getauxval(AT_HWCAP);
if (hwcap & LA_HWCAP_LSX)
return 1;
else
return 0;
}
int get_coretype(void) {
uint32_t prid = get_prid();
switch (prid & PRID_SERIES_MASK) {
case (PRID_SERIES_LA464):
case (PRID_SERIES_LA664):
if (os_support_lasx())
return CORE_LA464;
else if (os_support_lsx())
return CORE_LA264;
else
return CORE_LA64_GENERIC;
break;
case (PRID_SERIES_LA264):
case (PRID_SERIES_LA364):
if (os_support_lsx())
return CORE_LA264;
else
return CORE_LA64_GENERIC;
break;
default:
return CORE_LA64_GENERIC;
break;
}
}
int get_cputype(void) {
uint32_t prid = get_prid();
switch (prid & PRID_SERIES_MASK) {
case (PRID_SERIES_LA264):
return CPU_LA264;
break;
case (PRID_SERIES_LA364):
return CPU_LA364;
break;
case (PRID_SERIES_LA464):
return CPU_LA464;
break;
case (PRID_SERIES_LA664):
return CPU_LA664;
break;
default:
return CPU_LA64_GENERIC;
break;
}
}
char *get_corename(void) {
return cpuname[detect()];
return corename[get_coretype()];
}
void get_libname(void){
printf("%s", corename_lower[get_coretype()]);
}
void get_architecture(void) {
@@ -86,8 +332,7 @@ void get_architecture(void) {
}
void get_subarchitecture(void) {
int d = detect();
printf("%s", cpuname[d]);
printf("%s", cpuname[get_cputype()]);
}
void get_subdirname(void) {
@@ -95,50 +340,69 @@ void get_subdirname(void) {
}
void get_cpuconfig(void) {
uint32_t hwcaps = 0;
int d = detect();
cache_info_t info;
uint32_t num_cores = 0;
switch (d) {
case CPU_LOONGSON3R5:
printf("#define LOONGSON3R5\n");
printf("#define L1_DATA_SIZE 65536\n");
printf("#define L1_DATA_LINESIZE 64\n");
printf("#define L2_SIZE 1048576\n");
printf("#define L2_LINESIZE 64\n");
printf("#define DTB_DEFAULT_ENTRIES 64\n");
printf("#define DTB_SIZE 4096\n");
printf("#define L2_ASSOCIATIVE 16\n");
break;
printf("#define %s\n", corename[get_coretype()]); // Core name
case CPU_LOONGSON2K1000:
printf("#define LOONGSON2K1000\n");
printf("#define L1_DATA_SIZE 65536\n");
printf("#define L1_DATA_LINESIZE 64\n");
printf("#define L2_SIZE 262144\n");
printf("#define L2_LINESIZE 64\n");
printf("#define DTB_DEFAULT_ENTRIES 64\n");
printf("#define DTB_SIZE 4096\n");
printf("#define L2_ASSOCIATIVE 16\n");
break;
printf("#define CPU_NAME %s\n", cpuname[get_cputype()]); // Cpu microarchitecture name
default:
printf("#define LOONGSONGENERIC\n");
printf("#define L1_DATA_SIZE 65536\n");
printf("#define L1_DATA_LINESIZE 64\n");
printf("#define L2_SIZE 262144\n");
printf("#define L2_LINESIZE 64\n");
printf("#define DTB_DEFAULT_ENTRIES 64\n");
printf("#define DTB_SIZE 4096\n");
printf("#define L2_ASSOCIATIVE 16\n");
break;
get_cacheinfo(CACHE_INFO_L1_IU, &info);
if (info.present) {
if (info.unify) { // Unified cache, without distinguishing between instructions and data
printf("#define L1_SIZE %d\n", info.size);
printf("#define L1_ASSOCIATIVE %d\n", info.associative);
printf("#define L1_LINESIZE %d\n", info.linesize);
} else {
printf("#define L1_CODE_SIZE %d\n", info.size);
printf("#define L1_CODE_ASSOCIATIVE %d\n", info.associative);
printf("#define L1_CODE_LINESIZE %d\n", info.linesize);
}
}
hwcaps = (uint32_t)getauxval( AT_HWCAP );
if (hwcaps & LA_HWCAP_LSX) printf("#define HAVE_LSX\n");
if (hwcaps & LA_HWCAP_LASX) printf("#define HAVE_LASX\n");
}
if (!info.unify) {
get_cacheinfo(CACHE_INFO_L1_D, &info);
if (info.present) {
printf("#define L1_DATA_SIZE %d\n", info.size);
printf("#define L1_DATA_ASSOCIATIVE %d\n", info.associative);
printf("#define L1_DATA_LINESIZE %d\n", info.linesize);
}
}
void get_libname(void){
int d = detect();
printf("%s", cpuname_lower[d]);
get_cacheinfo(CACHE_INFO_L2_IU, &info);
if (info.present > 0) {
if (info.unify) {
printf("#define L2_SIZE %d\n", info.size);
printf("#define L2_ASSOCIATIVE %d\n", info.associative);
printf("#define L2_LINESIZE %d\n", info.linesize);
} else {
printf("#define L2_CODE_SIZE %d\n", info.size);
printf("#define L2_CODE_ASSOCIATIVE %d\n", info.associative);
printf("#define L2_CODE_LINESIZE %d\n", info.linesize);
}
}
get_cacheinfo(CACHE_INFO_L3_IU, &info);
if (info.present > 0) {
if (info.unify) {
printf("#define L3_SIZE %d\n", info.size);
printf("#define L3_ASSOCIATIVE %d\n", info.associative);
printf("#define L3_LINESIZE %d\n", info.linesize);
} else {
printf("#define L3_CODE_SIZE %d\n", info.size);
printf("#define L3_CODE_ASSOCIATIVE %d\n", info.associative);
printf("#define L3_CODE_LINESIZE %d\n", info.linesize);
}
}
if(os_support_lsx) printf("#define HAVE_LSX\n");
if(os_support_lasx) printf("#define HAVE_LASX\n");
get_cpucount(&num_cores);
if (num_cores)
printf("#define NUM_CORES %d\n", num_cores);
//TODO: Its unclear what this entry represents, but it is indeed necessary.
//It has been set based on reference to other platforms.
printf("#define DTB_DEFAULT_ENTRIES 64\n");
}
+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;
+50 -2
View File
@@ -1527,6 +1527,19 @@ int get_cpuname(void){
break;
case 10: //family 6 exmodel 10
switch (model) {
case 13: // Granite Rapids
if(support_amx_bf16())
return CPUTYPE_SAPPHIRERAPIDS;
if(support_avx512_bf16())
return CPUTYPE_COOPERLAKE;
if(support_avx512())
return CPUTYPE_SKYLAKEX;
if(support_avx2())
return CPUTYPE_HASWELL;
if(support_avx())
return CPUTYPE_SANDYBRIDGE;
else
return CPUTYPE_NEHALEM;
case 5: // Comet Lake H and S
case 6: // Comet Lake U
case 10: // Meteor Lake
@@ -1554,6 +1567,7 @@ int get_cpuname(void){
case 10:
case 15:
case 14: // Alder Lake N
case 13: // Lunar Lake
if(support_avx2())
return CPUTYPE_HASWELL;
if(support_avx())
@@ -1565,6 +1579,7 @@ int get_cpuname(void){
case 12: //family 6 exmodel 12
switch (model) {
case 15:
case 6: // Arrow Lake
if(support_avx512())
return CPUTYPE_SAPPHIRERAPIDS;
if(support_avx2())
@@ -1676,6 +1691,7 @@ int get_cpuname(void){
return CPUTYPE_BARCELONA;
}
case 10: // Zen3/4
case 11: // Zen5
#ifndef NO_AVX512
if(support_avx512_bf16())
return CPUTYPE_COOPERLAKE;
@@ -2352,8 +2368,22 @@ int get_coretype(void){
case 10:
switch (model) {
case 13: // Granite Rapids
if(support_amx_bf16())
return CORE_SAPPHIRERAPIDS;
if(support_avx512_bf16())
return CORE_COOPERLAKE;
if(support_avx512())
return CORE_SKYLAKEX;
if(support_avx2())
return CORE_HASWELL;
if(support_avx())
return CORE_SANDYBRIDGE;
else
return CORE_NEHALEM;
case 5: // Comet Lake H and S
case 6: // Comet Lake U
case 10: // Meteor Lake
if(support_avx())
#ifndef NO_AVX2
return CORE_HASWELL;
@@ -2362,6 +2392,7 @@ int get_coretype(void){
#endif
else
return CORE_NEHALEM;
case 0: // Meteor Lake
case 7:// Rocket Lake
#ifndef NO_AVX512
if(support_avx512())
@@ -2382,7 +2413,8 @@ int get_coretype(void){
case 7: // Raptor Lake
case 10:
case 15:
case 14: // Alder Lake N
case 14: // Alder Lake N
case 13: // Lunar Lake
#ifndef NO_AVX2
if(support_avx2())
return CORE_HASWELL;
@@ -2392,6 +2424,22 @@ int get_coretype(void){
else
return CORE_NEHALEM;
}
case 12:
switch (model) {
case 6: // Arrow Lake
if(support_amx_bf16())
return CORE_SAPPHIRERAPIDS;
if(support_avx512_bf16())
return CORE_COOPERLAKE;
if(support_avx512())
return CORE_SKYLAKEX;
if(support_avx2())
return CORE_HASWELL;
if(support_avx())
return CORE_SANDYBRIDGE;
else
return CORE_NEHALEM;
}
}
case 15:
if (model <= 0x2) return CORE_NORTHWOOD;
@@ -2451,7 +2499,7 @@ int get_coretype(void){
}
break;
}
} else if (exfamily == 8 || exfamily == 10) {
} else if (exfamily == 8 || exfamily == 10 || exfamily == 11) {
switch (model) {
case 1:
// AMD Ryzen
+4 -16
View File
@@ -6,6 +6,10 @@ 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_GREATER 14.1)
list(REMOVE_ITEM ${CMAKE_Fortran_FLAGS} -O3 -O2 -O1 -Os)
set (CMAKE_Fortran_FLAGS_RELEASE "" CACHE STRING "" FORCE)
endif()
if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize")
endif()
@@ -40,10 +44,6 @@ else()
c_${float_char}blas1.c)
endif()
target_link_libraries(x${float_char}cblat1 ${OpenBLAS_LIBNAME})
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
target_link_libraries(x${float_char}cblat1 omp pthread)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
target_link_libraries(x${float_char}cblat1 m)
endif()
@@ -69,10 +69,6 @@ else()
constant.c)
endif()
target_link_libraries(x${float_char}cblat2 ${OpenBLAS_LIBNAME})
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
target_link_libraries(x${float_char}cblat2 omp pthread)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
target_link_libraries(x${float_char}cblat2 m)
endif()
@@ -120,20 +116,12 @@ else()
endif()
endif()
target_link_libraries(x${float_char}cblat3 ${OpenBLAS_LIBNAME})
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
target_link_libraries(x${float_char}cblat3 omp pthread)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
target_link_libraries(x${float_char}cblat3 m)
endif()
if (USE_GEMM3M)
if ((${float_char} STREQUAL "c") OR (${float_char} STREQUAL "z"))
target_link_libraries(x${float_char}cblat3_3m ${OpenBLAS_LIBNAME})
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
target_link_libraries(x${float_char}cblat3 omp pthread)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
target_link_libraries(x${float_char}cblat3_3m m)
endif()
+5 -5
View File
@@ -26,7 +26,7 @@ endif
override CFLAGS += -DADD$(BU) -DCBLAS
ifeq ($(F_COMPILER),GFORTRAN)
ifneq (, $(filter $(CORE),LOONGSON3R3 LOONGSON3R4))
override FFLAGS = $(filter_out(-O2 -O3,$(FFLAGS))) -O0
override FFLAGS := $(filter_out(-O2 -O3,$(FFLAGS))) -O0
endif
override FFLAGS += -fno-tree-vectorize
endif
@@ -235,18 +235,18 @@ FLDFLAGS = $(FFLAGS:-fPIC=) $(LDFLAGS)
ifeq ($(USE_OPENMP), 1)
ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(C_COMPILER), CLANG)
CEXTRALIB += -lomp
EXTRALIB += -lomp
endif
endif
ifeq ($(F_COMPILER), NAG)
CEXTRALIB = -lgomp
EXTRALIB = -lgomp
endif
ifeq ($(F_COMPILER), IBM)
ifeq ($(C_COMPILER), GCC)
CEXTRALIB += -lgomp
EXTRALIB += -lgomp
endif
ifeq ($(C_COMPILER), CLANG)
CEXTRALIB += -lomp
EXTRALIB += -lomp
endif
endif
endif
+7 -4
View File
@@ -38,9 +38,12 @@
CALL CHECK1(SFAC)
END IF
* -- Print
IF (PASS) WRITE (NOUT,99998)
IF (PASS) THEN
WRITE (NOUT,99998)
ELSE
ERROR STOP
END IF
20 CONTINUE
STOP
*
99999 FORMAT (' Complex CBLAS Test Program Results',/1X)
99998 FORMAT (' ----- PASS -----')
@@ -228,7 +231,7 @@
CALL ITEST1(ICAMAXTEST(N,CX,INCX),ITRUE3(NP1))
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
STOP
ERROR STOP
END IF
*
40 CONTINUE
@@ -512,7 +515,7 @@
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
ERROR STOP
END IF
*
40 CONTINUE
+1 -1
View File
@@ -440,7 +440,7 @@ 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_(), itest1_(), stest1_();
extern /* Subroutine */ int cscaltest_(integer*, complex*, complex*, integer*);
static complex cx[8];
extern real scnrm2test_(integer*, complex*, integer*);
static integer np1;
+7 -5
View File
@@ -10,7 +10,7 @@
* 'CBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -243,7 +243,7 @@
$ GO TO 70
60 CONTINUE
WRITE( NOUT, FMT = 9986 )SNAMET
STOP
ERROR STOP
70 LTEST( I ) = LTESTT
GO TO 50
*
@@ -283,7 +283,7 @@
SAME = LCE( YY, YT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
STOP
ERROR STOP
END IF
TRANS = 'T'
CALL CMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,
@@ -291,7 +291,7 @@
SAME = LCE( YY, YT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -418,7 +418,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
+9 -7
View File
@@ -10,7 +10,7 @@
* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -194,7 +194,7 @@
$ GO TO 50
40 CONTINUE
WRITE( NOUT, FMT = 9990 )SNAMET
STOP
ERROR STOP
50 LTEST( I ) = LTESTT
GO TO 30
*
@@ -237,7 +237,7 @@
SAME = LCE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'C'
CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -246,7 +246,7 @@
SAME = LCE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
DO 120 J = 1, N
AB( J, NMAX + 1 ) = N - J + 1
@@ -264,7 +264,7 @@
SAME = LCE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'C'
CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -273,7 +273,7 @@
SAME = LCE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -385,7 +385,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT(' ROW-MAJOR DATA LAYOUT IS TESTED' )
+9 -7
View File
@@ -10,7 +10,7 @@
* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -194,7 +194,7 @@
$ GO TO 50
40 CONTINUE
WRITE( NOUT, FMT = 9990 )SNAMET
STOP
ERROR STOP
50 LTEST( I ) = LTESTT
GO TO 30
*
@@ -237,7 +237,7 @@
SAME = LCE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'C'
CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -246,7 +246,7 @@
SAME = LCE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
DO 120 J = 1, N
AB( J, NMAX + 1 ) = N - J + 1
@@ -264,7 +264,7 @@
SAME = LCE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'C'
CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -273,7 +273,7 @@
SAME = LCE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -385,7 +385,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT(' ROW-MAJOR DATA LAYOUT IS TESTED' )
+9 -6
View File
@@ -44,9 +44,12 @@
CALL CHECK3(SFAC)
END IF
* -- Print
IF (PASS) WRITE (NOUT,99998)
IF (PASS) THEN
WRITE (NOUT,99998)
ELSE
ERROR STOP
END IF
20 CONTINUE
STOP
*
99999 FORMAT (' Real CBLAS Test Program Results',/1X)
99998 FORMAT (' ----- PASS -----')
@@ -136,7 +139,7 @@
CALL STEST1(SS,DS1(K),DS1(K),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
STOP
ERROR STOP
END IF
20 CONTINUE
40 RETURN
@@ -229,7 +232,7 @@
CALL ITEST1(IDAMAXTEST(N,SX,INCX),ITRUE2(NP1))
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
STOP
ERROR STOP
END IF
60 CONTINUE
80 CONTINUE
@@ -384,7 +387,7 @@
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
ERROR STOP
END IF
100 CONTINUE
120 CONTINUE
@@ -472,7 +475,7 @@
70 CONTINUE
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
STOP
ERROR STOP
END IF
40 CONTINUE
60 CONTINUE
+7 -5
View File
@@ -10,7 +10,7 @@
* 'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -239,7 +239,7 @@
$ GO TO 70
60 CONTINUE
WRITE( NOUT, FMT = 9986 )SNAMET
STOP
ERROR STOP
70 LTEST( I ) = LTESTT
GO TO 50
*
@@ -279,7 +279,7 @@
SAME = LDE( YY, YT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
STOP
ERROR STOP
END IF
TRANS = 'T'
CALL DMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,
@@ -287,7 +287,7 @@
SAME = LDE( YY, YT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -414,7 +414,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
+9 -7
View File
@@ -10,7 +10,7 @@
* 'DBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -189,7 +189,7 @@
$ GO TO 50
40 CONTINUE
WRITE( NOUT, FMT = 9990 )SNAMET
STOP
ERROR STOP
50 LTEST( I ) = LTESTT
GO TO 30
*
@@ -232,7 +232,7 @@
SAME = LDE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'T'
CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -241,7 +241,7 @@
SAME = LDE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
DO 120 J = 1, N
AB( J, NMAX + 1 ) = N - J + 1
@@ -259,7 +259,7 @@
SAME = LDE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'T'
CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -268,7 +268,7 @@
SAME = LDE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -379,7 +379,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
+10 -7
View File
@@ -44,9 +44,12 @@
CALL CHECK3(SFAC)
END IF
* -- Print
IF (PASS) WRITE (NOUT,99998)
IF (PASS) THEN
WRITE (NOUT,99998)
ELSE
ERROR STOP
END IF
20 CONTINUE
STOP
*
99999 FORMAT (' Real CBLAS Test Program Results',/1X)
99998 FORMAT (' ----- PASS -----')
@@ -136,7 +139,7 @@
CALL STEST1(SS,DS1(K),DS1(K),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
STOP
ERROR STOP
END IF
20 CONTINUE
40 RETURN
@@ -229,7 +232,7 @@
CALL ITEST1(ISAMAXTEST(N,SX,INCX),ITRUE2(NP1))
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
STOP
ERROR STOP
END IF
60 CONTINUE
80 CONTINUE
@@ -384,7 +387,7 @@
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
ERROR STOP
END IF
100 CONTINUE
120 CONTINUE
@@ -479,7 +482,7 @@
70 CONTINUE
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
STOP
ERROR STOP
END IF
40 CONTINUE
60 CONTINUE
@@ -759,4 +762,4 @@
END IF
END IF
RETURN
END
END
+7 -5
View File
@@ -10,7 +10,7 @@
* 'SBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -239,7 +239,7 @@
$ GO TO 70
60 CONTINUE
WRITE( NOUT, FMT = 9986 )SNAMET
STOP
ERROR STOP
70 LTEST( I ) = LTESTT
GO TO 50
*
@@ -279,7 +279,7 @@
SAME = LSE( YY, YT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
STOP
ERROR STOP
END IF
TRANS = 'T'
CALL SMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,
@@ -287,7 +287,7 @@
SAME = LSE( YY, YT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -414,7 +414,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
+9 -7
View File
@@ -10,7 +10,7 @@
* 'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -188,7 +188,7 @@
$ GO TO 50
40 CONTINUE
WRITE( NOUT, FMT = 9990 )SNAMET
STOP
ERROR STOP
50 LTEST( I ) = LTESTT
GO TO 30
*
@@ -231,7 +231,7 @@
SAME = LSE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'T'
CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -240,7 +240,7 @@
SAME = LSE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
DO 120 J = 1, N
AB( J, NMAX + 1 ) = N - J + 1
@@ -258,7 +258,7 @@
SAME = LSE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'T'
CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -267,7 +267,7 @@
SAME = LSE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -378,7 +378,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
+7 -4
View File
@@ -38,9 +38,12 @@
CALL CHECK1(SFAC)
END IF
* -- Print
IF (PASS) WRITE (NOUT,99998)
IF (PASS) THEN
WRITE (NOUT,99998)
ELSE
ERROR STOP
END IF
20 CONTINUE
STOP
*
99999 FORMAT (' Complex CBLAS Test Program Results',/1X)
99998 FORMAT (' ----- PASS -----')
@@ -228,7 +231,7 @@
CALL ITEST1(IZAMAXTEST(N,CX,INCX),ITRUE3(NP1))
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
STOP
ERROR STOP
END IF
*
40 CONTINUE
@@ -512,7 +515,7 @@
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
ERROR STOP
END IF
*
40 CONTINUE
+2 -2
View File
@@ -380,7 +380,7 @@ 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*, doublereal*, doublecomplex*, integer*), itest1_(integer*, integer*), stest1_(doublereal*, doublereal*, doublereal*, doublereal*);
extern /* Subroutine */ int zscaltest_(integer*, doublecomplex*, doublecomplex*, integer*), itest1_(integer*, integer*), stest1_(doublereal*, doublereal*, doublereal*, doublereal*);
static doublecomplex cx[8];
extern doublereal dznrm2test_(integer*, doublecomplex*, integer*);
static integer np1;
@@ -595,7 +595,7 @@ static doublereal c_b43 = 1.;
static integer ki;
extern /* Subroutine */ int zdotutest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zswaptest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
static integer kn;
extern /* Subroutine */ int zaxpytest_(integer*, doublereal*, doublecomplex*, integer*, doublecomplex*, integer*);
extern /* Subroutine */ int zaxpytest_(integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
static doublecomplex cx[7], cy[7];
static integer mx, my;
+7 -5
View File
@@ -10,7 +10,7 @@
* 'CBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -243,7 +243,7 @@
$ GO TO 70
60 CONTINUE
WRITE( NOUT, FMT = 9986 )SNAMET
STOP
ERROR STOP
70 LTEST( I ) = LTESTT
GO TO 50
*
@@ -283,7 +283,7 @@
SAME = LZE( YY, YT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
STOP
ERROR STOP
END IF
TRANS = 'T'
CALL ZMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,
@@ -291,7 +291,7 @@
SAME = LZE( YY, YT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -418,7 +418,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
+9 -7
View File
@@ -10,7 +10,7 @@
* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -195,7 +195,7 @@
$ GO TO 50
40 CONTINUE
WRITE( NOUT, FMT = 9990 )SNAMET
STOP
ERROR STOP
50 LTEST( I ) = LTESTT
GO TO 30
*
@@ -238,7 +238,7 @@
SAME = LZE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'C'
CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -247,7 +247,7 @@
SAME = LZE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
DO 120 J = 1, N
AB( J, NMAX + 1 ) = N - J + 1
@@ -265,7 +265,7 @@
SAME = LZE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'C'
CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -274,7 +274,7 @@
SAME = LZE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -386,7 +386,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT(' ROW-MAJOR DATA LAYOUT IS TESTED' )
+9 -7
View File
@@ -10,7 +10,7 @@
* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
* F LOGICAL FLAG, T TO STOP ON FAILURES.
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
* 16.0 THRESHOLD VALUE OF TEST RATIO
@@ -195,7 +195,7 @@
$ GO TO 50
40 CONTINUE
WRITE( NOUT, FMT = 9990 )SNAMET
STOP
ERROR STOP
50 LTEST( I ) = LTESTT
GO TO 30
*
@@ -238,7 +238,7 @@
SAME = LZE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'C'
CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -247,7 +247,7 @@
SAME = LZE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
DO 120 J = 1, N
AB( J, NMAX + 1 ) = N - J + 1
@@ -265,7 +265,7 @@
SAME = LZE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
TRANSB = 'C'
CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
@@ -274,7 +274,7 @@
SAME = LZE( CC, CT, N )
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
STOP
ERROR STOP
END IF
*
* Test each subroutine in turn.
@@ -386,7 +386,9 @@
IF( TRACE )
$ CLOSE ( NTRA )
CLOSE ( NOUT )
STOP
IF( FATAL ) THEN
ERROR STOP
END IF
*
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
10001 FORMAT(' ROW-MAJOR DATA LAYOUT IS TESTED' )
+9
View File
@@ -10,6 +10,15 @@
#define int long
#endif
#if defined(_MSC_VER) && defined(__INTEL_CLANG_COMPILER)
//#define LAPACK_COMPLEX_STRUCTURE
#define NOCHANGE
#endif
/* e.g. mingw64/x86_64-w64-mingw32/include/winerror.h */
#ifdef FAILED
#undef FAILED
#endif
#define TRUE 1
#define PASSED 1
#define TEST_ROW_MJR 1
+128 -81
View File
@@ -1,104 +1,122 @@
This page describes the Make-based build, which is the default/authoritative
build method. Note that the OpenBLAS repository also supports building with
CMake (not described here) - that generally works and is tested, however there
may be small differences between the Make and CMake builds.
!!! info "Supported build systems"
!!! warning
This page is made by someone who is not the developer and should not be considered as an official documentation of the build system. For getting the full picture, it is best to read the Makefiles and understand them yourself.
This page describes the Make-based build, which is the
default/authoritative build method. Note that the OpenBLAS repository also
supports building with CMake (not described here) - that generally works
and is tested, however there may be small differences between the Make and
CMake builds.
## Makefile dep graph
## Makefile dependency graph
<!---
An easy way to update this diagram is to copy it into https://mermaid.live
and edit it interactively.
-->
```mermaid
flowchart LR
A[Makefile] -->|included by many of the Makefiles in the subdirectories!| B(Makefile.system)
B -->|triggered, not included, once by Makefile.system, and runs before any of the actual library code is built. builds and runs the 'getarch' tool for cpu identification, runs the compiler detection scripts c_check/f_check| C{Makefile.prebuild}
C -->|either this or Makefile_kernel.conf is generated| D[Makefile.conf]
C -->|temporary Makefile.conf during DYNAMIC_ARCH builds| E[Makefile_kernel.conf]
B -->|defaults for build options that can be given on the make command line| F[Makefile.rule]
B -->|architecture-specific compiler options and OpenBLAS buffer size values| G[Makefile.$ARCH]
A --> exports
A -->|directories: test, ctest, utest, cpp_thread_test| H(test directories)
A --> I($BLASDIRS)
I --> interface
I --> driver/level2
I --> driver/level3
I --> driver/others
A -->|for each target in DYNAMIC_CORE if DYNAMIC_ARCH=1| kernel
A -->|subdirs: timing, testing, testing/EIG, testing/LIN| J($NETLIB_LAPACK_DIR)
A --> relapack
```
Makefile
|
|----- Makefile.system # !!! this is included by many of the Makefiles in the subdirectories !!!
| |
| |===== Makefile.prebuild # This is triggered (not included) once by Makefile.system
| | | # and runs before any of the actual library code is built.
| | | # (builds and runs the "getarch" tool for cpu identification,
| | | # runs the compiler detection scripts c_check and f_check)
| | |
| | ----- (Makefile.conf) [ either this or Makefile_kernel.conf is generated ]
| | | { Makefile.system#L243 }
| | ----- (Makefile_kernel.conf) [ temporary Makefile.conf during DYNAMIC_ARCH builds ]
| |
| |----- Makefile.rule # defaults for build options that can be given on the make command line
| |
| |----- Makefile.$(ARCH) # architecture-specific compiler options and OpenBLAS buffer size values
|
|~~~~~ exports/
|
|~~~~~ test/
|
|~~~~~ utest/
|
|~~~~~ ctest/
|
|~~~~~ cpp_thread_test/
|
|~~~~~ kernel/
|
|~~~~~ ${SUBDIRS}
|
|~~~~~ ${BLASDIRS}
|
|~~~~~ ${NETLIB_LAPACK_DIR}{,/timing,/testing/{EIG,LIN}}
|
|~~~~~ relapack/
```
## Important Variables
Most of the tunable variables are found in [Makefile.rule](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.rule), along with their detailed descriptions.<br/>
Most of the variables are detected automatically in [Makefile.prebuild](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.prebuild), if they are not set in the environment.
Most of the tunable variables are found in
[Makefile.rule](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.rule),
along with their detailed descriptions.
Most of the variables are detected automatically in
[Makefile.prebuild](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.prebuild),
if they are not set in the environment.
The most commonly used variables are documented below. There are more options
though - please read the linked Makefiles if you want to see all variables.
### CPU related
```
ARCH - Target architecture (eg. x86_64)
TARGET - Target CPU architecture, in case of DYNAMIC_ARCH=1 means library will not be usable on less capable CPUs
TARGET_CORE - TARGET_CORE will override TARGET internally during each cpu-specific cycle of the build for DYNAMIC_ARCH
DYNAMIC_ARCH - For building library for multiple TARGETs (does not lose any optimizations, but increases library size)
DYNAMIC_LIST - optional user-provided subset of the DYNAMIC_CORE list in Makefile.system
```
- `ARCH`: target architecture (e.g., `x86-64`).
- `DYNAMIC_ARCH`: For building library for multiple `TARGET`s (does not lose any
optimizations, but increases library size).
- `DYNAMIC_LIST`: optional user-provided subset of the `DYNAMIC_CORE` list in
[Makefile.system](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.system).
- `TARGET`: target CPU architecture. In case of `DYNAMIC_ARCH=1`, it means that
the library will not be usable on less capable CPUs.
- `TARGET_CORE`: override `TARGET` internally during each CPU-specific cycle of
the build for `DYNAMIC_ARCH`.
### Toolchain related
```
CC - TARGET C compiler used for compilation (can be cross-toolchains)
FC - TARGET Fortran compiler used for compilation (can be cross-toolchains, set NOFORTRAN=1 if used cross-toolchain has no fortran compiler)
AR, AS, LD, RANLIB - TARGET toolchain helpers used for compilation (can be cross-toolchains)
HOSTCC - compiler of build machine, needed to create proper config files for target architecture
HOST_CFLAGS - flags for build machine compiler
```
- `CC`: `TARGET` C compiler used for compilation (can be cross-toolchains).
- `FC`: `TARGET` Fortran compiler used for compilation (can be cross-toolchains,
set `NOFORTRAN=1` if the used cross-toolchain has no Fortran compiler).
- `COMMON_OPT`: flags to add to all invocations of the target C and Fortran compilers
(overrides `CFLAGS`/`FFLAGS` - prefer using `COMMON_OPT`)
- `CCOMMON_OPT`: flags to add to all invocations of the target C compiler
(overrides `CFLAGS`)
- `FCOMMON_OPT`: flags to add to all invocations of the target Fortran compiler
(overrides `FFLAGS`)
- `LDFLAGS`: flags to add to all target linker invocations
- `AR`, `AS`, `LD`, `RANLIB`: `TARGET` toolchain helpers used for compilation
(can be cross-toolchains).
- `HOSTCC`: compiler of build machine, needed to create proper config files for
the target architecture.
- `HOST_CFLAGS`: flags for the build machine compiler.
### Library related
```
BINARY - 32/64 bit library
BUILD_SHARED - Create shared library
BUILD_STATIC - Create static library
#### Library kind and bitness options
QUAD_PRECISION - enable support for IEEE quad precision [ largely unimplemented leftover from GotoBLAS, do not use ]
EXPRECISION - Obsolete option to use float80 of SSE on BSD-like systems
INTERFACE64 - Build with 64bit integer representations to support large array index values [ incompatible with standard API ]
- `BINARY`: whether to build a 32-bit or 64-bit library (default is `64`, set
to `32` on a 32-bit platform).
- `INTERFACE64`: build with 64-bit (ILP64) integer representations to support
large array index values (incompatible with the standard 32-bit integer (LP64) API).
- `NO_STATIC`: if set to `1`, don't build a static library (default is `0`)
- `NO_SHARED`: if set to `1`, don't build a shared library (default is `0`)
BUILD_SINGLE - build the single-precision real functions of BLAS [and optionally LAPACK]
BUILD_DOUBLE - build the double-precision real functions
BUILD_COMPLEX - build the single-precision complex functions
BUILD_COMPLEX16 - build the double-precision complex functions
(all four types are included in the build by default when none was specifically selected)
#### Data type options
BUILD_BFLOAT16 - build the "half precision brainfloat" real functions
- `BUILD_SINGLE`: build the single-precision real functions of BLAS and (if
it's built) LAPACK
- `BUILD_DOUBLE`: build the double-precision real functions
- `BUILD_COMPLEX`: build the single-precision complex functions
- `BUILD_COMPLEX16`: build the double-precision complex functions
- `BUILD_BFLOAT16`: build the "half precision brainfloat" real functions
- `EXPRECISION`: (do not use, this is a work in progress) option to use `long
double` functions
By default, the single- and double-precision real and complex floating-point
functions are included in the build, while the half- and extended-precision
functions are not.
USE_THREAD - Use a multithreading backend (default to pthread)
USE_LOCKING - implement locking for thread safety even when USE_THREAD is not set (so that the singlethreaded library can
safely be called from multithreaded programs)
USE_OPENMP - Use OpenMP as multithreading backend
NUM_THREADS - define this to the maximum number of parallel threads you expect to need (defaults to the number of cores in the build cpu)
NUM_PARALLEL - define this to the number of OpenMP instances that your code may use for parallel calls into OpenBLAS (default 1,see below)
```
#### Threading options
- `USE_THREAD`: Use a multithreading backend (defaults to `pthreads`).
- `USE_LOCKING`: implement locking for thread safety even when `USE_THREAD` is
not set (so that the single-threaded library can safely be called from
multithreaded programs).
- `USE_OPENMP`: Use OpenMP as multithreading backend
- `NUM_THREADS`: define this to the maximum number of parallel threads you
expect to need (defaults to the number of cores in the build CPU).
- `NUM_PARALLEL`: define this to the number of OpenMP instances that your code
may use for parallel calls into OpenBLAS (the default is `1`, see below).
OpenBLAS uses a fixed set of memory buffers internally, used for communicating
and compiling partial results from individual threads. For efficiency, the
@@ -118,3 +136,32 @@ same time, then only one of them will be able to make progress while all the
rest of them spin-wait for the one available buffer. Setting `NUM_PARALLEL` to
the upper bound on the number of OpenMP runtimes that you can have in a process
ensures that there are a sufficient number of buffer sets available.
#### Library and symbol name options
- `FIXED_LIBNAME`: if set to `1`, uses a non-versioned name for the library and
no symbolic linking to variant names (default is `0`)
- `LIBNAMEPREFIX`: prefix that, if given, will be inserted in the library name
before `openblas` (e.g., `xxx` will result in `libxxxopenblas.so`)
- `LIBNAMESUFFIX`: suffix that, if given, will be inserted in the library name
after `openblas`, separated by an underscore (e.g., `yyy` will result in
`libopenblas_yyy.so`)
- `SYMBOLPREFIX`: prefix that, if given, will be added to all symbol names
*and* to the library name
- `SYMBOLSUFFIX`: suffix that, if given, will be added to all symbol names
*and* to the library name
#### BLAS and LAPACK options
By default, the Fortran and C interfaces to BLAS and LAPACK are built,
including deprecated functions, while
[ReLAPACK](https://github.com/HPAC/ReLAPACK) is not.
- `NO_CBLAS`: if set to `1`, don't build the CBLAS interface (default is `0`)
- `ONLY_CBLAS`: if set to `1`, only build the CBLAS interface (default is `0`)
- `NO_LAPACK`: if set to `1`, don't build LAPACK (default is `0`)
- `NO_LAPACKE`: if set to `1`, don't build the LAPACKE interface (default is `0`)
- `BUILD_LAPACK_DEPRECATED`: if set to `0`, don't build deprecated LAPACK
functions (default is `1`)
- `BUILD_RELAPACK`: if set to `1`, build Recursive LAPACK on top of LAPACK
(default is `0`)
Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

+8 -8
View File
@@ -5,14 +5,14 @@ This page documents those non-standard APIs.
## BLAS-like extensions
| Routine | Data Types | Description |
| ------------- |:------------- | :---------------|
| ?axpby | s,d,c,z | like axpy with a multiplier for y |
| ?gemm3m | c,z | gemm3m |
| ?imatcopy | s,d,c,z | in-place transpositon/copying |
| ?omatcopy | s,d,c,z | out-of-place transpositon/copying |
| ?geadd | s,d,c,z | matrix add |
| ?gemmt | s,d,c,z | gemm but only a triangular part updated|
| Routine | Data Types | Description |
| ------------- |:------------- | :-----------------------------------------------|
| ?axpby | s,d,c,z | like `axpy` with a multiplier for `y` |
| ?gemm3m | c,z | `gemm3m` |
| ?imatcopy | s,d,c,z | in-place transposition/copying |
| ?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 |
## bfloat16 functionality
+15 -8
View File
@@ -51,9 +51,9 @@ In practice, the values are derived by experimentation to yield the block sizes
### <a name="reportbug"></a>How can I report a bug?
Please file an issue at this [issue page](https://github.com/xianyi/OpenBLAS/issues) or send mail to the [OpenBLAS mailing list](https://groups.google.com/forum/#!forum/openblas-users).
Please file an issue at this [issue page](https://github.com/OpenMathLib/OpenBLAS/issues) or send mail to the [OpenBLAS mailing list](https://groups.google.com/forum/#!forum/openblas-users).
Please provide the following information: CPU, OS, compiler, and OpenBLAS compiling flags (Makefile.rule). In addition, please describe how to reproduce this bug.
Please provide the following information: CPU, OS, compiler, OpenBLAS version and any compiling flags you used (Makefile.rule). In addition, please describe how to reproduce this bug.
### <a name="publication"></a>How to reference OpenBLAS.
@@ -91,7 +91,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">
@@ -99,13 +99,13 @@ Here is the result of the DGEMM subroutine's performance on Intel Core i5-2500K
### <a name="MSVC"></a>How can I call an OpenBLAS function in Microsoft Visual Studio?
Please read [this page](install.md#visual-studio).
Please read [this page](install.md#visual-studio-native-windows-abi).
### <a name="C99_complex_number"></a>How can I use CBLAS and LAPACKE without C99 complex number support (e.g. in Visual Studio)?
Zaheer has fixed this bug. You can now use the structure instead of C99 complex numbers. Please read [this issue page](http://github.com/xianyi/OpenBLAS/issues/95) for details.
[This issue](https://github.com/xianyi/OpenBLAS/issues/305) is for using LAPACKE in Visual Studio.
[This issue](https://github.com/OpenMathLib/OpenBLAS/issues/305) is for using LAPACKE in Visual Studio.
### <a name="Linux_SEGFAULT"></a>I get a SEGFAULT with multi-threading on Linux. What's wrong?
@@ -134,6 +134,13 @@ Background: OpenBLAS implements optimized versions of some LAPACK functions, so
Some of the LAPACK tests, notably in xeigtstz, try to allocate around 10MB on the stack. You may need to use
`ulimit -s` to change the default limits on your system to allow this.
### <a name="lapack_test"></a>My build worked fine and passed the BLAS tests, but running `make lapack-test` ends with a number of errors in the summary report
The LAPACK tests were primarily created to test the validity of the Reference-LAPACK implementation, which is implemented in unoptimized, single-threaded Fortran code. This makes it very sensitive to small numerical deviations that can result from the use of specialized cpu instructions that combine multiplications and additions without intermediate rounding and storing to memory (FMA), or from changing the order of mathematical operations by splitting an original problem workload into smaller tasks that are solved in parallel. As a result, you may encounter a small number of errors in the "numerical" column of
the summary table at the end of the `make lapack-test` run - this is usually nothing to worry about, and the exact number and distribution of errors among the
four data types will often vary with the optimization flags you supplied to the compiler, or the cpu model for which you built OpenBLAS. Sporadic errors in the column labeled `other` are normally the sign of failed convergence of iterative diagonalizations for the same reasons just mentioned. A more detailed error report is stored in the file testing_results.txt - this should be consulted in case of doubt. Care should be taken if you encounter numerical errors in the hundreds, or `other` errors accompanied by the LAPACK error message "on entry to function_name parameter X had an illegal value" that signals a problem with argument passing between individual functions.
(See also [this issue](https://github.com/OpenMathLib/OpenBLAS/issues/4032) in the issue tracker on github for additional discussion, examples and links)
### <a name="no_affinity"></a>How could I disable OpenBLAS threading affinity on runtime?
You can define the OPENBLAS_MAIN_FREE or GOTOBLAS_MAIN_FREE environment variable to disable threading affinity on runtime. For example, before the running,
@@ -213,8 +220,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
@@ -261,7 +268,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

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