Compare commits
363 Commits
small_matr
...
v0.3.12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5f280a7f0 | ||
|
|
6e3a05f2c9 | ||
|
|
89db73569b | ||
|
|
e1c18e4eeb | ||
|
|
26f658c9d2 | ||
|
|
dc35477317 | ||
|
|
365f28787c | ||
|
|
2f2e9ddb65 | ||
|
|
0d140e61ac | ||
|
|
4c45cd6294 | ||
|
|
680f744abf | ||
|
|
6f9460f0f6 | ||
|
|
6c970fa998 | ||
|
|
b23cb05231 | ||
|
|
1d4c96fa0c | ||
|
|
34c3c407ef | ||
|
|
3f84a9ca15 | ||
|
|
7e265c50bf | ||
|
|
ee90f30384 | ||
|
|
2e48d560ba | ||
|
|
ab7f466467 | ||
|
|
f95031204e | ||
|
|
909068facf | ||
|
|
5b7438fdde | ||
|
|
47696b43e9 | ||
|
|
ad745c0bae | ||
|
|
17c46bf06a | ||
|
|
28242096cd | ||
|
|
4a1d00f589 | ||
|
|
00813363be | ||
|
|
336e35469a | ||
|
|
29668458f7 | ||
|
|
ee83e29046 | ||
|
|
1a0f57c8f0 | ||
|
|
b073d759d0 | ||
|
|
eddc65c7b7 | ||
|
|
bb8c3f6861 | ||
|
|
ff65952e46 | ||
|
|
6208c9899e | ||
|
|
8e20ab21c8 | ||
|
|
dc6e44c3f8 | ||
|
|
4ad33c46b0 | ||
|
|
fe2a922ada | ||
|
|
9cac379655 | ||
|
|
a61c086408 | ||
|
|
5b9ebe4f8a | ||
|
|
7eddaf0d6f | ||
|
|
14b1d33933 | ||
|
|
77669b019d | ||
|
|
5e8ddc9001 | ||
|
|
03e781b766 | ||
|
|
f1a4071d8c | ||
|
|
97cf10062f | ||
|
|
17e288e18d | ||
|
|
c1422f3e46 | ||
|
|
d85b24e103 | ||
|
|
7d6c85f9da | ||
|
|
2e7ee7c716 | ||
|
|
efd47b0104 | ||
|
|
f5902ab0a1 | ||
|
|
1a0c185122 | ||
|
|
89eea6b455 | ||
|
|
a5c667b55c | ||
|
|
0ac6102708 | ||
|
|
26a701f4ad | ||
|
|
fcd0fa1a3a | ||
|
|
51c22612eb | ||
|
|
b8f689200e | ||
|
|
fe9015b619 | ||
|
|
f99b8c1502 | ||
|
|
5381a18056 | ||
|
|
e35576c6fc | ||
|
|
f1bb85d378 | ||
|
|
25907e672b | ||
|
|
9789375389 | ||
|
|
f64243ff57 | ||
|
|
786c0a3ce8 | ||
|
|
df70667043 | ||
|
|
e6c5b13a18 | ||
|
|
f071d1207a | ||
|
|
dc6cefd2f5 | ||
|
|
c339c40c01 | ||
|
|
ac8af9cec6 | ||
|
|
10379fc83b | ||
|
|
a85ac71633 | ||
|
|
4c25910da0 | ||
|
|
9b9ee92d5f | ||
|
|
ae6ac83991 | ||
|
|
4fac91ef37 | ||
|
|
bfdf4b56da | ||
|
|
ebf0470fc2 | ||
|
|
ca160bb440 | ||
|
|
c9c3ae07af | ||
|
|
a897bc3bd2 | ||
|
|
756802df61 | ||
|
|
01492decf4 | ||
|
|
bd0752444a | ||
|
|
c1f4f5d4e7 | ||
|
|
75e3a92df6 | ||
|
|
2a329baa81 | ||
|
|
0826d68f93 | ||
|
|
4bb73c0171 | ||
|
|
bc5c7f9578 | ||
|
|
437b7fe261 | ||
|
|
a0ada4bcb8 | ||
|
|
602a0c7a69 | ||
|
|
b5d30b390d | ||
|
|
137ae618db | ||
|
|
9e3cff5cf2 | ||
|
|
d85b968424 | ||
|
|
5f60a32cac | ||
|
|
fecedc9c69 | ||
|
|
0eacbca85f | ||
|
|
6999086a2b | ||
|
|
9dca578c79 | ||
|
|
1e7eb7b7a9 | ||
|
|
84949754a0 | ||
|
|
2ae8785603 | ||
|
|
e05af6575e | ||
|
|
c1643006ae | ||
|
|
8d2df7d066 | ||
|
|
08929430cd | ||
|
|
0c84ffe05f | ||
|
|
cb4274e3ad | ||
|
|
403eb513a0 | ||
|
|
cb839575ed | ||
|
|
0ed1f07660 | ||
|
|
bb74dd29db | ||
|
|
629c497b6c | ||
|
|
2c552f1074 | ||
|
|
7ae9e8960e | ||
|
|
e3a29f6b58 | ||
|
|
006c7f6671 | ||
|
|
85154c2e18 | ||
|
|
ae1ab5bfdf | ||
|
|
052f31bc3c | ||
|
|
3aecafad80 | ||
|
|
756062afa5 | ||
|
|
2061f7fdff | ||
|
|
dc8a1afa63 | ||
|
|
32733ded04 | ||
|
|
3bc8e8c334 | ||
|
|
573508f0ee | ||
|
|
ca31c32693 | ||
|
|
5800758b43 | ||
|
|
924fd806d0 | ||
|
|
4db09c6cec | ||
|
|
fd94236042 | ||
|
|
68ce719fac | ||
|
|
d7dd9b396c | ||
|
|
9ae80490e0 | ||
|
|
d314d1f49f | ||
|
|
f0883740e4 | ||
|
|
1c0b03efb4 | ||
|
|
c589c3e2a1 | ||
|
|
ec638a82bf | ||
|
|
caa0d757ca | ||
|
|
6154f72d6d | ||
|
|
ae8b0d257a | ||
|
|
1da32cc1fc | ||
|
|
8c5e08076e | ||
|
|
5f23bdf437 | ||
|
|
b593e6b650 | ||
|
|
082c86a538 | ||
|
|
e396ec8b56 | ||
|
|
68e6823d36 | ||
|
|
887e00fd7f | ||
|
|
886a8e3190 | ||
|
|
0f7d73ff6d | ||
|
|
6b6adf8a4a | ||
|
|
a6570108c5 | ||
|
|
ef552bc578 | ||
|
|
efe1ad4700 | ||
|
|
b27ca78a21 | ||
|
|
93454022a9 | ||
|
|
20cf1d773f | ||
|
|
5c657fffad | ||
|
|
b262058059 | ||
|
|
bc319cee82 | ||
|
|
e5966f8606 | ||
|
|
9df12eb08f | ||
|
|
cf53970bcb | ||
|
|
dcd51d5c72 | ||
|
|
b8f95354c7 | ||
|
|
d33de97d60 | ||
|
|
6a83c591d6 | ||
|
|
f6d2827d0c | ||
|
|
08f4749eb4 | ||
|
|
63d7dad04c | ||
|
|
ac653c94f3 | ||
|
|
190b74dd24 | ||
|
|
9d43140d61 | ||
|
|
8ef600f1a3 | ||
|
|
88928650c4 | ||
|
|
7a53128481 | ||
|
|
0c773b8205 | ||
|
|
fbda20c856 | ||
|
|
82a497ec5d | ||
|
|
de27e4f5fb | ||
|
|
e1b7123bbe | ||
|
|
f32d34a015 | ||
|
|
599777ecb7 | ||
|
|
7812486091 | ||
|
|
a5b164946c | ||
|
|
a5feea6611 | ||
|
|
dc8e4e1959 | ||
|
|
cccd1438da | ||
|
|
f032d8966e | ||
|
|
f6e4cf2f9d | ||
|
|
9828343e12 | ||
|
|
d2333e7842 | ||
|
|
3094fc6c83 | ||
|
|
3c05f54df8 | ||
|
|
dee7c49938 | ||
|
|
d3c0d6811b | ||
|
|
9637cd1fd1 | ||
|
|
2367726578 | ||
|
|
5464eb13ea | ||
|
|
e1574cbc83 | ||
|
|
0b2bb5696a | ||
|
|
a7d5d0078d | ||
|
|
be40440ec5 | ||
|
|
2bf70c8e3b | ||
|
|
60e6c68e38 | ||
|
|
64629cb5c7 | ||
|
|
1b1a757f5f | ||
|
|
0d98ce202c | ||
|
|
2df4235e00 | ||
|
|
fe8cd5ae7e | ||
|
|
ba31c8f5f9 | ||
|
|
e961d4d609 | ||
|
|
7ed25e9e10 | ||
|
|
7b169379e0 | ||
|
|
7f539fb850 | ||
|
|
caf7a12295 | ||
|
|
72b5b73647 | ||
|
|
881c15179f | ||
|
|
896bbd55e1 | ||
|
|
c5a32288c6 | ||
|
|
dfaafd3b55 | ||
|
|
f2e9a24e1a | ||
|
|
98153875e9 | ||
|
|
0eaae30e8c | ||
|
|
dfbc62ef7e | ||
|
|
b475b4bd0d | ||
|
|
357bff06b5 | ||
|
|
988a6f429e | ||
|
|
e5e2fbd593 | ||
|
|
3287848c8f | ||
|
|
26611af8e1 | ||
|
|
b886bd672b | ||
|
|
61fae59298 | ||
|
|
33d22f99f1 | ||
|
|
5ba01dd1a8 | ||
|
|
14f7dad3b7 | ||
|
|
06cf73a239 | ||
|
|
325b539c26 | ||
|
|
0f112077e6 | ||
|
|
22aa81f3e5 | ||
|
|
77ea73f5e5 | ||
|
|
f91057cbad | ||
|
|
992d7ca63d | ||
|
|
7e4d5c237c | ||
|
|
8d12027a79 | ||
|
|
b1e0bcceec | ||
|
|
be43d2cb96 | ||
|
|
2855e6000c | ||
|
|
144a03446d | ||
|
|
75d440caa0 | ||
|
|
6abca76c4e | ||
|
|
84c00c3c6e | ||
|
|
8c5c991bd7 | ||
|
|
2e3b15d68b | ||
|
|
eaf7f825bd | ||
|
|
4c10a1673d | ||
|
|
c4aeeeb9f4 | ||
|
|
3843bd188c | ||
|
|
ddec244a5a | ||
|
|
dfeca46098 | ||
|
|
f8950f40a2 | ||
|
|
274d6e015b | ||
|
|
91c84e1c01 | ||
|
|
1ee1e7b495 | ||
|
|
ba644378dc | ||
|
|
9e11c2d62f | ||
|
|
4d250d0cdf | ||
|
|
de139337b8 | ||
|
|
ec2948f147 | ||
|
|
ce89398636 | ||
|
|
593ce9e237 | ||
|
|
74e358bcd5 | ||
|
|
26792d2096 | ||
|
|
6b52c7e172 | ||
|
|
746ad3bd19 | ||
|
|
55d4d470ec | ||
|
|
a270894730 | ||
|
|
047b8d7aff | ||
|
|
f7731a358a | ||
|
|
a55fe06f25 | ||
|
|
4f34bcfb5e | ||
|
|
0629d8ebdb | ||
|
|
15da2f9acb | ||
|
|
7d9c77f421 | ||
|
|
c8f029a518 | ||
|
|
e72430fe46 | ||
|
|
6e0f6c5f00 | ||
|
|
6f8fad87c5 | ||
|
|
ed0f2d3dd7 | ||
|
|
43a31b7786 | ||
|
|
8a2a137a9e | ||
|
|
0d1f30a297 | ||
|
|
70a254d507 | ||
|
|
330044d821 | ||
|
|
97636b2c8a | ||
|
|
4d36711547 | ||
|
|
718f67421a | ||
|
|
3426519ae2 | ||
|
|
1c6c71fa85 | ||
|
|
860247b5da | ||
|
|
c61771e335 | ||
|
|
deaeb6c5b8 | ||
|
|
c7ef7174e4 | ||
|
|
775a87242d | ||
|
|
af5bc95503 | ||
|
|
ea3a58c844 | ||
|
|
17dca035de | ||
|
|
1b0f17eeed | ||
|
|
c31b72965e | ||
|
|
0ce2aa3163 | ||
|
|
80794fe8fd | ||
|
|
4a4d1ca6e0 | ||
|
|
b37d17382a | ||
|
|
029fd01cfb | ||
|
|
9d1ea75aa0 | ||
|
|
776d005f4c | ||
|
|
2ee5b899ce | ||
|
|
095f4e6964 | ||
|
|
87e5bbd887 | ||
|
|
b9b3265ec8 | ||
|
|
a1616a0b86 | ||
|
|
60ef193258 | ||
|
|
18bfb6d6f7 | ||
|
|
e4900caa11 | ||
|
|
68b1713c30 | ||
|
|
4074770d00 | ||
|
|
b87a77da02 | ||
|
|
f42e84d46c | ||
|
|
0a4c5c4c44 | ||
|
|
3210a42734 | ||
|
|
5feb087c05 | ||
|
|
448152cdd8 | ||
|
|
cb3c190a3a | ||
|
|
59e01b1aec | ||
|
|
317ff27cda | ||
|
|
de63675717 | ||
|
|
d64cc2be81 | ||
|
|
c9b67141f0 | ||
|
|
6797a3a1e0 | ||
|
|
936966a42c | ||
|
|
597010a968 | ||
|
|
d64f1ef26b | ||
|
|
c62aad62e5 | ||
|
|
63b03efc2a |
55
.travis.yml
55
.travis.yml
@@ -43,6 +43,18 @@ matrix:
|
||||
- TARGET_BOX=IBMZ_LINUX
|
||||
- BTYPE="BINARY=64 USE_OPENMP=1"
|
||||
|
||||
- <<: *test-ubuntu
|
||||
os: linux
|
||||
dist: focal
|
||||
arch: s390x
|
||||
compiler: clang
|
||||
before_script:
|
||||
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=Z13 NUM_THREADS=32"
|
||||
env:
|
||||
# for matrix annotation only
|
||||
- TARGET_BOX=IBMZ_LINUX
|
||||
- BTYPE="BINARY=64 USE_OPENMP=0 CC=clang"
|
||||
|
||||
- <<: *test-ubuntu
|
||||
env:
|
||||
- TARGET_BOX=LINUX64
|
||||
@@ -92,6 +104,23 @@ matrix:
|
||||
# for matrix annotation only
|
||||
- TARGET_BOX=PPC64LE_LINUX_P9
|
||||
|
||||
- os: linux
|
||||
arch: ppc64le
|
||||
dist: bionic
|
||||
compiler: gcc
|
||||
before_script:
|
||||
- sudo add-apt-repository 'ppa:ubuntu-toolchain-r/test' -y
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install gcc-9 gfortran-9 -y
|
||||
script:
|
||||
- make QUIET_MAKE=1 BUILD_BFLOAT16=1 BINARY=64 USE_OPENMP=1 CC=gcc-9 FC=gfortran-9
|
||||
- make -C test $COMMON_FLAGS $BTYPE
|
||||
- make -C ctest $COMMON_FLAGS $BTYPE
|
||||
- make -C utest $COMMON_FLAGS $BTYPE
|
||||
env:
|
||||
# for matrix annotation only
|
||||
- TARGET_BOX=PPC64LE_LINUX_P9
|
||||
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
@@ -192,6 +221,17 @@ matrix:
|
||||
env:
|
||||
- BTYPE="TARGET=NEHALEM BINARY=64 INTERFACE64=1 FC=gfortran-8"
|
||||
|
||||
- <<: *test-macos
|
||||
osx_image: xcode12
|
||||
before_script:
|
||||
- COMMON_FLAGS="DYNAMIC_ARCH=1 NUM_THREADS=32"
|
||||
- brew update
|
||||
- brew install gcc@10 # for gfortran
|
||||
script:
|
||||
- travis_wait 45 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
|
||||
env:
|
||||
- BTYPE="TARGET=NEHALEM BINARY=64 INTERFACE64=1 FC=gfortran-10"
|
||||
|
||||
- <<: *test-macos
|
||||
osx_image: xcode10.0
|
||||
env:
|
||||
@@ -210,6 +250,21 @@ matrix:
|
||||
- CC="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
|
||||
- CFLAGS="-O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode-10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -arch armv7 -miphoneos-version-min=5.1"
|
||||
- BTYPE="TARGET=ARMV7 HOSTCC=clang NOFORTRAN=1"
|
||||
|
||||
- &test-graviton2
|
||||
os: linux
|
||||
arch: arm64-graviton2
|
||||
dist: focal
|
||||
group: edge
|
||||
virt: lxd
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gfortran
|
||||
script:
|
||||
- travis_wait 45 make && make lapack-test
|
||||
|
||||
# whitelist
|
||||
branches:
|
||||
only:
|
||||
|
||||
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.8.5)
|
||||
project(OpenBLAS C ASM)
|
||||
set(OpenBLAS_MAJOR_VERSION 0)
|
||||
set(OpenBLAS_MINOR_VERSION 3)
|
||||
set(OpenBLAS_PATCH_VERSION 10.dev)
|
||||
set(OpenBLAS_PATCH_VERSION 12)
|
||||
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
|
||||
|
||||
# Adhere to GNU filesystem layout conventions
|
||||
@@ -29,6 +29,8 @@ option(NO_AFFINITY "Disable support for CPU affinity masks to avoid binding proc
|
||||
else()
|
||||
set(NO_AFFINITY 1)
|
||||
endif()
|
||||
option(CPP_THREAD_SAFETY_TEST "Run a massively parallel DGEMM test to confirm thread safety of the library (requires OpenMP and about 1.3GB of RAM)" OFF)
|
||||
option(CPP_THREAD_SAFETY_GEMV "Run a massively parallel DGEMV test to confirm thread safety of the library (requires OpenMP)" OFF)
|
||||
|
||||
# Add a prefix or suffix to all exported symbol names in the shared library.
|
||||
# Avoids conflicts with other BLAS libraries, especially when using
|
||||
@@ -87,13 +89,13 @@ if (NOT NO_LAPACK)
|
||||
list(APPEND SUBDIRS lapack)
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED BUILD_HALF)
|
||||
set (BUILD_HALF false)
|
||||
if (NOT DEFINED BUILD_BFLOAT16)
|
||||
set (BUILD_BFLOAT16 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
|
||||
# set(BUILD_HALF true)
|
||||
# set(BUILD_BFLOAT16 true)
|
||||
set(BUILD_SINGLE true)
|
||||
set(BUILD_DOUBLE true)
|
||||
set(BUILD_COMPLEX true)
|
||||
@@ -125,9 +127,9 @@ if (BUILD_COMPLEX16)
|
||||
list(APPEND FLOAT_TYPES "ZCOMPLEX") # defines COMPLEX and DOUBLE
|
||||
endif ()
|
||||
|
||||
if (BUILD_HALF)
|
||||
if (BUILD_BFLOAT16)
|
||||
message(STATUS "Building Half Precision")
|
||||
list(APPEND FLOAT_TYPES "HALF") # defines nothing
|
||||
list(APPEND FLOAT_TYPES "BFLOAT16") # defines nothing
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED CORE OR "${CORE}" STREQUAL "UNKNOWN")
|
||||
@@ -234,6 +236,9 @@ if (NOT MSVC AND NOT NOFORTRAN)
|
||||
add_subdirectory(ctest)
|
||||
endif()
|
||||
add_subdirectory(lapack-netlib/TESTING)
|
||||
if (CPP_THREAD_SAFETY_TEST OR CPP_THREAD_SAFETY_GEMV)
|
||||
add_subdirectory(cpp_thread_test)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES
|
||||
|
||||
@@ -187,6 +187,7 @@ In chronological order:
|
||||
* Marius Hillenbrand <https://github.com/mhillenibm>
|
||||
* [2020-05-12] Revise dynamic architecture detection for IBM z
|
||||
* [2020-05-12] Add new sgemm and strmm kernel for IBM z14
|
||||
* [2020-09-07] Fix builds with clang on IBM z, including dynamic architecture support
|
||||
|
||||
* Danfeng Zhang <https://github.com/craft-zhang>
|
||||
* [2020-05-20] Improve performance of SGEMM and STRMM on Arm Cortex-A53
|
||||
@@ -1,4 +1,102 @@
|
||||
OpenBLAS ChangeLog
|
||||
====================================================================
|
||||
Version 0.3.12
|
||||
24-Oct-2020
|
||||
|
||||
common:
|
||||
* Fixed missing BLAS/LAPACK functions (inadvertently dropped during
|
||||
the build system restructuring)
|
||||
* Fixed argument conversion macro in LAPACKE_zgesvdq (LAPACK #458)
|
||||
|
||||
POWER:
|
||||
* Added optimized SCOPY/CCOPY kernels for POWER10
|
||||
* Increased and unified the default size of the GEMM BUFFER
|
||||
* Fixed building for POWER10 in DYNAMIC_ARCH mode
|
||||
* POWER10 compatibility test now checks binutils version as well
|
||||
* Cleaned up compiler warnings
|
||||
|
||||
x86_64:
|
||||
* corrected compiler version checks for AVX2 compatibility
|
||||
* added compiler option -mavx2 for building with flang
|
||||
* fixed direct SGEMM pathway for small matrix sizes (broken by
|
||||
the code refactoring in 0.3.11)
|
||||
* fixed unhandled partial register clobbers in several kernels
|
||||
for AXPY,DOT,GEMV_N and GEMV_T flagged by gcc10 tree-vectorizer
|
||||
|
||||
ARMV8:
|
||||
* improved Apple Vortex support to include cross-compiling
|
||||
|
||||
====================================================================
|
||||
Version 0.3.11
|
||||
17-Oct-2020
|
||||
|
||||
common:
|
||||
* API change:
|
||||
the newly added BFLOAT16 functions were renamed to use the
|
||||
letter "B" instead of "H" to avoid potential confusion with
|
||||
the IEEE "half precision float" type, i.e. the 0.3.10
|
||||
SHGEMM is now SBGEMM and the corresponding build option
|
||||
was changed from "BUILD_HALF" to "BUILD_BFLOAT16".
|
||||
* Reduced the default BLAS3_MEM_ALLOC_THRESHOLD (used as an upper
|
||||
limit for placing temporary arrays on the stack) to be compatible
|
||||
with a stack size of 1mb (as imposed by the JAVA runtime library)
|
||||
* Added mixed-precision dot function SBDOT and utility functions
|
||||
shstobf16, shdtobf16, sbf16tos and dbf16tod to convert between
|
||||
single or double precision float arrays and bfloat16 arrays
|
||||
* Fixed prototypes of LAPACK_?ggsvp and LAPACK_?ggsvd functions
|
||||
in lapack.h
|
||||
* Fixed underflow and rounding errors in LAPACK SLANV2 and DLANV2
|
||||
(causing miscalculations in e.g. SHSEQR/DHSEQR, LAPACK issue #263)
|
||||
* Fixed workspace calculation in LAPACK ?GELQ (LAPACK issue #415)
|
||||
* Fixed several bugs in the LAPACK testsuite
|
||||
* Improved performance of TRMM and TRSM for certain problem sizes
|
||||
* Fixed infinite recursions and workspace miscalculations in ReLAPACK
|
||||
* CMAKE builds no longer require pkg-config for creating the .pc file
|
||||
* Makefile builds no longer misread NO_CBLAS=0 or NO_LAPACK=0 as
|
||||
enabling these options
|
||||
* Fixed detection of gfortran when invoked through an mpi wrapper
|
||||
* Improve thread reinitialization performance with OpenMP after a fork
|
||||
* Added support for building only the subset of the library required
|
||||
for a particular precision by specifying BUILD_SINGLE, BUILD_DOUBLE
|
||||
* Optional function name prefixes and suffixes are now correctly
|
||||
reflected in the generated cblas.h
|
||||
* Added CMAKE build support for the LAPACK and multithreading tests
|
||||
|
||||
POWER:
|
||||
* Added optimized support for POWER10
|
||||
* Added support for compiling for POWER8 in 32bit mode
|
||||
* Added support for compilation with LLVM/clang
|
||||
* Added support for compilation with NVIDIA/PGI compilers
|
||||
* Fixed building on big-endian POWER8
|
||||
* Fixed miscompilation of ZDOTC by gcc10
|
||||
* Fixed alignment errors in the POWER8 SAXPY kernel
|
||||
* Improved CPU detection on AIX
|
||||
* Supported building with older compilers on POWER9
|
||||
|
||||
x86_64:
|
||||
* Added support for Intel Cooperlake
|
||||
* Added autodetection of AMD Renoir/Matisse/Zen3 cpus
|
||||
* Added autodetection of Intel Comet Lake cpus
|
||||
* Reimplemented ?sum, ?dot and daxpy using universal intrinsics
|
||||
* Reset the fpu state before using the fpu on Windows as a workaround
|
||||
for a problem introduced in Windows 10 build 19041 (a.k.a. SDK 2004)
|
||||
* Fixed potentially undefined behaviour in the dot and gemv_t kernels
|
||||
* Fixed a potential segmentation fault in DYNAMIC_ARCH builds
|
||||
* Fixed building for ZEN with PGI/NVIDIA and AMD AOCC compilers
|
||||
|
||||
ARMV7:
|
||||
* Fixed cpu detection on BSD-like systems
|
||||
|
||||
ARMV8:
|
||||
* Added preliminary support for Apple Vortex cpus
|
||||
* Added support for the Cavium ThunderX3T110 cpu
|
||||
* Fixed cpu detection on BSD-like systems
|
||||
* Fixed compilation in -std=C18 mode
|
||||
|
||||
IBM Z:
|
||||
* Added support for compiling with the clang compiler
|
||||
* Improved GEMM performance on Z14
|
||||
|
||||
====================================================================
|
||||
Version 0.3.10
|
||||
14-Jun-2020
|
||||
|
||||
12
Makefile
12
Makefile
@@ -301,6 +301,18 @@ else
|
||||
endif
|
||||
ifeq ($(BUILD_LAPACK_DEPRECATED), 1)
|
||||
-@echo "BUILD_DEPRECATED = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
endif
|
||||
ifeq ($(BUILD_SINGLE), 1)
|
||||
-@echo "BUILD_SINGLE = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE), 1)
|
||||
-@echo "BUILD_DOUBLE = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX), 1)
|
||||
-@echo "BUILD_COMPLEX = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16), 1)
|
||||
-@echo "BUILD_COMPLEX16 = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
endif
|
||||
-@echo "LAPACKE_WITH_TMG = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
-@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
|
||||
@@ -66,6 +66,11 @@ FCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), VORTEX)
|
||||
CCOMMON_OPT += -march=armv8.3-a
|
||||
FCOMMON_OPT += -march=armv8.3-a
|
||||
endif
|
||||
|
||||
ifeq ($(GCCVERSIONGTEQ9), 1)
|
||||
ifeq ($(CORE), TSV110)
|
||||
CCOMMON_OPT += -march=armv8.2-a -mtune=tsv110
|
||||
|
||||
@@ -10,13 +10,14 @@ USE_OPENMP = 1
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), POWER10)
|
||||
COMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
FCOMMON_OPT += -O2 -frecursive -mcpu=power10 -mtune=power10 -fno-fast-math
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), POWER9)
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
CCOMMON_OPT += -Ofast -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)
|
||||
CCOMMON_OPT += -mcpu=power8 -mtune=power8
|
||||
@@ -24,10 +25,14 @@ else
|
||||
CCOMMON_OPT += -mcpu=power9 -mtune=power9
|
||||
endif
|
||||
else
|
||||
CCOMMON_OPT += -mcpu=power9 -mtune=power9
|
||||
endif
|
||||
else
|
||||
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
|
||||
endif
|
||||
ifneq ($(F_COMPILER), PGI)
|
||||
FCOMMON_OPT += -O2 -frecursive -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)
|
||||
FCOMMON_OPT += -mcpu=power8 -mtune=power8
|
||||
@@ -35,6 +40,9 @@ else
|
||||
FCOMMON_OPT += -mcpu=power9 -mtune=power9
|
||||
endif
|
||||
else
|
||||
FCOMMON_OPT += -mcpu=power9 -mtune=power9
|
||||
endif
|
||||
else
|
||||
FCOMMON_OPT += -O2 -Mrecursive
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# This library's version
|
||||
VERSION = 0.3.10.dev
|
||||
VERSION = 0.3.12
|
||||
|
||||
# If you set the suffix, the library name will be libopenblas_$(LIBNAMESUFFIX).a
|
||||
# and libopenblas_$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library
|
||||
@@ -272,10 +272,36 @@ COMMON_PROF = -pg
|
||||
# work at all.
|
||||
#
|
||||
# CPP_THREAD_SAFETY_TEST = 1
|
||||
#
|
||||
# use this to run only the less memory-hungry GEMV test
|
||||
# CPP_THREAD_SAFETY_GEMV = 1
|
||||
|
||||
|
||||
# If you want to enable the experimental BFLOAT16 support
|
||||
# BUILD_HALF = 1
|
||||
# BUILD_BFLOAT16 = 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
|
||||
# NUM_THREADS*NUM_THREADS*128 bytes of memory so should not pose a problem at low cpu
|
||||
# counts, but obviously it is not the only item that ends up on the stack.
|
||||
# The default value of 32 ensures that the overall requirement is compatible
|
||||
# with the default 1MB stacksize imposed by having the Java VM loaded without use
|
||||
# of its -Xss parameter.
|
||||
# The value of 160 formerly used from about version 0.2.7 until 0.3.10 is easily compatible
|
||||
# with the common Linux stacksize of 8MB but will cause crashes with unwary use of the java
|
||||
# VM e.g. in Octave or with the java-based libhdfs in numpy or scipy code
|
||||
# BLAS3_MEM_ALLOC_THRESHOLD = 160
|
||||
|
||||
|
||||
|
||||
# By default the library contains BLAS functions (and LAPACK if selected) for all input types.
|
||||
# To build a smaller library supporting e.g. only single precision real (SGEMM etc.) or only
|
||||
# the functions for complex numbers, uncomment the desired type(s) below
|
||||
# BUILD_SINGLE = 1
|
||||
# BUILD_DOUBLE = 1
|
||||
# BUILD_COMPLEX = 1
|
||||
# BUILD_COMPLEX16 = 1
|
||||
#
|
||||
# End of user configuration
|
||||
#
|
||||
|
||||
@@ -9,7 +9,7 @@ ifndef TOPDIR
|
||||
TOPDIR = .
|
||||
endif
|
||||
|
||||
# If ARCH is not set, we use the host system's architecture for getarch compile options.
|
||||
# If ARCH is not set, we use the host system's architecture for getarch compile options.
|
||||
ifndef ARCH
|
||||
HOSTARCH := $(shell uname -m)
|
||||
else
|
||||
@@ -73,6 +73,18 @@ endif
|
||||
#
|
||||
# Beginning of system configuration
|
||||
#
|
||||
ifneq ($(BUILD_SINGLE),1)
|
||||
ifneq ($(BUILD_DOUBLE),1)
|
||||
ifneq ($(BUILD_COMPLEX),1)
|
||||
ifneq ($(BUILD_COMPLEX16),1)
|
||||
override BUILD_SINGLE=1
|
||||
override BUILD_DOUBLE=1
|
||||
override BUILD_COMPLEX=1
|
||||
override BUILD_COMPLEX16=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef HOSTCC
|
||||
HOSTCC = $(CC)
|
||||
@@ -295,7 +307,6 @@ endif
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
|
||||
GCCVERSIONGT4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 4)
|
||||
GCCVERSIONEQ5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` = 5)
|
||||
GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
|
||||
GCCVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
|
||||
GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
||||
@@ -594,40 +605,43 @@ endif
|
||||
ifeq ($(ARCH), zarch)
|
||||
DYNAMIC_CORE = ZARCH_GENERIC
|
||||
|
||||
# Z13 is supported since gcc-5.2, gcc-6, and in RHEL 7.3 and newer
|
||||
ifeq ($(GCCVERSIONGT5), 1)
|
||||
ZARCH_SUPPORT_Z13 := 1
|
||||
else ifeq ($(GCCVERSIONEQ5), 1)
|
||||
ifeq ($(GCCMINORVERSIONGTEQ2), 1)
|
||||
ZARCH_SUPPORT_Z13 := 1
|
||||
endif
|
||||
endif
|
||||
# if the compiler accepts -march=arch11 or -march=z13 and can compile a file
|
||||
# with z13-specific inline assembly, then we can include support for Z13.
|
||||
# note: -march=z13 is equivalent to -march=arch11 yet some compiler releases
|
||||
# only support one or the other.
|
||||
# note: LLVM version 6.x supported -march=z13 yet could not handle vector
|
||||
# registers in inline assembly, so the check for supporting the -march flag is
|
||||
# not enough.
|
||||
ZARCH_TEST_COMPILE=-c $(TOPDIR)/kernel/zarch/damin_z13.c -I$(TOPDIR) -o /dev/null > /dev/null 2> /dev/null
|
||||
ZARCH_CC_SUPPORTS_ARCH11=$(shell $(CC) -march=arch11 $(ZARCH_TEST_COMPILE) && echo 1)
|
||||
ZARCH_CC_SUPPORTS_Z13=$(shell $(CC) -march=z13 $(ZARCH_TEST_COMPILE) && echo 1)
|
||||
|
||||
ifeq ($(wildcard /etc/redhat-release), /etc/redhat-release)
|
||||
ifeq ($(shell source /etc/os-release ; expr $$VERSION_ID \>= "7.3"), 1)
|
||||
ZARCH_SUPPORT_Z13 := 1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(ZARCH_SUPPORT_Z13), 1)
|
||||
ifeq ($(or $(ZARCH_CC_SUPPORTS_ARCH11), $(ZARCH_CC_SUPPORTS_Z13)), 1)
|
||||
DYNAMIC_CORE += Z13
|
||||
CCOMMON_OPT += -DDYN_Z13
|
||||
else
|
||||
$(info OpenBLAS: Not building Z13 kernels because gcc is older than 5.2 or 6.x)
|
||||
$(info OpenBLAS: Not building Z13 kernels because the compiler $(CC) does not support it)
|
||||
endif
|
||||
|
||||
ifeq ($(GCCVERSIONGTEQ7), 1)
|
||||
# as above for z13, check for -march=arch12 and z14 support in the compiler.
|
||||
ZARCH_CC_SUPPORTS_ARCH12=$(shell $(CC) -march=arch12 $(ZARCH_TEST_COMPILE) && echo 1)
|
||||
ZARCH_CC_SUPPORTS_Z14=$(shell $(CC) -march=z14 $(ZARCH_TEST_COMPILE) && echo 1)
|
||||
ifeq ($(or $(ZARCH_CC_SUPPORTS_ARCH12), $(ZARCH_CC_SUPPORTS_Z14)), 1)
|
||||
DYNAMIC_CORE += Z14
|
||||
CCOMMON_OPT += -DDYN_Z14
|
||||
else
|
||||
$(info OpenBLAS: Not building Z14 kernels because gcc is older than 7.x)
|
||||
endif
|
||||
$(info OpenBLAS: Not building Z14 kernels because the compiler $(CC) does not support it)
|
||||
endif
|
||||
|
||||
endif # ARCH zarch
|
||||
|
||||
ifeq ($(ARCH), power)
|
||||
DYNAMIC_CORE = POWER6
|
||||
DYNAMIC_CORE += POWER8
|
||||
ifneq ($(C_COMPILER), GCC)
|
||||
DYNAMIC_CORE += POWER9
|
||||
DYNAMIC_CORE += POWER10
|
||||
CCOMMON_OPT += -DHAVE_P10_SUPPORT
|
||||
endif
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
ifeq ($(GCCVERSIONGT5), 1)
|
||||
@@ -635,11 +649,14 @@ DYNAMIC_CORE += POWER9
|
||||
else
|
||||
$(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.)
|
||||
endif
|
||||
ifeq ($(GCCVERSIONGTEQ11), 1)
|
||||
LDVERSIONGTEQ35 := $(shell expr `ld --version | head -1 | cut -f2 -d "." | cut -f1 -d "-"` >= 35)
|
||||
ifeq ($(GCCVERSIONGTEQ11)$(LDVERSIONGTEQ35), 11)
|
||||
DYNAMIC_CORE += POWER10
|
||||
CCOMMON_OPT += -DHAVE_P10_SUPPORT
|
||||
else ifeq ($(GCCVERSIONGTEQ10), 1)
|
||||
ifeq ($(GCCMINORVERSIONGTEQ2), 1)
|
||||
ifeq ($(GCCMINORVERSIONGTEQ2)$(LDVERSIONGTEQ35), 11)
|
||||
DYNAMIC_CORE += POWER10
|
||||
CCOMMON_OPT += -DHAVE_P10_SUPPORT
|
||||
endif
|
||||
else
|
||||
$(info, OpenBLAS: Your gcc version is too old to build the POWER10 kernels.)
|
||||
@@ -1219,8 +1236,20 @@ ifeq ($(USE_TLS), 1)
|
||||
CCOMMON_OPT += -DUSE_TLS
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HALF), 1)
|
||||
CCOMMON_OPT += -DBUILD_HALF
|
||||
ifeq ($(BUILD_BFLOAT16), 1)
|
||||
CCOMMON_OPT += -DBUILD_BFLOAT16
|
||||
endif
|
||||
ifeq ($(BUILD_SINGLE), 1)
|
||||
CCOMMON_OPT += -DBUILD_SINGLE=1
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE), 1)
|
||||
CCOMMON_OPT += -DBUILD_DOUBLE=1
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX), 1)
|
||||
CCOMMON_OPT += -DBUILD_COMPLEX=1
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16), 1)
|
||||
CCOMMON_OPT += -DBUILD_COMPLEX16=1
|
||||
endif
|
||||
|
||||
CCOMMON_OPT += -DVERSION=\"$(VERSION)\"
|
||||
@@ -1496,10 +1525,10 @@ export KERNELDIR
|
||||
export FUNCTION_PROFILE
|
||||
export TARGET_CORE
|
||||
export NO_AVX512
|
||||
export BUILD_HALF
|
||||
export BUILD_BFLOAT16
|
||||
|
||||
export SHGEMM_UNROLL_M
|
||||
export SHGEMM_UNROLL_N
|
||||
export SBGEMM_UNROLL_M
|
||||
export SBGEMM_UNROLL_N
|
||||
export SGEMM_UNROLL_M
|
||||
export SGEMM_UNROLL_N
|
||||
export DGEMM_UNROLL_M
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
SHBLASOBJS_P = $(SHBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
SBBLASOBJS_P = $(SBBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
SBLASOBJS_P = $(SBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
DBLASOBJS_P = $(DBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
QBLASOBJS_P = $(QBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
CBLASOBJS_P = $(CBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
ZBLASOBJS_P = $(ZBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
XBLASOBJS_P = $(XBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
SBEXTOBJS_P = $(SBEXTOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
|
||||
COMMONOBJS_P = $(COMMONOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
|
||||
HPLOBJS_P = $(HPLOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
|
||||
BLASOBJS = $(SHBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS)
|
||||
BLASOBJS_P = $(SHBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P)
|
||||
BLASOBJS = $(SBEXTOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(CBAUXOBJS)
|
||||
BLASOBJS_P = $(SBEXTOBJS_P) $(SBBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) $(CBAUXOBJS_P)
|
||||
|
||||
ifdef EXPRECISION
|
||||
BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
|
||||
@@ -23,21 +24,23 @@ BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
|
||||
BLASOBJS_P += $(QBLASOBJS_P) $(XBLASOBJS_P)
|
||||
endif
|
||||
|
||||
$(SHBLASOBJS) $(SHBLASOBJS_P) : override CFLAGS += -DHALF -UDOUBLE -UCOMPLEX
|
||||
$(SBBLASOBJS) $(SBBLASOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
|
||||
$(SBLASOBJS) $(SBLASOBJS_P) : override CFLAGS += -UDOUBLE -UCOMPLEX
|
||||
$(DBLASOBJS) $(DBLASOBJS_P) : override CFLAGS += -DDOUBLE -UCOMPLEX
|
||||
$(QBLASOBJS) $(QBLASOBJS_P) : override CFLAGS += -DXDOUBLE -UCOMPLEX
|
||||
$(CBLASOBJS) $(CBLASOBJS_P) : override CFLAGS += -UDOUBLE -DCOMPLEX
|
||||
$(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)
|
||||
$(SBBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(SBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(DBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(QBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(CBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(ZBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(XBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(SBEXTOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
|
||||
libs :: $(BLASOBJS) $(COMMONOBJS)
|
||||
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^
|
||||
|
||||
16
Makefile.x86
16
Makefile.x86
@@ -54,3 +54,19 @@ LIBATLAS = -L$(ATLASPATH)/32 -lcblas -lf77blas -latlas -lm
|
||||
else
|
||||
LIBATLAS = -L$(ATLASPATH)/32 -lptf77blas -lptatlas -lpthread -lm
|
||||
endif
|
||||
|
||||
ifdef HAVE_SSE3
|
||||
ifndef DYNAMIC_ARCH
|
||||
CCOMMON_OPT += -msse3
|
||||
FCOMMON_OPT += -msse3
|
||||
ifdef HAVE_SSSE3
|
||||
CCOMMON_OPT += -mssse3
|
||||
FCOMMON_OPT += -mssse3
|
||||
endif
|
||||
ifdef HAVE_SSE4_1
|
||||
CCOMMON_OPT += -msse4.1
|
||||
FCOMMON_OPT += -msse4.1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -8,6 +8,21 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef HAVE_SSE3
|
||||
ifndef DYNAMIC_ARCH
|
||||
CCOMMON_OPT += -msse3
|
||||
FCOMMON_OPT += -msse3
|
||||
ifdef HAVE_SSSE3
|
||||
CCOMMON_OPT += -mssse3
|
||||
FCOMMON_OPT += -mssse3
|
||||
endif
|
||||
ifdef HAVE_SSE4_1
|
||||
CCOMMON_OPT += -msse4.1
|
||||
FCOMMON_OPT += -msse4.1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), SKYLAKEX)
|
||||
ifndef DYNAMIC_ARCH
|
||||
ifndef NO_AVX512
|
||||
@@ -53,22 +68,34 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), HASWELL)
|
||||
ifeq ($(CORE), $(filter $(CORE), HASWELL ZEN SKYLAKEX COOPERLAKE))
|
||||
ifndef DYNAMIC_ARCH
|
||||
ifndef NO_AVX2
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
# AVX2 support was added in 4.7.0
|
||||
GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
|
||||
GCCVERSIONGTEQ5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 5)
|
||||
GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 7)
|
||||
ifeq ($(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7), 11)
|
||||
GCCVERSIONCHECK := $(GCCVERSIONGTEQ5)$(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7)
|
||||
ifeq ($(GCCVERSIONCHECK), $(filter $(GCCVERSIONCHECK), 011 110 111))
|
||||
CCOMMON_OPT += -mavx2
|
||||
endif
|
||||
else
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CCOMMON_OPT += -mavx2
|
||||
endif
|
||||
endif
|
||||
ifeq ($(F_COMPILER), GFORTRAN)
|
||||
# AVX2 support was added in 4.7.0
|
||||
GCCVERSIONGTEQ4 := $(shell expr `$(FC) -dumpversion | cut -f1 -d.` \>= 4)
|
||||
GCCVERSIONGTEQ5 := $(shell expr `$(FC) -dumpversion | cut -f1 -d.` \>= 5)
|
||||
GCCMINORVERSIONGTEQ7 := $(shell expr `$(FC) -dumpversion | cut -f2 -d.` \>= 7)
|
||||
ifeq ($(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7), 11)
|
||||
GCCVERSIONCHECK := $(GCCVERSIONGTEQ5)$(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7)
|
||||
ifeq ($(GCCVERSIONCHECK), $(filter $(GCCVERSIONCHECK), 011 110 111))
|
||||
FCOMMON_OPT += -mavx2
|
||||
endif
|
||||
else
|
||||
ifeq ($(F_COMPILER), FLANG)
|
||||
FCOMMON_OPT += -mavx2
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -8,3 +8,9 @@ ifeq ($(CORE), Z14)
|
||||
CCOMMON_OPT += -march=z14 -mzvector -O3
|
||||
FCOMMON_OPT += -march=z14 -mzvector
|
||||
endif
|
||||
|
||||
# Enable floating-point expression contraction for clang, since it is the
|
||||
# default for gcc
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CCOMMON_OPT += -ffp-contract=on
|
||||
endif
|
||||
|
||||
20
README.md
20
README.md
@@ -46,7 +46,10 @@ Building OpenBLAS requires the following to be installed:
|
||||
|
||||
Simply invoking `make` (or `gmake` on BSD) will detect the CPU automatically.
|
||||
To set a specific target CPU, use `make TARGET=xxx`, e.g. `make TARGET=NEHALEM`.
|
||||
The full target list is in the file `TargetList.txt`.
|
||||
The full target list is in the file `TargetList.txt`. For building with `cmake`, the
|
||||
usual conventions apply, i.e. create a build directory either underneath the toplevel
|
||||
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.
|
||||
|
||||
### Cross compile
|
||||
|
||||
@@ -152,13 +155,17 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
|
||||
- **Falkor**: same as A57 (different cpu specifications)
|
||||
- **ThunderX**: Optimized some Level-1 functions
|
||||
- **ThunderX2T99**: Optimized Level-3 BLAS and parts of Levels 1 and 2
|
||||
- **ThunderX3T110**
|
||||
- **TSV110**: Optimized some Level-3 helper functions
|
||||
- **EMAG 8180**: preliminary support based on A57
|
||||
- **Neoverse N1**: (AWS Graviton2) preliminary support
|
||||
- **Apple Vortex**: preliminary support based on ARMV8
|
||||
|
||||
#### PPC/PPC64
|
||||
|
||||
- **POWER8**: Optimized BLAS, only for PPC64LE (Little Endian), only with `USE_OPENMP=1`
|
||||
- **POWER9**: Optimized Level-3 BLAS (real) and some Level-1,2. PPC64LE with OpenMP only.
|
||||
- **POWER10**:
|
||||
|
||||
#### IBM zEnterprise System
|
||||
|
||||
@@ -167,18 +174,18 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
|
||||
|
||||
### Support for multiple targets in a single library
|
||||
|
||||
OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying DYNAMIC_ARCH=1 in Makefile.rule, on the gmake command line or as -DDYNAMIC_ARCH=TRUE in cmake.
|
||||
OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying `DYNAMIC_ARCH=1` in Makefile.rule, on the gmake command line or as `-DDYNAMIC_ARCH=TRUE` in cmake.
|
||||
|
||||
For **x86_64**, the list of targets this activates contains Prescott, Core2, Nehalem, Barcelona, Sandybridge, Bulldozer, Piledriver, Steamroller, Excavator, Haswell, Zen, SkylakeX. For cpu generations not included in this list, the corresponding older model is used. If you also specify DYNAMIC_OLDER=1, specific support for Penryn, Dunnington, Opteron, Opteron/SSE3, Bobcat, Atom and Nano is added. Finally there is an option DYNAMIC_LIST that allows to specify an individual list of targets to include instead of the default.
|
||||
For **x86_64**, the list of targets this activates contains Prescott, Core2, Nehalem, Barcelona, Sandybridge, Bulldozer, Piledriver, Steamroller, Excavator, Haswell, Zen, SkylakeX. For cpu generations not included in this list, the corresponding older model is used. If you also specify `DYNAMIC_OLDER=1`, specific support for Penryn, Dunnington, Opteron, Opteron/SSE3, Bobcat, Atom and Nano is added. Finally there is an option `DYNAMIC_LIST` that allows to specify an individual list of targets to include instead of the default.
|
||||
|
||||
DYNAMIC_ARCH is also supported on **x86**, where it translates to Katmai, Coppermine, Northwood, Prescott, Banias,
|
||||
`DYNAMIC_ARCH` is also supported on **x86**, where it translates to Katmai, Coppermine, Northwood, Prescott, Banias,
|
||||
Core2, Penryn, Dunnington, Nehalem, Athlon, Opteron, Opteron_SSE3, Barcelona, Bobcat, Atom and Nano.
|
||||
|
||||
On **ARMV8**, it enables support for CortexA53, CortexA57, CortexA72, CortexA73, Falkor, ThunderX, ThunderX2T99, TSV110 as well as generic ARMV8 cpus.
|
||||
|
||||
For **POWER**, the list encompasses POWER6, POWER8 and POWER9, on **ZARCH** it comprises Z13 and Z14.
|
||||
|
||||
The TARGET option can be used in conjunction with DYNAMIC_ARCH=1 to specify which cpu model should be assumed for all the
|
||||
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.
|
||||
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.
|
||||
|
||||
@@ -226,7 +233,8 @@ We provide the following functions to control the number of threads at runtime:
|
||||
void goto_set_num_threads(int num_threads);
|
||||
void openblas_set_num_threads(int num_threads);
|
||||
```
|
||||
|
||||
Note that these are only used once at library initialization, and are not available for
|
||||
fine-tuning thread numbers in individual BLAS calls.
|
||||
If you compile this library with `USE_OPENMP=1`, you should use the above functions too.
|
||||
|
||||
## Reporting bugs
|
||||
|
||||
@@ -98,6 +98,7 @@ THUNDERX
|
||||
THUNDERX2T99
|
||||
TSV110
|
||||
THUNDERX3T110
|
||||
VORTEX
|
||||
|
||||
9.System Z:
|
||||
ZARCH_GENERIC
|
||||
|
||||
@@ -49,8 +49,8 @@ else
|
||||
GOTO_LAPACK_TARGETS=
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HALF),1)
|
||||
GOTO_HALF_TARGETS=shgemm.goto
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
GOTO_HALF_TARGETS=sbgemm.goto
|
||||
else
|
||||
GOTO_HALF_TARGETS=
|
||||
endif
|
||||
@@ -620,8 +620,8 @@ zcholesky.essl : zcholesky.$(SUFFIX)
|
||||
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBESSL) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
|
||||
|
||||
##################################### Sgemm ####################################################
|
||||
ifeq ($(BUILD_HALF),1)
|
||||
shgemm.goto : shgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
sbgemm.goto : sbgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
endif
|
||||
|
||||
@@ -2927,8 +2927,8 @@ ccholesky.$(SUFFIX) : cholesky.c
|
||||
zcholesky.$(SUFFIX) : cholesky.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
|
||||
|
||||
ifeq ($(BUILD_HALF),1)
|
||||
shgemm.$(SUFFIX) : gemm.c
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
sbgemm.$(SUFFIX) : gemm.c
|
||||
$(CC) $(CFLAGS) -c -DHALF -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
endif
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -128,8 +128,13 @@ int main(int argc, char *argv[]){
|
||||
int to = 200;
|
||||
int step = 1;
|
||||
|
||||
#if defined(__WIN32__) || defined(__WIN64__) || !defined(_POSIX_TIMERS)
|
||||
struct timeval start, stop;
|
||||
double time1,timeg;
|
||||
#else
|
||||
struct timespec start = { 0, 0 }, stop = { 0, 0 };
|
||||
double time1, timeg;
|
||||
#endif
|
||||
|
||||
argc--;argv++;
|
||||
|
||||
@@ -147,7 +152,7 @@ int main(int argc, char *argv[]){
|
||||
}
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
@@ -160,26 +165,30 @@ int main(int argc, char *argv[]){
|
||||
|
||||
fprintf(stderr, " %6d : ", (int)m);
|
||||
|
||||
|
||||
for (l=0; l<loops; l++)
|
||||
{
|
||||
|
||||
for(i = 0; i < m * COMPSIZE * abs(inc_x); i++){
|
||||
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
|
||||
}
|
||||
|
||||
#if defined(__WIN32__) || defined(__WIN64__) || !defined(_POSIX_TIMERS)
|
||||
gettimeofday( &start, (struct timezone *)0);
|
||||
|
||||
#else
|
||||
clock_gettime(CLOCK_REALTIME, &start);
|
||||
#endif
|
||||
result = ASUM (&m, x, &inc_x);
|
||||
|
||||
gettimeofday( &stop, (struct timezone *)0);
|
||||
|
||||
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
|
||||
#if defined(__WIN32__) || defined(__WIN64__) || !defined(_POSIX_TIMERS)
|
||||
clock_gettime(CLOCK_REALTIME, &stop);
|
||||
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;
|
||||
#else
|
||||
gettimeofday( &stop, (struct timezone *)0);
|
||||
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_nsec - start.tv_nsec)) / 1.e9;
|
||||
#endif
|
||||
|
||||
timeg += time1;
|
||||
|
||||
}
|
||||
|
||||
if (loops >1)
|
||||
timeg /= loops;
|
||||
|
||||
#ifdef COMPLEX
|
||||
|
||||
@@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ int main(int argc, char *argv[]){
|
||||
}
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifdef DOUBLE
|
||||
#define GEMM BLASFUNC(dgemm)
|
||||
#elif defined(HALF)
|
||||
#define GEMM BLASFUNC(shgemm)
|
||||
#define GEMM BLASFUNC(sbgemm)
|
||||
#else
|
||||
#define GEMM BLASFUNC(sgemm)
|
||||
#endif
|
||||
@@ -197,7 +197,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ int main(int argc, char *argv[]){
|
||||
loops = atoi(p);
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ int main(int argc, char *argv[]){
|
||||
}
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ int main(int argc, char *argv[]){
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ int main(int argc, char *argv[]){
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ int main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ int main(int argc, char *argv[]){
|
||||
uplo,diag,loops);
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
||||
2
c_check
2
c_check
@@ -8,7 +8,7 @@ $hostos = `uname -s | sed -e s/\-.*//`; chop($hostos);
|
||||
$hostarch = `uname -m | sed -e s/i.86/x86/`;chop($hostarch);
|
||||
$hostarch = `uname -p` if ($hostos eq "AIX");
|
||||
$hostarch = "x86_64" if ($hostarch eq "amd64");
|
||||
$hostarch = "arm" if ($hostarch =~ /^arm.*/);
|
||||
$hostarch = "arm" if ($hostarch ne "arm64" && $hostarch =~ /^arm.*/);
|
||||
$hostarch = "arm64" if ($hostarch eq "aarch64");
|
||||
$hostarch = "power" if ($hostarch =~ /^(powerpc|ppc).*/);
|
||||
$hostarch = "zarch" if ($hostarch eq "s390x");
|
||||
|
||||
11
cblas.h
11
cblas.h
@@ -382,6 +382,17 @@ void cblas_cgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint
|
||||
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,
|
||||
double *c, OPENBLAS_CONST blasint cldc);
|
||||
|
||||
/*** BFLOAT16 and INT8 extensions ***/
|
||||
/* convert float array to BFLOAT16 array by rounding */
|
||||
void cblas_sbstobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
|
||||
/* convert double array to BFLOAT16 array by rounding */
|
||||
void cblas_sbdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
|
||||
/* convert BFLOAT16 array to float array */
|
||||
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);
|
||||
/* 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);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
##
|
||||
## Author: Hank Anderson <hank@statease.com>
|
||||
## Description: Ported from portion of OpenBLAS/Makefile.system
|
||||
## Sets various variables based on architecture.
|
||||
@@ -50,6 +49,7 @@ if (DYNAMIC_ARCH)
|
||||
|
||||
if (POWER)
|
||||
set(DYNAMIC_CORE POWER6 POWER8 POWER9 POWER10)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DHAVE_P10_SUPPORT")
|
||||
endif ()
|
||||
|
||||
if (X86)
|
||||
@@ -80,10 +80,14 @@ if (DYNAMIC_ARCH)
|
||||
string(REGEX REPLACE "-march=native" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
endif ()
|
||||
if (DYNAMIC_LIST)
|
||||
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
|
||||
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
|
||||
endif ()
|
||||
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")
|
||||
endif ()
|
||||
|
||||
if (NOT DYNAMIC_CORE)
|
||||
message (STATUS "DYNAMIC_ARCH is not supported on this architecture, removing from options")
|
||||
unset(DYNAMIC_ARCH CACHE)
|
||||
|
||||
@@ -109,10 +109,34 @@ if (${CORE} STREQUAL "COOPERLAKE")
|
||||
if (NOT NO_AVX512)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
||||
if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL 10.1)
|
||||
set (CCOMMON_OPT = "${CCOMMON_OPT} -march=cooperlake")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=cooperlake")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (HAVE_AVX2)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -mavx2")
|
||||
endif ()
|
||||
if (HAVE_AVX)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -mavx")
|
||||
endif ()
|
||||
if (HAVE_SSE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -msse")
|
||||
endif ()
|
||||
if (HAVE_SSE2)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -msse2")
|
||||
endif ()
|
||||
if (HAVE_SSE3)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -msse3")
|
||||
endif ()
|
||||
if (HAVE_SSSE3)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -mssse3")
|
||||
endif ()
|
||||
if (HAVE_SSE4_1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -msse4.1")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
@@ -113,7 +113,7 @@ macro(SetDefaultL1)
|
||||
set(ZSUMKERNEL zsum.S)
|
||||
set(QSUMKERNEL sum.S)
|
||||
set(XSUMKERNEL zsum.S)
|
||||
if (BUILD_HALF)
|
||||
if (BUILD_BFLOAT16)
|
||||
set(SHAMINKERNEL ../arm/amin.c)
|
||||
set(SHAMAXKERNEL ../arm/amax.c)
|
||||
set(SHMAXKERNEL ../arm/max.c)
|
||||
@@ -126,12 +126,14 @@ if (BUILD_HALF)
|
||||
set(SHAXPYKERNEL ../arm/axpy.c)
|
||||
set(SHAXPBYKERNEL ../arm/axpby.c)
|
||||
set(SHCOPYKERNEL ../arm/copy.c)
|
||||
set(SHDOTKERNEL ../arm/dot.c)
|
||||
set(SBDOTKERNEL ../x86_64/sbdot.c)
|
||||
set(SHROTKERNEL ../arm/rot.c)
|
||||
set(SHSCALKERNEL ../arm/scal.c)
|
||||
set(SHNRM2KERNEL ../arm/nrm2.c)
|
||||
set(SHSUMKERNEL ../arm/sum.c)
|
||||
set(SHSWAPKERNEL ../arm/swap.c)
|
||||
set(TOBF16KERNEL ../x86_64/tobf16.c)
|
||||
set(BF16TOKERNEL ../x86_64/bf16to.c)
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
@@ -181,9 +183,9 @@ macro(SetDefaultL2)
|
||||
set(XHEMV_L_KERNEL ../generic/zhemv_k.c)
|
||||
set(XHEMV_V_KERNEL ../generic/zhemv_k.c)
|
||||
set(XHEMV_M_KERNEL ../generic/zhemv_k.c)
|
||||
if (BUILD_HALF)
|
||||
set(SHGEMVNKERNEL ../arm/gemv_n.c)
|
||||
set(SHGEMVTKERNEL ../arm/gemv_t.c)
|
||||
if (BUILD_BFLOAT16)
|
||||
set(SBGEMVNKERNEL ../arm/gemv_n.c)
|
||||
set(SBGEMVTKERNEL ../arm/gemv_t.c)
|
||||
set(SHGERKERNEL ../generic/ger.c)
|
||||
endif ()
|
||||
endmacro ()
|
||||
@@ -193,18 +195,18 @@ macro(SetDefaultL3)
|
||||
set(DGEADD_KERNEL ../generic/geadd.c)
|
||||
set(CGEADD_KERNEL ../generic/zgeadd.c)
|
||||
set(ZGEADD_KERNEL ../generic/zgeadd.c)
|
||||
if (BUILD_HALF)
|
||||
if (BUILD_BFLOAT16)
|
||||
set(SHGEADD_KERNEL ../generic/geadd.c)
|
||||
set(SHGEMMKERNEL ../generic/gemmkernel_2x2.c)
|
||||
set(SHGEMM_BETA ../generic/gemm_beta.c)
|
||||
set(SHGEMMINCOPY ../generic/gemm_ncopy_2.c)
|
||||
set(SHGEMMITCOPY ../generic/gemm_tcopy_2.c)
|
||||
set(SHGEMMONCOPY ../generic/gemm_ncopy_2.c)
|
||||
set(SHGEMMOTCOPY ../generic/gemm_tcopy_2.c)
|
||||
set(SHGEMMINCOPYOBJ shgemm_incopy.o)
|
||||
set(SHGEMMITCOPYOBJ shgemm_itcopy.o)
|
||||
set(SHGEMMONCOPYOBJ shgemm_oncopy.o)
|
||||
set(SHGEMMOTCOPYOBJ shgemm_otcopy.o)
|
||||
set(SBGEMMKERNEL ../generic/gemmkernel_2x2.c)
|
||||
set(SBGEMM_BETA ../generic/gemm_beta.c)
|
||||
set(SBGEMMINCOPY ../generic/gemm_ncopy_2.c)
|
||||
set(SBGEMMITCOPY ../generic/gemm_tcopy_2.c)
|
||||
set(SBGEMMONCOPY ../generic/gemm_ncopy_2.c)
|
||||
set(SBGEMMOTCOPY ../generic/gemm_tcopy_2.c)
|
||||
set(SBGEMMINCOPYOBJ sbgemm_incopy.o)
|
||||
set(SBGEMMITCOPYOBJ sbgemm_itcopy.o)
|
||||
set(SBGEMMONCOPYOBJ sbgemm_oncopy.o)
|
||||
set(SBGEMMOTCOPYOBJ sbgemm_otcopy.o)
|
||||
endif ()
|
||||
|
||||
endmacro ()
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# Sources for compiling lapack-netlib. Can't use CMakeLists.txt because lapack-netlib already has its own cmake files.
|
||||
|
||||
set(ALLAUX ilaenv.f ilaenv2stage.f ieeeck.f lsamen.f iparmq.f iparam2stage.F
|
||||
ilaprec.f ilatrans.f ilauplo.f iladiag.f chla_transtype.f
|
||||
ilaprec.f ilatrans.f ilauplo.f iladiag.f chla_transtype.f dlaset.f
|
||||
../INSTALL/ilaver.f xerbla_array.f
|
||||
../INSTALL/slamch.f)
|
||||
|
||||
set(SCLAUX
|
||||
scombssq.f sbdsvdx.f sstevx.f sstein.f
|
||||
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
|
||||
@@ -25,6 +26,7 @@ set(SCLAUX
|
||||
|
||||
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
|
||||
dlaed7.f dlaed8.f dlaed9.f dlaeda.f dlaev2.f dlagtf.f
|
||||
@@ -35,14 +37,14 @@ set(DZLAUX
|
||||
dlartg.f dlaruv.f dlas2.f dlascl.f
|
||||
dlasd0.f dlasd1.f dlasd2.f dlasd3.f dlasd4.f dlasd5.f dlasd6.f
|
||||
dlasd7.f dlasd8.f dlasda.f dlasdq.f dlasdt.f
|
||||
dlaset.f dlasq1.f dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f
|
||||
dlasq1.f dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f
|
||||
dlasr.f dlasrt.f dlassq.f dlasv2.f dpttrf.f dstebz.f dstedc.f
|
||||
dsteqr.f dsterf.f dlaisnan.f disnan.f
|
||||
dlartgp.f dlartgs.f
|
||||
../INSTALL/dlamch.f ../INSTALL/dsecnd_${TIMER}.f)
|
||||
|
||||
set(SLASRC
|
||||
sbdsvdx.f sgbbrd.f sgbcon.f sgbequ.f sgbrfs.f sgbsv.f
|
||||
sgbbrd.f sgbcon.f sgbequ.f sgbrfs.f sgbsv.f
|
||||
sgbsvx.f sgbtf2.f sgbtrf.f sgbtrs.f sgebak.f sgebal.f sgebd2.f
|
||||
sgebrd.f sgecon.f sgeequ.f sgees.f sgeesx.f sgeev.f sgeevx.f
|
||||
sgehd2.f sgehrd.f sgelq2.f sgelqf.f
|
||||
@@ -83,8 +85,8 @@ set(SLASRC
|
||||
ssbev.f ssbevd.f ssbevx.f ssbgst.f ssbgv.f ssbgvd.f ssbgvx.f
|
||||
ssbtrd.f sspcon.f sspev.f sspevd.f sspevx.f sspgst.f
|
||||
sspgv.f sspgvd.f sspgvx.f ssprfs.f sspsv.f sspsvx.f ssptrd.f
|
||||
ssptrf.f ssptri.f ssptrs.f sstegr.f sstein.f sstev.f sstevd.f sstevr.f
|
||||
sstevx.f ssycon.f ssyev.f ssyevd.f ssyevr.f ssyevx.f ssygs2.f
|
||||
ssptrf.f ssptri.f ssptrs.f sstegr.f sstev.f sstevd.f sstevr.f
|
||||
ssycon.f ssyev.f ssyevd.f ssyevr.f ssyevx.f ssygs2.f
|
||||
ssygst.f ssygv.f ssygvd.f ssygvx.f ssyrfs.f ssysv.f ssysvx.f
|
||||
ssytd2.f ssytf2.f ssytrd.f ssytrf.f ssytri.f ssytri2.f ssytri2x.f
|
||||
ssyswapr.f ssytrs.f ssytrs2.f
|
||||
@@ -116,7 +118,7 @@ set(SLASRC
|
||||
ssytrd_2stage.f ssytrd_sy2sb.f ssytrd_sb2st.F ssb2st_kernels.f
|
||||
ssyevd_2stage.f ssyev_2stage.f ssyevx_2stage.f ssyevr_2stage.f
|
||||
ssbev_2stage.f ssbevx_2stage.f ssbevd_2stage.f ssygv_2stage.f
|
||||
scombssq.f sgesvdq.f slaorhr_col_getrfnp.f
|
||||
sgesvdq.f slaorhr_col_getrfnp.f
|
||||
slaorhr_col_getrfnp2.f sorgtsqr.f sorhr_col.f )
|
||||
|
||||
set(SXLASRC sgesvxx.f sgerfsx.f sla_gerfsx_extended.f sla_geamv.f
|
||||
@@ -229,7 +231,7 @@ set(CXLASRC cgesvxx.f cgerfsx.f cla_gerfsx_extended.f cla_geamv.f
|
||||
cla_lin_berr.f clarscl2.f clascl2.f cla_wwaddw.f)
|
||||
|
||||
set(DLASRC
|
||||
dbdsvdx.f dgbbrd.f dgbcon.f dgbequ.f dgbrfs.f dgbsv.f
|
||||
dgbbrd.f dgbcon.f dgbequ.f dgbrfs.f dgbsv.f
|
||||
dgbsvx.f dgbtf2.f dgbtrf.f dgbtrs.f dgebak.f dgebal.f dgebd2.f
|
||||
dgebrd.f dgecon.f dgeequ.f dgees.f dgeesx.f dgeev.f dgeevx.f
|
||||
dgehd2.f dgehrd.f dgelq2.f dgelqf.f
|
||||
@@ -270,8 +272,8 @@ set(DLASRC
|
||||
dsbev.f dsbevd.f dsbevx.f dsbgst.f dsbgv.f dsbgvd.f dsbgvx.f
|
||||
dsbtrd.f dspcon.f dspev.f dspevd.f dspevx.f dspgst.f
|
||||
dspgv.f dspgvd.f dspgvx.f dsprfs.f dspsv.f dspsvx.f dsptrd.f
|
||||
dsptrf.f dsptri.f dsptrs.f dstegr.f dstein.f dstev.f dstevd.f dstevr.f
|
||||
dstevx.f dsycon.f dsyev.f dsyevd.f dsyevr.f
|
||||
dsptrf.f dsptri.f dsptrs.f dstegr.f dstev.f dstevd.f dstevr.f
|
||||
dsycon.f dsyev.f dsyevd.f dsyevr.f
|
||||
dsyevx.f dsygs2.f dsygst.f dsygv.f dsygvd.f dsygvx.f dsyrfs.f
|
||||
dsysv.f dsysvx.f
|
||||
dsytd2.f dsytf2.f dsytrd.f dsytrf.f dsytri.f dsytrs.f dsytrs2.f
|
||||
@@ -474,12 +476,16 @@ endif()
|
||||
if(BUILD_COMPLEX)
|
||||
set(LA_REL_SRC ${LA_REL_SRC} ${CLASRC} ${ZCLASRC} ${ALLAUX} ${SCLAUX})
|
||||
SET(LA_GEN_SRC ${LA_GEN_SRC} ${CMATGEN} ${SCATGEN})
|
||||
message(STATUS "Building Complex Precision")
|
||||
message(STATUS "Building Single Precision Complex")
|
||||
endif()
|
||||
if(BUILD_COMPLEX16)
|
||||
set(LA_REL_SRC ${LA_REL_SRC} ${ZLASRC} ${ZCLASRC} ${ALLAUX} ${DZLAUX})
|
||||
SET(LA_GEN_SRC ${LA_GEN_SRC} ${ZMATGEN} ${DZATGEN})
|
||||
message(STATUS "Building Double Complex Precision")
|
||||
# for zlange/zlanhe
|
||||
if (NOT BUILD_DOUBLE)
|
||||
set (LA_REL_SRC ${LA_REL_SRC} dcombssq.f)
|
||||
endif ()
|
||||
message(STATUS "Building Double Precision Complex")
|
||||
endif()
|
||||
|
||||
# add lapack-netlib folder to the sources
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
# HAVE_SSE2
|
||||
# HAVE_SSE3
|
||||
# MAKE
|
||||
# SHGEMM_UNROLL_M
|
||||
# SHGEMM_UNROLL_N
|
||||
# SBGEMM_UNROLL_M
|
||||
# SBGEMM_UNROLL_N
|
||||
# SGEMM_UNROLL_M
|
||||
# SGEMM_UNROLL_N
|
||||
# DGEMM_UNROLL_M
|
||||
@@ -416,6 +416,29 @@ endif ()
|
||||
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"
|
||||
"#define L1_CODE_SIZE\t32768\n"
|
||||
"#define L1_CODE_LINESIZE\t64\n"
|
||||
"#define L1_CODE_ASSOCIATIVE\t4\n"
|
||||
"#define L1_DATA_SIZE\t32768\n"
|
||||
"#define L1_DATA_LINESIZE\t64\n"
|
||||
"#define L1_DATA_ASSOCIATIVE\t4\n"
|
||||
"#define L2_SIZE\t5262144\n"
|
||||
"#define L2_LINESIZE\t64\n"
|
||||
"#define L2_ASSOCIATIVE\t8\n"
|
||||
"#define DTB_DEFAULT_ENTRIES\t64\n"
|
||||
"#define DTB_SIZE\t4096\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 "POWER6")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
@@ -471,8 +494,8 @@ endif ()
|
||||
set(ZGEMM_UNROLL_N 2)
|
||||
set(SYMV_P 8)
|
||||
endif()
|
||||
set(SHGEMM_UNROLL_M 8)
|
||||
set(SHGEMM_UNROLL_N 4)
|
||||
set(SBGEMM_UNROLL_M 8)
|
||||
set(SBGEMM_UNROLL_N 4)
|
||||
|
||||
# Or should this actually be NUM_CORES?
|
||||
if (${NUM_THREADS} GREATER 0)
|
||||
|
||||
@@ -70,6 +70,21 @@ if (DEFINED TARGET)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
|
||||
endif()
|
||||
endif()
|
||||
if (DEFINED HAVE_SSE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse")
|
||||
endif()
|
||||
if (DEFINED HAVE_SSE2)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse2")
|
||||
endif()
|
||||
if (DEFINED HAVE_SSE3)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
|
||||
endif()
|
||||
if (DEFINED HAVE_SSSE3)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mssse3")
|
||||
endif()
|
||||
if (DEFINED HAVE_SSE4_1)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse4.1")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (DEFINED TARGET)
|
||||
@@ -110,6 +125,11 @@ if (NO_AVX2)
|
||||
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DNO_AVX2")
|
||||
endif ()
|
||||
|
||||
if (NO_AVX512)
|
||||
message(STATUS "Disabling Advanced Vector Extensions 512 (AVX512).")
|
||||
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DNO_AVX512")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(GETARCH_FLAGS "${GETARCH_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
|
||||
endif ()
|
||||
@@ -318,7 +338,13 @@ else ()
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=2048")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
if (DEFINED BLAS3_MEM_ALLOC_THRESHOLD)
|
||||
if (NOT ${BLAS3_MEM_ALLOC_THRESHOLD} EQUAL 32)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DBLAS3_MEM_ALLOC_THRESHOLD=${BLAS3_MEM_ALLOC_THRESHOLD}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (DEFINED LIBNAMESUFFIX)
|
||||
set(LIBPREFIX "libopenblas_${LIBNAMESUFFIX}")
|
||||
else ()
|
||||
@@ -388,6 +414,25 @@ set(REVISION "-r${OpenBLAS_VERSION}")
|
||||
set(MAJOR_VERSION ${OpenBLAS_MAJOR_VERSION})
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CCOMMON_OPT}")
|
||||
|
||||
if (NOT BUILD_SINGLE AND NOT BUILD_DOUBLE AND NOT BUILD_COMPLEX AND NOT BUILD_COMPLEX16)
|
||||
set (BUILD_SINGLE ON)
|
||||
set (BUILD_DOUBLE ON)
|
||||
set (BUILD_COMPLEX ON)
|
||||
set (BUILD_COMPLEX16 ON)
|
||||
endif()
|
||||
if (BUILD_SINGLE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_SINGLE")
|
||||
endif()
|
||||
if (BUILD_DOUBLE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_DOUBLE")
|
||||
endif()
|
||||
if (BUILD_COMPLEX)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_COMPLEX")
|
||||
endif()
|
||||
if (BUILD_COMPLEX16)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_COMPLEX16")
|
||||
endif()
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${CCOMMON_OPT}")
|
||||
endif()
|
||||
@@ -560,8 +605,8 @@ endif ()
|
||||
#export FUNCTION_PROFILE
|
||||
#export TARGET_CORE
|
||||
#
|
||||
#export SHGEMM_UNROLL_M
|
||||
#export SHGEMM_UNROLL_N
|
||||
#export SBGEMM_UNROLL_M
|
||||
#export SBGEMM_UNROLL_N
|
||||
#export SGEMM_UNROLL_M
|
||||
#export SGEMM_UNROLL_N
|
||||
#export DGEMM_UNROLL_M
|
||||
|
||||
@@ -54,14 +54,14 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
|
||||
set(X86 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
|
||||
set(ARM 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(ARM64 1)
|
||||
else()
|
||||
set(ARM 1)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
|
||||
set(ARM 1)
|
||||
elseif (${CMAKE_CROSSCOMPILING})
|
||||
if (${TARGET} STREQUAL "CORE2")
|
||||
if (NOT BINARY)
|
||||
@@ -109,6 +109,7 @@ else()
|
||||
endif()
|
||||
|
||||
if (X86_64 OR X86)
|
||||
if (NOT NO_AVX512)
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/avx512.c "#include <immintrin.h>\n\nint main(void){ __asm__ volatile(\"vbroadcastss -4 * 4(%rsi), %zmm2\"); }")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -c -v -o ${PROJECT_BINARY_DIR}/avx512.o ${PROJECT_BINARY_DIR}/avx512.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
|
||||
if (NO_AVX512 EQUAL 1)
|
||||
@@ -116,10 +117,10 @@ set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
|
||||
endif()
|
||||
file(REMOVE "avx512.c" "avx512.o")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CheckIncludeFile)
|
||||
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
|
||||
if (HAVE_C11 EQUAL 1)
|
||||
message (STATUS found stdatomic.h)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -DHAVE_C11")
|
||||
endif()
|
||||
|
||||
@@ -211,7 +211,7 @@ function(GenerateNamedObjects sources_in)
|
||||
if (complex_only)
|
||||
list(REMOVE_ITEM float_list "SINGLE")
|
||||
list(REMOVE_ITEM float_list "DOUBLE")
|
||||
list(REMOVE_ITEM float_list "HALF")
|
||||
list(REMOVE_ITEM float_list "BFLOAT16")
|
||||
elseif (real_only)
|
||||
list(REMOVE_ITEM float_list "COMPLEX")
|
||||
list(REMOVE_ITEM float_list "ZCOMPLEX")
|
||||
@@ -225,8 +225,8 @@ 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 "HALF")
|
||||
set (float_char "sh")
|
||||
if (${float_type} STREQUAL "BFLOAT16")
|
||||
set (float_char "sb")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -262,8 +262,8 @@ function(GenerateNamedObjects sources_in)
|
||||
if (${float_type} STREQUAL "DOUBLE" OR ${float_type} STREQUAL "ZCOMPLEX")
|
||||
list(APPEND obj_defines "DOUBLE")
|
||||
endif ()
|
||||
if (${float_type} STREQUAL "HALF")
|
||||
list(APPEND obj_defines "HALF")
|
||||
if (${float_type} STREQUAL "BFLOAT16")
|
||||
list(APPEND obj_defines "BFLOAT16")
|
||||
endif ()
|
||||
if (${float_type} STREQUAL "COMPLEX" OR ${float_type} STREQUAL "ZCOMPLEX")
|
||||
list(APPEND obj_defines "COMPLEX")
|
||||
|
||||
13
common.h
13
common.h
@@ -257,9 +257,10 @@ typedef long BLASLONG;
|
||||
typedef unsigned long BLASULONG;
|
||||
#endif
|
||||
|
||||
#ifndef BFLOAT16
|
||||
typedef unsigned short bfloat16;
|
||||
#define HALFCONVERSION 1
|
||||
#ifndef bfloat16
|
||||
#include <stdint.h>
|
||||
typedef uint16_t bfloat16;
|
||||
#define BFLOAT16CONVERSION 1
|
||||
#endif
|
||||
|
||||
#ifdef USE64BITINT
|
||||
@@ -302,7 +303,7 @@ typedef int blasint;
|
||||
#define SIZE 8
|
||||
#define BASE_SHIFT 3
|
||||
#define ZBASE_SHIFT 4
|
||||
#elif defined(HALF)
|
||||
#elif defined(BFLOAT16)
|
||||
#define IFLOAT bfloat16
|
||||
#define XFLOAT IFLOAT
|
||||
#define FLOAT float
|
||||
@@ -351,7 +352,7 @@ typedef int blasint;
|
||||
#endif
|
||||
|
||||
#if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) || defined(ARMV5)
|
||||
#define YIELDING asm volatile ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
|
||||
#define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
|
||||
#endif
|
||||
|
||||
#ifdef BULLDOZER
|
||||
@@ -401,7 +402,7 @@ please https://github.com/xianyi/OpenBLAS/issues/246
|
||||
#endif
|
||||
|
||||
#ifndef BLAS3_MEM_ALLOC_THRESHOLD
|
||||
#define BLAS3_MEM_ALLOC_THRESHOLD 160
|
||||
#define BLAS3_MEM_ALLOC_THRESHOLD 32
|
||||
#endif
|
||||
|
||||
#ifdef QUAD_PRECISION
|
||||
|
||||
@@ -54,6 +54,11 @@ double BLASFUNC(dsdot) (blasint *, float *, blasint *, float *, blasint *);
|
||||
double BLASFUNC(ddot) (blasint *, double *, blasint *, double *, blasint *);
|
||||
xdouble BLASFUNC(qdot) (blasint *, xdouble *, blasint *, xdouble *, 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 *);
|
||||
void BLASFUNC(sbf16tos) (blasint *, bfloat16 *, blasint *, float *, blasint *);
|
||||
void BLASFUNC(dbf16tod) (blasint *, bfloat16 *, blasint *, double *, blasint *);
|
||||
|
||||
#ifdef RETURN_BY_STRUCT
|
||||
typedef struct {
|
||||
@@ -469,7 +474,7 @@ void BLASFUNC(xhbmv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint
|
||||
|
||||
/* Level 3 routines */
|
||||
|
||||
void BLASFUNC(shgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
|
||||
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 *,
|
||||
float *, blasint *, float *, blasint *, float *, float *, blasint *);
|
||||
|
||||
@@ -46,6 +46,12 @@ float sdot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
double dsdot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
double ddot_k(BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
xdouble qdot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
float sbdot_k(BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
|
||||
void sbstobf16_k(BLASLONG, float *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
void sbdtobf16_k(BLASLONG, double *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
void sbf16tos_k (BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
void dbf16tod_k (BLASLONG, bfloat16 *, BLASLONG, double *, BLASLONG);
|
||||
|
||||
openblas_complex_float cdotc_k (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
openblas_complex_float cdotu_k (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
@@ -55,7 +55,7 @@ void sgemm_direct(BLASLONG M, BLASLONG N, BLASLONG K,
|
||||
int sgemm_direct_performant(BLASLONG M, BLASLONG N, BLASLONG K);
|
||||
|
||||
|
||||
int shgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
|
||||
int sbgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
|
||||
bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
int sgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
|
||||
float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
@@ -78,10 +78,10 @@ int xgemm_beta(BLASLONG, BLASLONG, BLASLONG, xdouble *,
|
||||
xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
#endif
|
||||
|
||||
int shgemm_incopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int shgemm_itcopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int shgemm_oncopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int shgemm_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);
|
||||
int sbgemm_otcopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int sgemm_incopy(BLASLONG m, BLASLONG n, float *a, BLASLONG lda, float *b);
|
||||
int sgemm_itcopy(BLASLONG m, BLASLONG n, float *a, BLASLONG lda, float *b);
|
||||
int sgemm_oncopy(BLASLONG m, BLASLONG n, float *a, BLASLONG lda, float *b);
|
||||
@@ -505,7 +505,7 @@ 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, bfloat16 *, bfloat16 *, float *, 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);
|
||||
|
||||
@@ -534,10 +534,10 @@ 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 *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int shgemm_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int shgemm_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int shgemm_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);
|
||||
int sbgemm_tt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
|
||||
int sgemm_nn(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG);
|
||||
int sgemm_nt(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG);
|
||||
@@ -631,10 +631,10 @@ 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 *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int shgemm_thread_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int shgemm_thread_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int shgemm_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);
|
||||
int sbgemm_thread_tt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
|
||||
int sgemm_thread_nn(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG);
|
||||
int sgemm_thread_nt(blas_arg_t *, BLASLONG *, BLASLONG *, float *, float *, BLASLONG);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#ifndef COMMON_MACRO
|
||||
#define COMMON_MACRO
|
||||
|
||||
#include "common_sh.h"
|
||||
#include "common_sb.h"
|
||||
#include "common_s.h"
|
||||
#include "common_d.h"
|
||||
#include "common_q.h"
|
||||
@@ -644,7 +644,12 @@
|
||||
|
||||
#define GEADD_K DGEADD_K
|
||||
|
||||
#elif defined(HALF)
|
||||
#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 AMAX_K SAMAX_K
|
||||
#define AMIN_K SAMIN_K
|
||||
@@ -657,6 +662,7 @@
|
||||
#define ASUM_K SASUM_K
|
||||
#define DOTU_K SDOTU_K
|
||||
#define DOTC_K SDOTC_K
|
||||
#define BF16_DOT_K SBDOT_K
|
||||
#define AXPYU_K SAXPYU_K
|
||||
#define AXPYC_K SAXPYC_K
|
||||
#define AXPBY_K SAXPBY_K
|
||||
@@ -676,32 +682,32 @@
|
||||
#define NRM2_K SNRM2_K
|
||||
#define SYMV_THREAD_U SSYMV_THREAD_U
|
||||
#define SYMV_THREAD_L SSYMV_THREAD_L
|
||||
#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_BETA SBGEMM_BETA
|
||||
#define GEMM_KERNEL_N SBGEMM_KERNEL
|
||||
#define GEMM_KERNEL_L SBGEMM_KERNEL
|
||||
#define GEMM_KERNEL_R SBGEMM_KERNEL
|
||||
#define GEMM_KERNEL_B SBGEMM_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_NN SBGEMM_NN
|
||||
#define GEMM_CN SBGEMM_TN
|
||||
#define GEMM_TN SBGEMM_TN
|
||||
#define GEMM_NC SBGEMM_NT
|
||||
#define GEMM_NT SBGEMM_NT
|
||||
#define GEMM_CC SBGEMM_TT
|
||||
#define GEMM_CT SBGEMM_TT
|
||||
#define GEMM_TC SBGEMM_TT
|
||||
#define GEMM_TT SBGEMM_TT
|
||||
#define GEMM_NR SBGEMM_NN
|
||||
#define GEMM_TR SBGEMM_TN
|
||||
#define GEMM_CR SBGEMM_TN
|
||||
#define GEMM_RN SBGEMM_NN
|
||||
#define GEMM_RT SBGEMM_NT
|
||||
#define GEMM_RC SBGEMM_NT
|
||||
#define GEMM_RR SBGEMM_NN
|
||||
#define GEMM_ONCOPY SBGEMM_ONCOPY
|
||||
#define GEMM_OTCOPY SBGEMM_OTCOPY
|
||||
#define GEMM_INCOPY SBGEMM_INCOPY
|
||||
#define GEMM_ITCOPY SBGEMM_ITCOPY
|
||||
#define SYMM_THREAD_LU SSYMM_THREAD_LU
|
||||
#define SYMM_THREAD_LL SSYMM_THREAD_LL
|
||||
#define SYMM_THREAD_RU SSYMM_THREAD_RU
|
||||
@@ -717,22 +723,22 @@
|
||||
#define HEMM_THREAD_RU SHEMM_THREAD_RU
|
||||
#define HEMM_THREAD_RL SHEMM_THREAD_RL
|
||||
|
||||
#define GEMM_THREAD_NN SHGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_CN SHGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_TN SHGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_NC SHGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_NT SHGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_CC SHGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_CT SHGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_TC SHGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_TT SHGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_NR SHGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_TR SHGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_CR SHGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_RN SHGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_RT SHGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_RC SHGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_RR SHGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_NN SBGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_CN SBGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_TN SBGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_NC SBGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_NT SBGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_CC SBGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_CT SBGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_TC SBGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_TT SBGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_NR SBGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_TR SBGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_CR SBGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_RN SBGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_RT SBGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_RC SBGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_RR SBGEMM_THREAD_NN
|
||||
|
||||
#ifdef UNIT
|
||||
|
||||
@@ -2485,9 +2491,9 @@
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_IA64) || defined(ARCH_MIPS64) || defined(ARCH_ARM64)
|
||||
extern BLASLONG gemm_offset_a;
|
||||
extern BLASLONG gemm_offset_b;
|
||||
extern BLASLONG shgemm_p;
|
||||
extern BLASLONG shgemm_q;
|
||||
extern BLASLONG shgemm_r;
|
||||
extern BLASLONG sbgemm_p;
|
||||
extern BLASLONG sbgemm_q;
|
||||
extern BLASLONG sbgemm_r;
|
||||
extern BLASLONG sgemm_p;
|
||||
extern BLASLONG sgemm_q;
|
||||
extern BLASLONG sgemm_r;
|
||||
|
||||
329
common_param.h
329
common_param.h
@@ -47,120 +47,133 @@ typedef struct {
|
||||
int dtb_entries;
|
||||
int offsetA, offsetB, align;
|
||||
|
||||
#ifdef BUILD_HALF
|
||||
int shgemm_p, shgemm_q, shgemm_r;
|
||||
int shgemm_unroll_m, shgemm_unroll_n, shgemm_unroll_mn;
|
||||
#ifdef BUILD_BFLOAT16
|
||||
int sbgemm_p, sbgemm_q, sbgemm_r;
|
||||
int sbgemm_unroll_m, sbgemm_unroll_n, sbgemm_unroll_mn;
|
||||
|
||||
float (*shamax_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*shamin_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*shmax_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*shmin_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ishamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ishamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ishmax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ishmin_k) (BLASLONG, float *, BLASLONG);
|
||||
void (*sbstobf16_k) (BLASLONG, float *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
void (*sbdtobf16_k) (BLASLONG, double *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
void (*sbf16tos_k) (BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
void (*dbf16tod_k) (BLASLONG, bfloat16 *, BLASLONG, double *, BLASLONG);
|
||||
|
||||
float (*shnrm2_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*shasum_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*shsum_k) (BLASLONG, float *, BLASLONG);
|
||||
int (*shcopy_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
float (*shdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
double (*dshdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
float (*sbamax_k) (BLASLONG, float *, BLASLONG);
|
||||
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);
|
||||
|
||||
int (*shrot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
|
||||
float (*sbnrm2_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sbasum_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sbsum_k) (BLASLONG, float *, BLASLONG);
|
||||
int (*sbcopy_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
float (*sbdot_k) (BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
double (*dsbdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*shaxpy_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
int (*shscal_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
int (*shswap_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
int (*sbrot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
|
||||
|
||||
int (*shgemv_n) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*shgemv_t) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*shger_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
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 (*shsymv_L) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*shsymv_U) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sbgemv_n) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sbgemv_t) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sbger_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
|
||||
int (*shgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, bfloat16 *, float *, BLASLONG);
|
||||
int (*shgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, 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 (*shgemm_incopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*shgemm_itcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*shgemm_oncopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*shgemm_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);
|
||||
|
||||
int (*shtrsm_kernel_LN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*shtrsm_kernel_LT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*shtrsm_kernel_RN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*shtrsm_kernel_RT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*sbgemm_incopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*sbgemm_itcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*sbgemm_oncopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*sbgemm_otcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
|
||||
int (*shtrsm_iunucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_iunncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_iutucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_iutncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_ilnucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_ilnncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_iltucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_iltncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_ounucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_ounncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_outucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_outncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_olnucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_olnncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_oltucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrsm_oltncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_kernel_LN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*sbtrsm_kernel_LT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*sbtrsm_kernel_RN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*sbtrsm_kernel_RT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
|
||||
int (*shtrmm_kernel_RN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*shtrmm_kernel_RT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*shtrmm_kernel_LN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*shtrmm_kernel_LT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*sbtrsm_iunucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_iunncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_iutucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_iutncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_ilnucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_ilnncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_iltucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_iltncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_ounucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_ounncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_outucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_outncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_olnucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_olnncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_oltucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrsm_oltncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, float *);
|
||||
|
||||
int (*shtrmm_iunucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_iunncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_iutucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_iutncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_ilnucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_ilnncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_iltucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_iltncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_ounucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_ounncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_outucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_outncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_olnucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_olnncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_oltucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shtrmm_oltncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_kernel_RN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*sbtrmm_kernel_RT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*sbtrmm_kernel_LN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*sbtrmm_kernel_LT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
|
||||
int (*shsymm_iutcopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shsymm_iltcopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shsymm_outcopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*shsymm_oltcopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_iunucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_iunncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_iutucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_iutncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_ilnucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_ilnncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_iltucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_iltncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_ounucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_ounncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_outucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_outncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_olnucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_olnncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_oltucopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbtrmm_oltncopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
|
||||
int (*shneg_tcopy) (BLASLONG, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*shlaswp_ncopy) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG, blasint *, float *);
|
||||
int (*sbsymm_iutcopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbsymm_iltcopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbsymm_outcopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
int (*sbsymm_oltcopy)(BLASLONG, BLASLONG, float *, BLASLONG, BLASLONG, BLASLONG, float *);
|
||||
|
||||
int (*sbneg_tcopy) (BLASLONG, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sblaswp_ncopy) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG, blasint *, float *);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(BUILD_SINGLE) || defined(BUILD_COMPLEX)
|
||||
int sgemm_p, sgemm_q, sgemm_r;
|
||||
int sgemm_unroll_m, sgemm_unroll_n, sgemm_unroll_mn;
|
||||
#endif
|
||||
|
||||
int exclusive_cache;
|
||||
|
||||
#if defined(BUILD_SINGLE) || defined(BUILD_COMPLEX)
|
||||
float (*samax_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*samin_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*smax_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*smin_k) (BLASLONG, float *, BLASLONG);
|
||||
|
||||
BLASLONG (*isamax_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
|
||||
#ifdef BUILD_SINGLE
|
||||
float (*ssum_k) (BLASLONG, float *, BLASLONG);
|
||||
#endif
|
||||
#if defined(BUILD_SINGLE) || defined(BUILD_COMPLEX)
|
||||
int (*scopy_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
float (*sdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
double (*dsdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
//double (*dsdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*srot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
|
||||
|
||||
@@ -170,11 +183,15 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*sgemv_n) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sgemv_t) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
#endif
|
||||
#ifdef BUILD_SINGLE
|
||||
int (*sger_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
|
||||
int (*ssymv_L) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*ssymv_U) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
#endif
|
||||
|
||||
#if defined(BUILD_SINGLE) || defined(BUILD_COMPLEX)
|
||||
#ifdef ARCH_X86_64
|
||||
void (*sgemm_direct) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG , float *, BLASLONG , float * , BLASLONG);
|
||||
int (*sgemm_direct_performant) (BLASLONG M, BLASLONG N, BLASLONG K);
|
||||
@@ -188,7 +205,8 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
int (*sgemm_itcopy )(BLASLONG, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sgemm_oncopy )(BLASLONG, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sgemm_otcopy )(BLASLONG, BLASLONG, float *, BLASLONG, float *);
|
||||
|
||||
#endif
|
||||
#ifdef BUILD_SINGLE
|
||||
int (*strsm_kernel_LN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*strsm_kernel_LT)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
int (*strsm_kernel_RN)(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG, BLASLONG);
|
||||
@@ -240,10 +258,14 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*sneg_tcopy) (BLASLONG, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*slaswp_ncopy) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG, blasint *, float *);
|
||||
#endif
|
||||
|
||||
#if defined(BUILD_DOUBLE) || defined(BUILD_COMPLEX16)
|
||||
int dgemm_p, dgemm_q, dgemm_r;
|
||||
int dgemm_unroll_m, dgemm_unroll_n, dgemm_unroll_mn;
|
||||
#endif
|
||||
|
||||
#if defined(BUILD_DOUBLE) || defined(BUILD_COMPLEX16)
|
||||
double (*damax_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*damin_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*dmax_k) (BLASLONG, double *, BLASLONG);
|
||||
@@ -252,25 +274,37 @@ BLASLONG (*idamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamin_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmax_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
#endif
|
||||
|
||||
#if defined(BUILD_DOUBLE) || defined(BUILD_COMPLEX16)
|
||||
double (*dnrm2_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*dasum_k) (BLASLONG, double *, BLASLONG);
|
||||
#endif
|
||||
#ifdef BUILD_DOUBLE
|
||||
double (*dsum_k) (BLASLONG, double *, BLASLONG);
|
||||
#endif
|
||||
#if defined(BUILD_DOUBLE) || defined(BUILD_COMPLEX16)
|
||||
int (*dcopy_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
double (*ddot_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
#endif
|
||||
#if defined (BUILD_SINGLE) || defined(BUILD_DOUBLE)
|
||||
double (*dsdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
#endif
|
||||
#if defined(BUILD_DOUBLE) || defined(BUILD_COMPLEX16)
|
||||
int (*drot_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG, double, 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);
|
||||
|
||||
int (*dgemv_n) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
|
||||
int (*dgemv_t) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
|
||||
#endif
|
||||
#ifdef BUILD_DOUBLE
|
||||
int (*dger_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
|
||||
|
||||
int (*dsymv_L) (BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
|
||||
int (*dsymv_U) (BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
|
||||
|
||||
#endif
|
||||
#if defined(BUILD_DOUBLE) || defined(BUILD_COMPLEX16)
|
||||
int (*dgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, double, double *, double *, double *, BLASLONG);
|
||||
int (*dgemm_beta )(BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
|
||||
@@ -278,7 +312,8 @@ BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
int (*dgemm_itcopy )(BLASLONG, BLASLONG, double *, BLASLONG, double *);
|
||||
int (*dgemm_oncopy )(BLASLONG, BLASLONG, double *, BLASLONG, double *);
|
||||
int (*dgemm_otcopy )(BLASLONG, BLASLONG, double *, BLASLONG, double *);
|
||||
|
||||
#endif
|
||||
#ifdef BUILD_DOUBLE
|
||||
int (*dtrsm_kernel_LN)(BLASLONG, BLASLONG, BLASLONG, double, double *, double *, double *, BLASLONG, BLASLONG);
|
||||
int (*dtrsm_kernel_LT)(BLASLONG, BLASLONG, BLASLONG, double, double *, double *, double *, BLASLONG, BLASLONG);
|
||||
int (*dtrsm_kernel_RN)(BLASLONG, BLASLONG, BLASLONG, double, double *, double *, double *, BLASLONG, BLASLONG);
|
||||
@@ -330,7 +365,7 @@ BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
|
||||
int (*dneg_tcopy) (BLASLONG, BLASLONG, double *, BLASLONG, double *);
|
||||
int (*dlaswp_ncopy) (BLASLONG, BLASLONG, BLASLONG, double *, BLASLONG, blasint *, double *);
|
||||
|
||||
#endif
|
||||
#ifdef EXPRECISION
|
||||
|
||||
int qgemm_p, qgemm_q, qgemm_r;
|
||||
@@ -425,6 +460,7 @@ BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_COMPLEX
|
||||
int cgemm_p, cgemm_q, cgemm_r;
|
||||
int cgemm_unroll_m, cgemm_unroll_n, cgemm_unroll_mn;
|
||||
|
||||
@@ -588,7 +624,9 @@ BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*cneg_tcopy) (BLASLONG, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*claswp_ncopy) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG, blasint *, float *);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_COMPLEX16
|
||||
int zgemm_p, zgemm_q, zgemm_r;
|
||||
int zgemm_unroll_m, zgemm_unroll_n, zgemm_unroll_mn;
|
||||
|
||||
@@ -752,6 +790,7 @@ BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
|
||||
|
||||
int (*zneg_tcopy) (BLASLONG, BLASLONG, double *, BLASLONG, double *);
|
||||
int (*zlaswp_ncopy) (BLASLONG, BLASLONG, BLASLONG, double *, BLASLONG, blasint *, double *);
|
||||
#endif
|
||||
|
||||
#ifdef EXPRECISION
|
||||
|
||||
@@ -925,22 +964,34 @@ BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
void (*init)(void);
|
||||
|
||||
int snum_opt, dnum_opt, qnum_opt;
|
||||
|
||||
#ifdef BUILD_SINGLE
|
||||
int (*saxpby_k) (BLASLONG, float, float*, BLASLONG,float, float*, BLASLONG);
|
||||
#endif
|
||||
#ifdef BUILD_DOUBLE
|
||||
int (*daxpby_k) (BLASLONG, double, double*, BLASLONG,double, double*, BLASLONG);
|
||||
#endif
|
||||
#ifdef BUILD_COMPLEX
|
||||
int (*caxpby_k) (BLASLONG, float, float, float*, BLASLONG,float,float, float*, BLASLONG);
|
||||
#endif
|
||||
#ifdef BUILD_COMPLEX16
|
||||
int (*zaxpby_k) (BLASLONG, double, double, double*, BLASLONG,double,double, double*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_SINGLE
|
||||
int (*somatcopy_k_cn) (BLASLONG, BLASLONG, float, float*, BLASLONG, float*, BLASLONG);
|
||||
int (*somatcopy_k_ct) (BLASLONG, BLASLONG, float, float*, BLASLONG, float*, BLASLONG);
|
||||
int (*somatcopy_k_rn) (BLASLONG, BLASLONG, float, float*, BLASLONG, float*, BLASLONG);
|
||||
int (*somatcopy_k_rt) (BLASLONG, BLASLONG, float, float*, BLASLONG, float*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_DOUBLE
|
||||
int (*domatcopy_k_cn) (BLASLONG, BLASLONG, double, double*, BLASLONG, double*, BLASLONG);
|
||||
int (*domatcopy_k_ct) (BLASLONG, BLASLONG, double, double*, BLASLONG, double*, BLASLONG);
|
||||
int (*domatcopy_k_rn) (BLASLONG, BLASLONG, double, double*, BLASLONG, double*, BLASLONG);
|
||||
int (*domatcopy_k_rt) (BLASLONG, BLASLONG, double, double*, BLASLONG, double*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_COMPLEX
|
||||
int (*comatcopy_k_cn) (BLASLONG, BLASLONG, float, float, float*, BLASLONG, float*, BLASLONG);
|
||||
int (*comatcopy_k_ct) (BLASLONG, BLASLONG, float, float, float*, BLASLONG, float*, BLASLONG);
|
||||
int (*comatcopy_k_rn) (BLASLONG, BLASLONG, float, float, float*, BLASLONG, float*, BLASLONG);
|
||||
@@ -950,7 +1001,9 @@ BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
int (*comatcopy_k_ctc) (BLASLONG, BLASLONG, float, float, float*, BLASLONG, float*, BLASLONG);
|
||||
int (*comatcopy_k_rnc) (BLASLONG, BLASLONG, float, float, float*, BLASLONG, float*, BLASLONG);
|
||||
int (*comatcopy_k_rtc) (BLASLONG, BLASLONG, float, float, float*, BLASLONG, float*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_COMPLEX16
|
||||
int (*zomatcopy_k_cn) (BLASLONG, BLASLONG, double, double, double*, BLASLONG, double*, BLASLONG);
|
||||
int (*zomatcopy_k_ct) (BLASLONG, BLASLONG, double, double, double*, BLASLONG, double*, BLASLONG);
|
||||
int (*zomatcopy_k_rn) (BLASLONG, BLASLONG, double, double, double*, BLASLONG, double*, BLASLONG);
|
||||
@@ -960,17 +1013,23 @@ BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
int (*zomatcopy_k_ctc) (BLASLONG, BLASLONG, double, double, double*, BLASLONG, double*, BLASLONG);
|
||||
int (*zomatcopy_k_rnc) (BLASLONG, BLASLONG, double, double, double*, BLASLONG, double*, BLASLONG);
|
||||
int (*zomatcopy_k_rtc) (BLASLONG, BLASLONG, double, double, double*, BLASLONG, double*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_SINGLE
|
||||
int (*simatcopy_k_cn) (BLASLONG, BLASLONG, float, float*, BLASLONG);
|
||||
int (*simatcopy_k_ct) (BLASLONG, BLASLONG, float, float*, BLASLONG);
|
||||
int (*simatcopy_k_rn) (BLASLONG, BLASLONG, float, float*, BLASLONG);
|
||||
int (*simatcopy_k_rt) (BLASLONG, BLASLONG, float, float*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_DOUBLE
|
||||
int (*dimatcopy_k_cn) (BLASLONG, BLASLONG, double, double*, BLASLONG);
|
||||
int (*dimatcopy_k_ct) (BLASLONG, BLASLONG, double, double*, BLASLONG);
|
||||
int (*dimatcopy_k_rn) (BLASLONG, BLASLONG, double, double*, BLASLONG);
|
||||
int (*dimatcopy_k_rt) (BLASLONG, BLASLONG, double, double*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_COMPLEX
|
||||
int (*cimatcopy_k_cn) (BLASLONG, BLASLONG, float, float, float*, BLASLONG);
|
||||
int (*cimatcopy_k_ct) (BLASLONG, BLASLONG, float, float, float*, BLASLONG);
|
||||
int (*cimatcopy_k_rn) (BLASLONG, BLASLONG, float, float, float*, BLASLONG);
|
||||
@@ -980,7 +1039,9 @@ BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
int (*cimatcopy_k_ctc) (BLASLONG, BLASLONG, float, float, float*, BLASLONG);
|
||||
int (*cimatcopy_k_rnc) (BLASLONG, BLASLONG, float, float, float*, BLASLONG);
|
||||
int (*cimatcopy_k_rtc) (BLASLONG, BLASLONG, float, float, float*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_COMPLEX16
|
||||
int (*zimatcopy_k_cn) (BLASLONG, BLASLONG, double, double, double*, BLASLONG);
|
||||
int (*zimatcopy_k_ct) (BLASLONG, BLASLONG, double, double, double*, BLASLONG);
|
||||
int (*zimatcopy_k_rn) (BLASLONG, BLASLONG, double, double, double*, BLASLONG);
|
||||
@@ -990,12 +1051,20 @@ BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
int (*zimatcopy_k_ctc) (BLASLONG, BLASLONG, double, double, double*, BLASLONG);
|
||||
int (*zimatcopy_k_rnc) (BLASLONG, BLASLONG, double, double, double*, BLASLONG);
|
||||
int (*zimatcopy_k_rtc) (BLASLONG, BLASLONG, double, double, double*, BLASLONG);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_SINGLE
|
||||
int (*sgeadd_k) (BLASLONG, BLASLONG, float, float *, BLASLONG, float, float *, BLASLONG);
|
||||
#endif
|
||||
#ifdef BUILD_DOUBLE
|
||||
int (*dgeadd_k) (BLASLONG, BLASLONG, double, double *, BLASLONG, double, double *, BLASLONG);
|
||||
#endif
|
||||
#ifdef BUILD_COMPLEX
|
||||
int (*cgeadd_k) (BLASLONG, BLASLONG, float, float, float *, BLASLONG, float, float, float *, BLASLONG);
|
||||
#endif
|
||||
#ifdef BUILD_COMPLEX16
|
||||
int (*zgeadd_k) (BLASLONG, BLASLONG, double, double, double *, BLASLONG, double, double, double *, BLASLONG);
|
||||
|
||||
#endif
|
||||
} gotoblas_t;
|
||||
|
||||
extern gotoblas_t *gotoblas;
|
||||
@@ -1007,28 +1076,32 @@ extern gotoblas_t *gotoblas;
|
||||
|
||||
#define HAVE_EX_L2 gotoblas -> exclusive_cache
|
||||
|
||||
#ifdef BUILD_HALF
|
||||
#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
|
||||
#ifdef BUILD_BFLOAT16
|
||||
#define SBGEMM_P gotoblas -> sbgemm_p
|
||||
#define SBGEMM_Q gotoblas -> sbgemm_q
|
||||
#define SBGEMM_R gotoblas -> sbgemm_r
|
||||
#define SBGEMM_UNROLL_M gotoblas -> sbgemm_unroll_m
|
||||
#define SBGEMM_UNROLL_N gotoblas -> sbgemm_unroll_n
|
||||
#define SBGEMM_UNROLL_MN gotoblas -> sbgemm_unroll_mn
|
||||
#endif
|
||||
|
||||
#if defined (BUILD_SINGLE)
|
||||
#define SGEMM_P gotoblas -> sgemm_p
|
||||
#define SGEMM_Q gotoblas -> sgemm_q
|
||||
#define SGEMM_R gotoblas -> sgemm_r
|
||||
#define SGEMM_UNROLL_M gotoblas -> sgemm_unroll_m
|
||||
#define SGEMM_UNROLL_N gotoblas -> sgemm_unroll_n
|
||||
#define SGEMM_UNROLL_MN gotoblas -> sgemm_unroll_mn
|
||||
#endif
|
||||
|
||||
#if defined (BUILD_DOUBLE)
|
||||
#define DGEMM_P gotoblas -> dgemm_p
|
||||
#define DGEMM_Q gotoblas -> dgemm_q
|
||||
#define DGEMM_R gotoblas -> dgemm_r
|
||||
#define DGEMM_UNROLL_M gotoblas -> dgemm_unroll_m
|
||||
#define DGEMM_UNROLL_N gotoblas -> dgemm_unroll_n
|
||||
#define DGEMM_UNROLL_MN gotoblas -> dgemm_unroll_mn
|
||||
#endif
|
||||
|
||||
#define QGEMM_P gotoblas -> qgemm_p
|
||||
#define QGEMM_Q gotoblas -> qgemm_q
|
||||
@@ -1037,19 +1110,39 @@ extern gotoblas_t *gotoblas;
|
||||
#define QGEMM_UNROLL_N gotoblas -> qgemm_unroll_n
|
||||
#define QGEMM_UNROLL_MN gotoblas -> qgemm_unroll_mn
|
||||
|
||||
#ifdef BUILD_COMPLEX
|
||||
#define CGEMM_P gotoblas -> cgemm_p
|
||||
#define CGEMM_Q gotoblas -> cgemm_q
|
||||
#define CGEMM_R gotoblas -> cgemm_r
|
||||
#define CGEMM_UNROLL_M gotoblas -> cgemm_unroll_m
|
||||
#define CGEMM_UNROLL_N gotoblas -> cgemm_unroll_n
|
||||
#define CGEMM_UNROLL_MN gotoblas -> cgemm_unroll_mn
|
||||
#ifndef BUILD_SINGLE
|
||||
#define SGEMM_P gotoblas -> sgemm_p
|
||||
#define SGEMM_Q gotoblas -> sgemm_q
|
||||
#define SGEMM_R 1024
|
||||
#define SGEMM_UNROLL_M gotoblas -> sgemm_unroll_m
|
||||
#define SGEMM_UNROLL_N gotoblas -> sgemm_unroll_n
|
||||
#define SGEMM_UNROLL_MN gotoblas -> sgemm_unroll_mn
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_COMPLEX16
|
||||
#define ZGEMM_P gotoblas -> zgemm_p
|
||||
#define ZGEMM_Q gotoblas -> zgemm_q
|
||||
#define ZGEMM_R gotoblas -> zgemm_r
|
||||
#define ZGEMM_UNROLL_M gotoblas -> zgemm_unroll_m
|
||||
#define ZGEMM_UNROLL_N gotoblas -> zgemm_unroll_n
|
||||
#define ZGEMM_UNROLL_MN gotoblas -> zgemm_unroll_mn
|
||||
#ifndef BUILD_DOUBLE
|
||||
#define DGEMM_P gotoblas -> dgemm_p
|
||||
#define DGEMM_Q gotoblas -> dgemm_q
|
||||
#define DGEMM_R 1024
|
||||
#define DGEMM_UNROLL_M gotoblas -> dgemm_unroll_m
|
||||
#define DGEMM_UNROLL_N gotoblas -> dgemm_unroll_n
|
||||
#define DGEMM_UNROLL_MN gotoblas -> dgemm_unroll_mn
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define XGEMM_P gotoblas -> xgemm_p
|
||||
#define XGEMM_Q gotoblas -> xgemm_q
|
||||
@@ -1093,16 +1186,16 @@ extern gotoblas_t *gotoblas;
|
||||
#define HAVE_EX_L2 0
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_HALF
|
||||
#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
|
||||
#ifdef BUILD_BFLOAT16
|
||||
#define SBGEMM_P SBGEMM_DEFAULT_P
|
||||
#define SBGEMM_Q SBGEMM_DEFAULT_Q
|
||||
#define SBGEMM_R SBGEMM_DEFAULT_R
|
||||
#define SBGEMM_UNROLL_M SBGEMM_DEFAULT_UNROLL_M
|
||||
#define SBGEMM_UNROLL_N SBGEMM_DEFAULT_UNROLL_N
|
||||
#ifdef SBGEMM_DEFAULT_UNROLL_MN
|
||||
#define SBGEMM_UNROLL_MN SBGEMM_DEFAULT_UNROLL_MN
|
||||
#else
|
||||
#define SHGEMM_UNROLL_MN MAX((SHGEMM_UNROLL_M), (SHGEMM_UNROLL_N))
|
||||
#define SBGEMM_UNROLL_MN MAX((SBGEMM_UNROLL_M), (SBGEMM_UNROLL_N))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1241,18 +1334,18 @@ 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(HALF)
|
||||
#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)
|
||||
#define GEMM_P SBGEMM_P
|
||||
#define GEMM_Q SBGEMM_Q
|
||||
#define GEMM_R SBGEMM_R
|
||||
#define GEMM_UNROLL_M SBGEMM_UNROLL_M
|
||||
#define GEMM_UNROLL_N SBGEMM_UNROLL_N
|
||||
#define GEMM_UNROLL_MN SBGEMM_UNROLL_MN
|
||||
#define GEMM_DEFAULT_P SBGEMM_DEFAULT_P
|
||||
#define GEMM_DEFAULT_Q SBGEMM_DEFAULT_Q
|
||||
#define GEMM_DEFAULT_R SBGEMM_DEFAULT_R
|
||||
#define GEMM_DEFAULT_UNROLL_M SBGEMM_DEFAULT_UNROLL_M
|
||||
#define GEMM_DEFAULT_UNROLL_N SBGEMM_DEFAULT_UNROLL_N
|
||||
#else
|
||||
#define GEMM_P SGEMM_P
|
||||
#define GEMM_Q SGEMM_Q
|
||||
@@ -1338,8 +1431,8 @@ extern gotoblas_t *gotoblas;
|
||||
#define GEMM_THREAD gemm_thread_n
|
||||
#endif
|
||||
|
||||
#ifndef SHGEMM_DEFAULT_R
|
||||
#define SHGEMM_DEFAULT_R (((BUFFER_SIZE - ((SHGEMM_DEFAULT_P * SHGEMM_DEFAULT_Q * 4 + GEMM_DEFAULT_OFFSET_A + GEMM_DEFAULT_ALIGN) & ~GEMM_DEFAULT_ALIGN)) / (SHGEMM_DEFAULT_Q * 4) - 15) & ~15UL)
|
||||
#ifndef SBGEMM_DEFAULT_R
|
||||
#define SBGEMM_DEFAULT_R (((BUFFER_SIZE - ((SBGEMM_DEFAULT_P * SBGEMM_DEFAULT_Q * 4 + GEMM_DEFAULT_OFFSET_A + GEMM_DEFAULT_ALIGN) & ~GEMM_DEFAULT_ALIGN)) / (SBGEMM_DEFAULT_Q * 4) - 15) & ~15UL)
|
||||
#endif
|
||||
|
||||
#ifndef SGEMM_DEFAULT_R
|
||||
|
||||
@@ -844,8 +844,8 @@ Lmcount$lazy_ptr:
|
||||
#define BUFFER_SIZE ( 2 << 20)
|
||||
#elif defined(PPC440FP2)
|
||||
#define BUFFER_SIZE ( 16 << 20)
|
||||
#elif defined(POWER8) || defined(POWER9) || defined(POWER10)
|
||||
#define BUFFER_SIZE ( 64 << 20)
|
||||
#elif defined(POWER6) || defined(POWER8) || defined(POWER9) || defined(POWER10)
|
||||
#define BUFFER_SIZE ( 64 << 22)
|
||||
#else
|
||||
#define BUFFER_SIZE ( 16 << 20)
|
||||
#endif
|
||||
|
||||
77
common_sb.h
Normal file
77
common_sb.h
Normal file
@@ -0,0 +1,77 @@
|
||||
#ifndef COMMON_SB_H
|
||||
#define COMMON_SB_H
|
||||
|
||||
#ifndef DYNAMIC_ARCH
|
||||
|
||||
#define SBDOT_K sbdot_k
|
||||
#define SBSTOBF16_K sbstobf16_k
|
||||
#define SBDTOBF16_K sbdtobf16_k
|
||||
#define SBF16TOS_K sbf16tos_k
|
||||
#define DBF16TOD_K dbf16tod_k
|
||||
|
||||
#define SBGEMM_ONCOPY sbgemm_oncopy
|
||||
#define SBGEMM_OTCOPY sbgemm_otcopy
|
||||
|
||||
#if SBGEMM_DEFAULT_UNROLL_M == SBGEMM_DEFAULT_UNROLL_N
|
||||
#define SBGEMM_INCOPY sbgemm_oncopy
|
||||
#define SBGEMM_ITCOPY sbgemm_otcopy
|
||||
#else
|
||||
#define SBGEMM_INCOPY sbgemm_incopy
|
||||
#define SBGEMM_ITCOPY sbgemm_itcopy
|
||||
#endif
|
||||
#define SBGEMM_BETA sbgemm_beta
|
||||
#define SBGEMM_KERNEL sbgemm_kernel
|
||||
|
||||
#else
|
||||
|
||||
#define SBDOT_K gotoblas -> sbdot_k
|
||||
#define SBSTOBF16_K gotoblas -> sbstobf16_k
|
||||
#define SBDTOBF16_K gotoblas -> sbdtobf16_k
|
||||
#define SBF16TOS_K gotoblas -> sbf16tos_k
|
||||
#define DBF16TOD_K gotoblas -> dbf16tod_k
|
||||
|
||||
#define SBGEMM_ONCOPY gotoblas -> sbgemm_oncopy
|
||||
#define SBGEMM_OTCOPY gotoblas -> sbgemm_otcopy
|
||||
#define SBGEMM_INCOPY gotoblas -> sbgemm_incopy
|
||||
#define SBGEMM_ITCOPY gotoblas -> sbgemm_itcopy
|
||||
#define SBGEMM_BETA gotoblas -> sbgemm_beta
|
||||
#define SBGEMM_KERNEL gotoblas -> sbgemm_kernel
|
||||
|
||||
#endif
|
||||
|
||||
#define SBGEMM_NN sbgemm_nn
|
||||
#define SBGEMM_CN sbgemm_tn
|
||||
#define SBGEMM_TN sbgemm_tn
|
||||
#define SBGEMM_NC sbgemm_nt
|
||||
#define SBGEMM_NT sbgemm_nt
|
||||
#define SBGEMM_CC sbgemm_tt
|
||||
#define SBGEMM_CT sbgemm_tt
|
||||
#define SBGEMM_TC sbgemm_tt
|
||||
#define SBGEMM_TT sbgemm_tt
|
||||
#define SBGEMM_NR sbgemm_nn
|
||||
#define SBGEMM_TR sbgemm_tn
|
||||
#define SBGEMM_CR sbgemm_tn
|
||||
#define SBGEMM_RN sbgemm_nn
|
||||
#define SBGEMM_RT sbgemm_nt
|
||||
#define SBGEMM_RC sbgemm_nt
|
||||
#define SBGEMM_RR sbgemm_nn
|
||||
|
||||
#define SBGEMM_THREAD_NN sbgemm_thread_nn
|
||||
#define SBGEMM_THREAD_CN sbgemm_thread_tn
|
||||
#define SBGEMM_THREAD_TN sbgemm_thread_tn
|
||||
#define SBGEMM_THREAD_NC sbgemm_thread_nt
|
||||
#define SBGEMM_THREAD_NT sbgemm_thread_nt
|
||||
#define SBGEMM_THREAD_CC sbgemm_thread_tt
|
||||
#define SBGEMM_THREAD_CT sbgemm_thread_tt
|
||||
#define SBGEMM_THREAD_TC sbgemm_thread_tt
|
||||
#define SBGEMM_THREAD_TT sbgemm_thread_tt
|
||||
#define SBGEMM_THREAD_NR sbgemm_thread_nn
|
||||
#define SBGEMM_THREAD_TR sbgemm_thread_tn
|
||||
#define SBGEMM_THREAD_CR sbgemm_thread_tn
|
||||
#define SBGEMM_THREAD_RN sbgemm_thread_nn
|
||||
#define SBGEMM_THREAD_RT sbgemm_thread_nt
|
||||
#define SBGEMM_THREAD_RC sbgemm_thread_nt
|
||||
#define SBGEMM_THREAD_RR sbgemm_thread_nn
|
||||
|
||||
#endif
|
||||
|
||||
65
common_sh.h
65
common_sh.h
@@ -1,65 +0,0 @@
|
||||
#ifndef COMMON_SH_H
|
||||
#define COMMON_SH_H
|
||||
|
||||
#ifndef DYNAMIC_ARCH
|
||||
|
||||
#define SHGEMM_ONCOPY shgemm_oncopy
|
||||
#define SHGEMM_OTCOPY shgemm_otcopy
|
||||
|
||||
#if SHGEMM_DEFAULT_UNROLL_M == SHGEMM_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
|
||||
|
||||
#define SHGEMM_ONCOPY gotoblas -> shgemm_oncopy
|
||||
#define SHGEMM_OTCOPY gotoblas -> shgemm_otcopy
|
||||
#define SHGEMM_INCOPY gotoblas -> shgemm_incopy
|
||||
#define SHGEMM_ITCOPY gotoblas -> shgemm_itcopy
|
||||
#define SHGEMM_BETA gotoblas -> shgemm_beta
|
||||
#define SHGEMM_KERNEL gotoblas -> shgemm_kernel
|
||||
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
@@ -59,12 +59,19 @@ extern int blas_omp_linked;
|
||||
#define BLAS_PTHREAD 0x4000U
|
||||
#define BLAS_NODE 0x2000U
|
||||
|
||||
#define BLAS_PREC 0x0003U
|
||||
#define BLAS_SINGLE 0x0000U
|
||||
#define BLAS_DOUBLE 0x0001U
|
||||
#define BLAS_XDOUBLE 0x0002U
|
||||
#define BLAS_REAL 0x0000U
|
||||
#define BLAS_COMPLEX 0x0004U
|
||||
#define BLAS_PREC 0x000FU
|
||||
#define BLAS_INT8 0x0000U
|
||||
#define BLAS_BFLOAT16 0x0001U
|
||||
#define BLAS_SINGLE 0x0002U
|
||||
#define BLAS_DOUBLE 0x0003U
|
||||
#define BLAS_XDOUBLE 0x0004U
|
||||
#define BLAS_STOBF16 0x0008U
|
||||
#define BLAS_DTOBF16 0x0009U
|
||||
#define BLAS_BF16TOS 0x000AU
|
||||
#define BLAS_BF16TOD 0x000BU
|
||||
|
||||
#define BLAS_REAL 0x0000U
|
||||
#define BLAS_COMPLEX 0x1000U
|
||||
|
||||
#define BLAS_TRANSA 0x0030U /* 2bit */
|
||||
#define BLAS_TRANSA_N 0x0000U
|
||||
|
||||
@@ -142,6 +142,29 @@ static __inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx){
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, int *edx)
|
||||
{
|
||||
#ifdef C_MSVC
|
||||
int cpuInfo[4] = {-1};
|
||||
__cpuidex(cpuInfo, op, count);
|
||||
*eax = cpuInfo[0];
|
||||
*ebx = cpuInfo[1];
|
||||
*ecx = cpuInfo[2];
|
||||
*edx = cpuInfo[3];
|
||||
#else
|
||||
#if defined(__i386__) && defined(__PIC__)
|
||||
__asm__ __volatile__
|
||||
("mov %%ebx, %%edi;"
|
||||
"cpuid;"
|
||||
"xchgl %%ebx, %%edi;"
|
||||
: "=a" (*eax), "=D" (*ebx), "=c" (*ecx), "=d" (*edx) : "0" (op), "2" (count) : "cc");
|
||||
#else
|
||||
__asm__ __volatile__
|
||||
("cpuid": "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) : "0" (op), "2" (count) : "cc");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
#define WHEREAMI
|
||||
*/
|
||||
|
||||
23
cpp_thread_test/CMakeLists.txt
Normal file
23
cpp_thread_test/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
include_directories(${PROJECT_SOURCE_DIR})
|
||||
include_directories(${PROJECT_BINARY_DIR})
|
||||
|
||||
enable_language(CXX)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -DADD${BU} -DCBLAS")
|
||||
|
||||
if (USE_OPENMP)
|
||||
if (CPP_THREAD_SAFETY_TEST)
|
||||
message(STATUS building thread safety test)
|
||||
add_executable(dgemm_thread_safety dgemm_thread_safety.cpp)
|
||||
target_link_libraries(dgemm_thread_safety ${OpenBLAS_LIBNAME})
|
||||
add_test( dgemm_thread_safety ${CMAKE_CURRENT_BINARY_DIR}/dgemm_thread_safety)
|
||||
endif()
|
||||
|
||||
|
||||
if (CPP_THREAD_SAFETY_TEST OR CPP_THREAD_SAFETY_GEMV)
|
||||
add_executable(dgemv_thread_safety dgemv_thread_safety.cpp)
|
||||
target_link_libraries(dgemv_thread_safety ${OpenBLAS_LIBNAME})
|
||||
add_test(dgemv_thread_safety ${CMAKE_CURRENT_BINARY_DIR}/dgemv_thread_safety)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
@@ -54,7 +54,7 @@ static char *cpuname_lower[] = {
|
||||
int get_feature(char *search)
|
||||
{
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
@@ -90,7 +90,7 @@ int get_feature(char *search)
|
||||
int detect(void)
|
||||
{
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
|
||||
FILE *infile;
|
||||
char buffer[512], *p;
|
||||
@@ -289,7 +289,7 @@ void get_libname(void)
|
||||
void get_features(void)
|
||||
{
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#ifdef OS_DARWIN
|
||||
#include <sys/sysctl.h>
|
||||
int32_t value;
|
||||
size_t length=sizeof(value);
|
||||
#endif
|
||||
|
||||
#define CPU_UNKNOWN 0
|
||||
#define CPU_ARMV8 1
|
||||
@@ -45,6 +50,8 @@
|
||||
#define CPU_TSV110 9
|
||||
// Ampere
|
||||
#define CPU_EMAG8180 10
|
||||
// Apple
|
||||
#define CPU_VORTEX 13
|
||||
|
||||
static char *cpuname[] = {
|
||||
"UNKNOWN",
|
||||
@@ -59,7 +66,8 @@ static char *cpuname[] = {
|
||||
"TSV110",
|
||||
"EMAG8180",
|
||||
"NEOVERSEN1",
|
||||
"THUNDERX3T110"
|
||||
"THUNDERX3T110",
|
||||
"VORTEX"
|
||||
};
|
||||
|
||||
static char *cpuname_lower[] = {
|
||||
@@ -75,13 +83,14 @@ static char *cpuname_lower[] = {
|
||||
"tsv110",
|
||||
"emag8180",
|
||||
"neoversen1",
|
||||
"thunderx3t110"
|
||||
"thunderx3t110",
|
||||
"vortex"
|
||||
};
|
||||
|
||||
int get_feature(char *search)
|
||||
{
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
@@ -117,7 +126,7 @@ int get_feature(char *search)
|
||||
int detect(void)
|
||||
{
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
|
||||
FILE *infile;
|
||||
char buffer[512], *p, *cpu_part = NULL, *cpu_implementer = NULL;
|
||||
@@ -197,6 +206,12 @@ int detect(void)
|
||||
|
||||
|
||||
}
|
||||
#else
|
||||
#ifdef DARWIN
|
||||
sysctlbyname("hw.cpufamily",&value,&length,NULL,0);
|
||||
if (value ==131287967) return CPU_VORTEX;
|
||||
#endif
|
||||
return CPU_ARMV8;
|
||||
#endif
|
||||
|
||||
return CPU_UNKNOWN;
|
||||
@@ -227,7 +242,7 @@ void get_cpucount(void)
|
||||
{
|
||||
int n=0;
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
@@ -245,7 +260,10 @@ int n=0;
|
||||
|
||||
printf("#define NUM_CORES %d\n",n);
|
||||
#endif
|
||||
|
||||
#ifdef DARWIN
|
||||
sysctlbyname("hw.physicalcpu_max",&value,&length,NULL,0);
|
||||
printf("#define NUM_CORES %d\n",value);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -396,6 +414,19 @@ void get_cpuconfig(void)
|
||||
printf("#define DTB_DEFAULT_ENTRIES 64 \n");
|
||||
printf("#define DTB_SIZE 4096 \n");
|
||||
break;
|
||||
#ifdef DARWIN
|
||||
case CPU_VORTEX:
|
||||
printf("#define VORTEX \n");
|
||||
sysctlbyname("hw.l1icachesize",&value,&length,NULL,0);
|
||||
printf("#define L1_CODE_SIZE %d \n",value);
|
||||
sysctlbyname("hw.cachelinesize",&value,&length,NULL,0);
|
||||
printf("#define L1_CODE_LINESIZE %d \n",value);
|
||||
sysctlbyname("hw.l1dcachesize",&value,&length,NULL,0);
|
||||
printf("#define L1_DATA_SIZE %d \n",value);
|
||||
sysctlbyname("hw.l2dcachesize",&value,&length,NULL,0);
|
||||
printf("#define L2_SIZE %d \n",value);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
get_cpucount();
|
||||
}
|
||||
@@ -410,7 +441,7 @@ void get_libname(void)
|
||||
void get_features(void)
|
||||
{
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
|
||||
@@ -84,7 +84,7 @@ static char *cpuname[] = {
|
||||
|
||||
int detect(void){
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[512], *p;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ static char *cpuname[] = {
|
||||
|
||||
int detect(void){
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[512], *p;
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ char *corename[] = {
|
||||
|
||||
int detect(void){
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[512], *p;
|
||||
|
||||
@@ -214,6 +214,8 @@ switch ( id >> 16 ) {
|
||||
return CPUTYPE_UNKNOWN;
|
||||
}
|
||||
#endif
|
||||
|
||||
return CPUTYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
void get_architecture(void){
|
||||
|
||||
@@ -12,7 +12,7 @@ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.sh
|
||||
foreach(float_type ${FLOAT_TYPES})
|
||||
string(SUBSTRING ${float_type} 0 1 float_char_upper)
|
||||
string(TOLOWER ${float_char_upper} float_char)
|
||||
if (${float_char} STREQUAL "h")
|
||||
if (${float_char} STREQUAL "b")
|
||||
continue()
|
||||
endif()
|
||||
#level1
|
||||
|
||||
119
ctest/Makefile
119
ctest/Makefile
@@ -46,56 +46,155 @@ else
|
||||
all :: all1 all2 all3
|
||||
endif
|
||||
|
||||
all1: xscblat1 xdcblat1 xccblat1 xzcblat1
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
all1targets += xscblat1
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
all1targets += xdcblat1
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
all1targets += xccblat1
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
all1targets += xzcblat1
|
||||
endif
|
||||
|
||||
all1: $(all1targets)
|
||||
|
||||
ifndef CROSS
|
||||
ifeq ($(USE_OPENMP), 1)
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
OMP_NUM_THREADS=2 ./xscblat1
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
OMP_NUM_THREADS=2 ./xdcblat1
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
OMP_NUM_THREADS=2 ./xccblat1
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
OMP_NUM_THREADS=2 ./xzcblat1
|
||||
endif
|
||||
else
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xscblat1
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xdcblat1
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xccblat1
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xzcblat1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
all2targets += xscblat2
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
all2targets += xdcblat2
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
all2targets += xccblat2
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
all2targets += xzcblat2
|
||||
endif
|
||||
|
||||
all2: $(all2targets)
|
||||
|
||||
all2: xscblat2 xdcblat2 xccblat2 xzcblat2
|
||||
ifndef CROSS
|
||||
ifeq ($(USE_OPENMP), 1)
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
OMP_NUM_THREADS=2 ./xscblat2 < sin2
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
OMP_NUM_THREADS=2 ./xdcblat2 < din2
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
OMP_NUM_THREADS=2 ./xccblat2 < cin2
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
OMP_NUM_THREADS=2 ./xzcblat2 < zin2
|
||||
endif
|
||||
else
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xscblat2 < sin2
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xdcblat2 < din2
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xccblat2 < cin2
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xzcblat2 < zin2
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
all3targets += xscblat3
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
all3targets += xdcblat3
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
all3targets += xccblat3
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
all3targets += xzcblat3
|
||||
endif
|
||||
|
||||
all3: $(all3targets)
|
||||
|
||||
all3: xscblat3 xdcblat3 xccblat3 xzcblat3
|
||||
ifndef CROSS
|
||||
ifeq ($(USE_OPENMP), 1)
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
OMP_NUM_THREADS=2 ./xscblat3 < sin3
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
OMP_NUM_THREADS=2 ./xdcblat3 < din3
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
OMP_NUM_THREADS=2 ./xccblat3 < cin3
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
OMP_NUM_THREADS=2 ./xzcblat3 < zin3
|
||||
endif
|
||||
else
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xscblat3 < sin3
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xdcblat3 < din3
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xccblat3 < cin3
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
all3_3m: xzcblat3_3m xccblat3_3m
|
||||
ifeq ($(USE_OPENMP), 1)
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
OMP_NUM_THREADS=2 ./xccblat3_3m < cin3_3m
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
OMP_NUM_THREADS=2 ./xzcblat3_3m < zin3_3m
|
||||
endif
|
||||
else
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xccblat3_3m < cin3_3m
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
OPENBLAS_NUM_THREADS=2 ./xzcblat3_3m < zin3_3m
|
||||
endif
|
||||
endif
|
||||
@@ -115,13 +214,19 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
# Single real
|
||||
xscblat1: $(stestl1o) c_sblat1.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
|
||||
xscblat2: $(stestl2o) c_sblat2.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
|
||||
xscblat3: $(stestl3o) c_sblat3.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
# Double real
|
||||
xdcblat1: $(dtestl1o) c_dblat1.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
@@ -129,7 +234,10 @@ xdcblat2: $(dtestl2o) c_dblat2.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
xdcblat3: $(dtestl3o) c_dblat3.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
# Single complex
|
||||
xccblat1: $(ctestl1o) c_cblat1.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
@@ -140,7 +248,10 @@ xccblat3: $(ctestl3o) c_cblat3.o $(TOPDIR)/$(LIBNAME)
|
||||
|
||||
xccblat3_3m: $(ctestl3o_3m) c_cblat3_3m.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xccblat3_3m c_cblat3_3m.o $(ctestl3o_3m) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
# Double complex
|
||||
xzcblat1: $(ztestl1o) c_zblat1.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
@@ -152,6 +263,6 @@ xzcblat3: $(ztestl3o) c_zblat3.o $(TOPDIR)/$(LIBNAME)
|
||||
|
||||
xzcblat3_3m: $(ztestl3o_3m) c_zblat3_3m.o $(TOPDIR)/$(LIBNAME)
|
||||
$(FC) $(FLDFLAGS) -o xzcblat3_3m c_zblat3_3m.o $(ztestl3o_3m) $(LIB) $(EXTRALIB) $(CEXTRALIB)
|
||||
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/Makefile.tail
|
||||
|
||||
@@ -74,16 +74,6 @@ void F77_dswap( const int *N, double *X, const int *incX,
|
||||
return;
|
||||
}
|
||||
|
||||
double F77_dzasum(const int *N, void *X, const int *incX)
|
||||
{
|
||||
return cblas_dzasum(*N, X, *incX);
|
||||
}
|
||||
|
||||
double F77_dznrm2(const int *N, OPENBLAS_CONST void *X, const int *incX)
|
||||
{
|
||||
return cblas_dznrm2(*N, X, *incX);
|
||||
}
|
||||
|
||||
int F77_idamax(const int *N, OPENBLAS_CONST double *X, const int *incX)
|
||||
{
|
||||
if (*N < 1 || *incX < 1) return(0);
|
||||
|
||||
@@ -21,16 +21,6 @@ void F77_saxpy(blasint *N, const float *alpha, OPENBLAS_CONST float *X,
|
||||
return;
|
||||
}
|
||||
|
||||
float F77_scasum(blasint *N, float *X, blasint *incX)
|
||||
{
|
||||
return cblas_scasum(*N, X, *incX);
|
||||
}
|
||||
|
||||
float F77_scnrm2(blasint *N, OPENBLAS_CONST float *X, blasint *incX)
|
||||
{
|
||||
return cblas_scnrm2(*N, X, *incX);
|
||||
}
|
||||
|
||||
void F77_scopy(blasint *N, OPENBLAS_CONST float *X, blasint *incX,
|
||||
float *Y, blasint *incY)
|
||||
{
|
||||
|
||||
@@ -197,6 +197,19 @@ foreach (float_type ${FLOAT_TYPES})
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
if ( BUILD_COMPLEX AND NOT BUILD_SINGLE)
|
||||
if (USE_THREAD)
|
||||
GenerateNamedObjects("gemv_thread.c" "" "gemv_thread_n" false "" "" false "SINGLE")
|
||||
GenerateNamedObjects("gemv_thread.c" "TRANSA" "gemv_thread_t" false "" "" false "SINGLE")
|
||||
endif ()
|
||||
endif ()
|
||||
if ( BUILD_COMPLEX16 AND NOT BUILD_DOUBLE)
|
||||
if (USE_THREAD)
|
||||
GenerateNamedObjects("gemv_thread.c" "" "gemv_thread_n" false "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("gemv_thread.c" "TRANSA" "gemv_thread_t" false "" "" false "DOUBLE")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (USE_THREAD)
|
||||
GenerateCombinationObjects("${UL_SMP_SOURCES}" "LOWER" "U" "" 2)
|
||||
endif ()
|
||||
|
||||
@@ -417,19 +417,63 @@ XBLASOBJS += \
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_SINGLE),1)
|
||||
SBLASOBJS=
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
ifdef SMP
|
||||
SBLASOBJS += \
|
||||
sgemv_thread_n.$(SUFFIX) sgemv_thread_t.$(SUFFIX) \
|
||||
strsv_NUU.$(SUFFIX) strsv_NUN.$(SUFFIX) strsv_NLU.$(SUFFIX) strsv_NLN.$(SUFFIX) \
|
||||
strsv_TUU.$(SUFFIX) strsv_TUN.$(SUFFIX) strsv_TLU.$(SUFFIX) strsv_TLN.$(SUFFIX)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
ifdef SMP
|
||||
SBLASOBJS = sgemv_thread_n.$(SUFFIX) sgemv_thread_t.$(SUFFIX)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(BUILD_DOUBLE),1)
|
||||
DBLASOBJS=
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
ifdef SMP
|
||||
DBLASOBJS = dgemv_thread_n.$(SUFFIX) dgemv_thread_t.$(SUFFIX)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(BUILD_COMPLEX),1)
|
||||
CBLASOBJS=
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
CBLASOBJS= \
|
||||
ctrsv_NUU.$(SUFFIX) ctrsv_NUN.$(SUFFIX) ctrsv_NLU.$(SUFFIX) ctrsv_NLN.$(SUFFIX) \
|
||||
ctrsv_TUU.$(SUFFIX) ctrsv_TUN.$(SUFFIX) ctrsv_TLU.$(SUFFIX) ctrsv_TLN.$(SUFFIX) \
|
||||
ctrsv_RUU.$(SUFFIX) ctrsv_RUN.$(SUFFIX) ctrsv_RLU.$(SUFFIX) ctrsv_RLN.$(SUFFIX) \
|
||||
ctrsv_CUU.$(SUFFIX) ctrsv_CUN.$(SUFFIX) ctrsv_CLU.$(SUFFIX) ctrsv_CLN.$(SUFFIX)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(BUILD_COMPLEX16),1)
|
||||
ZBLASOBJS=
|
||||
endif
|
||||
|
||||
all ::
|
||||
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
|
||||
sgbmv_n.$(SUFFIX) sgbmv_n.$(PSUFFIX) : gbmv_k.c
|
||||
$(CC) -c -UCOMPLEX -UDOUBLE -UTRANS $(CFLAGS) -o $(@F) $<
|
||||
|
||||
sgbmv_t.$(SUFFIX) sgbmv_t.$(PSUFFIX) : gbmv_k.c
|
||||
$(CC) -c -UCOMPLEX -UDOUBLE -DTRANS $(CFLAGS) -o $(@F) $<
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
|
||||
dgbmv_n.$(SUFFIX) dgbmv_n.$(PSUFFIX) : gbmv_k.c
|
||||
$(CC) -c -UCOMPLEX -DDOUBLE -UTRANS $(CFLAGS) -o $(@F) $<
|
||||
|
||||
dgbmv_t.$(SUFFIX) dgbmv_t.$(PSUFFIX) : gbmv_k.c
|
||||
$(CC) -c -UCOMPLEX -DDOUBLE -DTRANS $(CFLAGS) -o $(@F) $<
|
||||
endif
|
||||
|
||||
qgbmv_n.$(SUFFIX) qgbmv_n.$(PSUFFIX) : gbmv_k.c
|
||||
$(CC) -c -UCOMPLEX -DXDOUBLE -UTRANS $(CFLAGS) -o $(@F) $<
|
||||
@@ -437,6 +481,8 @@ qgbmv_n.$(SUFFIX) qgbmv_n.$(PSUFFIX) : gbmv_k.c
|
||||
qgbmv_t.$(SUFFIX) qgbmv_t.$(PSUFFIX) : gbmv_k.c
|
||||
$(CC) -c -UCOMPLEX -DXDOUBLE -DTRANS $(CFLAGS) -o $(@F) $<
|
||||
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
|
||||
cgbmv_n.$(SUFFIX) cgbmv_n.$(PSUFFIX) : zgbmv_k.c
|
||||
$(CC) -c -DCOMPLEX -UDOUBLE -UTRANS -UCONJ -UXCONJ $(CFLAGS) -o $(@F) $<
|
||||
|
||||
@@ -460,6 +506,9 @@ cgbmv_s.$(SUFFIX) cgbmv_s.$(PSUFFIX) : zgbmv_k.c
|
||||
|
||||
cgbmv_d.$(SUFFIX) cgbmv_d.$(PSUFFIX) : zgbmv_k.c
|
||||
$(CC) -c -DCOMPLEX -UDOUBLE -DTRANS -DCONJ -DXCONJ $(CFLAGS) -o $(@F) $<
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
|
||||
zgbmv_n.$(SUFFIX) zgbmv_n.$(PSUFFIX) : zgbmv_k.c
|
||||
$(CC) -c -DCOMPLEX -DDOUBLE -UTRANS -UCONJ -UXCONJ $(CFLAGS) -o $(@F) $<
|
||||
@@ -484,6 +533,7 @@ zgbmv_s.$(SUFFIX) zgbmv_s.$(PSUFFIX) : zgbmv_k.c
|
||||
|
||||
zgbmv_d.$(SUFFIX) zgbmv_d.$(PSUFFIX) : zgbmv_k.c
|
||||
$(CC) -c -DCOMPLEX -DDOUBLE -DTRANS -DCONJ -DXCONJ $(CFLAGS) -o $(@F) $<
|
||||
endif
|
||||
|
||||
xgbmv_n.$(SUFFIX) xgbmv_n.$(PSUFFIX) : zgbmv_k.c
|
||||
$(CC) -c -DCOMPLEX -DXDOUBLE -UTRANS -UCONJ -UXCONJ $(CFLAGS) -o $(@F) $<
|
||||
@@ -509,24 +559,34 @@ xgbmv_s.$(SUFFIX) xgbmv_s.$(PSUFFIX) : zgbmv_k.c
|
||||
xgbmv_d.$(SUFFIX) xgbmv_d.$(PSUFFIX) : zgbmv_k.c
|
||||
$(CC) -c -DCOMPLEX -DXDOUBLE -DTRANS -DCONJ -DXCONJ $(CFLAGS) -o $(@F) $<
|
||||
|
||||
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
|
||||
sgbmv_thread_n.$(SUFFIX) sgbmv_thread_n.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -UCOMPLEX -UDOUBLE -UTRANSA $(CFLAGS) -o $(@F) $<
|
||||
|
||||
sgbmv_thread_t.$(SUFFIX) sgbmv_thread_t.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -UCOMPLEX -UDOUBLE -DTRANSA $(CFLAGS) -o $(@F) $<
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
|
||||
dgbmv_thread_n.$(SUFFIX) dgbmv_thread_n.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -UCOMPLEX -DDOUBLE -UTRANSA $(CFLAGS) -o $(@F) $<
|
||||
|
||||
dgbmv_thread_t.$(SUFFIX) dgbmv_thread_t.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -UCOMPLEX -DDOUBLE -DTRANSA $(CFLAGS) -o $(@F) $<
|
||||
|
||||
endif
|
||||
qgbmv_thread_n.$(SUFFIX) qgbmv_thread_n.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -UCOMPLEX -DXDOUBLE -UTRANSA $(CFLAGS) -o $(@F) $<
|
||||
|
||||
qgbmv_thread_t.$(SUFFIX) qgbmv_thread_t.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -UCOMPLEX -DXDOUBLE -DTRANSA $(CFLAGS) -o $(@F) $<
|
||||
|
||||
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
|
||||
cgbmv_thread_n.$(SUFFIX) cgbmv_thread_n.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -DCOMPLEX -UDOUBLE -UTRANSA -UCONJ -UXCONJ $(CFLAGS) -o $(@F) $<
|
||||
|
||||
@@ -550,6 +610,10 @@ cgbmv_thread_s.$(SUFFIX) cgbmv_thread_s.$(PSUFFIX) : gbmv_thread.c
|
||||
|
||||
cgbmv_thread_d.$(SUFFIX) cgbmv_thread_d.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -DCOMPLEX -UDOUBLE -DTRANSA -DCONJ -DXCONJ $(CFLAGS) -o $(@F) $<
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
|
||||
zgbmv_thread_n.$(SUFFIX) zgbmv_thread_n.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -DCOMPLEX -DDOUBLE -UTRANSA -UCONJ -UXCONJ $(CFLAGS) -o $(@F) $<
|
||||
@@ -574,6 +638,7 @@ zgbmv_thread_s.$(SUFFIX) zgbmv_thread_s.$(PSUFFIX) : gbmv_thread.c
|
||||
|
||||
zgbmv_thread_d.$(SUFFIX) zgbmv_thread_d.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -DCOMPLEX -DDOUBLE -DTRANSA -DCONJ -DXCONJ $(CFLAGS) -o $(@F) $<
|
||||
endif
|
||||
|
||||
xgbmv_thread_n.$(SUFFIX) xgbmv_thread_n.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -DCOMPLEX -DXDOUBLE -UTRANSA -UCONJ -UXCONJ $(CFLAGS) -o $(@F) $<
|
||||
@@ -599,24 +664,32 @@ xgbmv_thread_s.$(SUFFIX) xgbmv_thread_s.$(PSUFFIX) : gbmv_thread.c
|
||||
xgbmv_thread_d.$(SUFFIX) xgbmv_thread_d.$(PSUFFIX) : gbmv_thread.c
|
||||
$(CC) -c -DCOMPLEX -DXDOUBLE -DTRANSA -DCONJ -DXCONJ $(CFLAGS) -o $(@F) $<
|
||||
|
||||
|
||||
ifneq "$(or $(BUILD_SINGLE),$(BUILD_DOUBLE),$(BUILD_COMPLEX))" ""
|
||||
sgemv_thread_n.$(SUFFIX) sgemv_thread_n.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
|
||||
sgemv_thread_t.$(SUFFIX) sgemv_thread_t.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -DTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
endif
|
||||
|
||||
|
||||
ifneq "$(or $(BUILD_DOUBLE),$(BUILD_COMPLEX16))" ""
|
||||
dgemv_thread_n.$(SUFFIX) dgemv_thread_n.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
|
||||
dgemv_thread_t.$(SUFFIX) dgemv_thread_t.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -DTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
|
||||
endif
|
||||
qgemv_thread_n.$(SUFFIX) qgemv_thread_n.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
|
||||
qgemv_thread_t.$(SUFFIX) qgemv_thread_t.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -DTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
|
||||
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
|
||||
cgemv_thread_n.$(SUFFIX) cgemv_thread_n.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
|
||||
@@ -640,6 +713,10 @@ cgemv_thread_s.$(SUFFIX) cgemv_thread_s.$(PSUFFIX) : gemv_thread.c ../../common.
|
||||
|
||||
cgemv_thread_d.$(SUFFIX) cgemv_thread_d.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE -DTRANSA -DCONJ -DXCONJ $< -o $(@F)
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
|
||||
zgemv_thread_n.$(SUFFIX) zgemv_thread_n.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
@@ -664,6 +741,7 @@ zgemv_thread_s.$(SUFFIX) zgemv_thread_s.$(PSUFFIX) : gemv_thread.c ../../common.
|
||||
|
||||
zgemv_thread_d.$(SUFFIX) zgemv_thread_d.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE -DTRANSA -DCONJ -DXCONJ $< -o $(@F)
|
||||
endif
|
||||
|
||||
xgemv_thread_n.$(SUFFIX) xgemv_thread_n.$(PSUFFIX) : gemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user