Compare commits
559
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99c077a3a7 | ||
|
|
fc042d928b | ||
|
|
cdeac0a3ae | ||
|
|
eb931deb22 | ||
|
|
79a1f38770 | ||
|
|
becda2faa4 | ||
|
|
b61a2d7648 | ||
|
|
8b7e4c2b5c | ||
|
|
2265318d3e | ||
|
|
43fdff7f14 | ||
|
|
826cb4588f | ||
|
|
53d7452cdf | ||
|
|
bd45b82ed0 | ||
|
|
7aa183bb56 | ||
|
|
708d586599 | ||
|
|
2953c7d244 | ||
|
|
2a95564500 | ||
|
|
cb6c4392a5 | ||
|
|
a55535b01f | ||
|
|
66cc27e75f | ||
|
|
5ab143736f | ||
|
|
2fee943edb | ||
|
|
90f6dd43c5 | ||
|
|
7b1f9bedf8 | ||
|
|
e2f9f57433 | ||
|
|
c31861ea62 | ||
|
|
57c2936a43 | ||
|
|
6d070820fc | ||
|
|
1c7251ca20 | ||
|
|
a1331406a3 | ||
|
|
c42fccccb5 | ||
|
|
4c1a4e60a6 | ||
|
|
7fcad02dc2 | ||
|
|
ce79fe12fd | ||
|
|
06c09deee9 | ||
|
|
da7d0f4a38 | ||
|
|
c2cc7a3602 | ||
|
|
e23f9c6642 | ||
|
|
b3f247ae5a | ||
|
|
855945befb | ||
|
|
7c1839899e | ||
|
|
9c43301b6d | ||
|
|
9d6df1dd3e | ||
|
|
f3b2a15fad | ||
|
|
64401b4417 | ||
|
|
5e43ba948c | ||
|
|
c00afc86a6 | ||
|
|
3a6b79c50f | ||
|
|
803e8d4838 | ||
|
|
5f47b872f1 | ||
|
|
114316f361 | ||
|
|
75c6ab4036 | ||
|
|
5c5f852ee3 | ||
|
|
f1ee61ea30 | ||
|
|
b3ffd5524a | ||
|
|
d23680b81d | ||
|
|
b4cc4be2ce | ||
|
|
0968dddf1a | ||
|
|
eddfe1e6b3 | ||
|
|
30d11bc92c | ||
|
|
a3b9c933c5 | ||
|
|
72f082f31d | ||
|
|
7e29f11396 | ||
|
|
9a64b32b44 | ||
|
|
b66a01f909 | ||
|
|
a5e7c0e3e0 | ||
|
|
6356190d06 | ||
|
|
4c8dcb3a8f | ||
|
|
33b50548eb | ||
|
|
c504aedca1 | ||
|
|
b9e107932a | ||
|
|
2f89a5970e | ||
|
|
a9e8fa06bf | ||
|
|
b4c2b34a45 | ||
|
|
c9204f7b6f | ||
|
|
a55e65dba9 | ||
|
|
0bc79da587 | ||
|
|
720a4743b9 | ||
|
|
05fc88180c | ||
|
|
965463f177 | ||
|
|
4272cf8c7f | ||
|
|
87247daadc | ||
|
|
ea2faf0c9a | ||
|
|
a5b55f6fe3 | ||
|
|
a4f4662459 | ||
|
|
82954ba4ca | ||
|
|
392d38168e | ||
|
|
41f9701ebc | ||
|
|
f4caa61e47 | ||
|
|
444d03db9c | ||
|
|
2c3cdaf74e | ||
|
|
7d908564fe | ||
|
|
2f81d6e60c | ||
|
|
e2d941e9af | ||
|
|
8214700930 | ||
|
|
4ae8707b54 | ||
|
|
b24212f5df | ||
|
|
6ff06f5483 | ||
|
|
d92f151634 | ||
|
|
30dbca5051 | ||
|
|
38e6999295 | ||
|
|
3df503cafd | ||
|
|
39c90f9859 | ||
|
|
eae0abfdb6 | ||
|
|
ac8cbfdd8e | ||
|
|
1742decdcb | ||
|
|
08df0f02d9 | ||
|
|
7d7757acd1 | ||
|
|
947d7af4c9 | ||
|
|
72d2ebb4dd | ||
|
|
e105411460 | ||
|
|
666e1081ac | ||
|
|
3ea6322eff | ||
|
|
848e9e6ba7 | ||
|
|
09a016fdf6 | ||
|
|
3f110c8272 | ||
|
|
cb2c726716 | ||
|
|
c8d41e4a32 | ||
|
|
81b30d4538 | ||
|
|
aad97c7763 | ||
|
|
7acb122a98 | ||
|
|
740efd71c4 | ||
|
|
e927373f62 | ||
|
|
9a272fece6 | ||
|
|
b54aec804e | ||
|
|
343830c26f | ||
|
|
b37516add6 | ||
|
|
d030f81380 | ||
|
|
b746f0eda3 | ||
|
|
b8f66ba0ee | ||
|
|
cdebb4fd4b | ||
|
|
ff614575c9 | ||
|
|
0e11537cab | ||
|
|
8cd4be8d47 | ||
|
|
66d9185ebe | ||
|
|
98aefb70b4 | ||
|
|
fd37406817 | ||
|
|
48394384ef | ||
|
|
73bf0b941a | ||
|
|
f95e7b0e32 | ||
|
|
15d6e58510 | ||
|
|
04bb5acd79 | ||
|
|
3d31887073 | ||
|
|
0ddf8ebd42 | ||
|
|
d2ea9bbb6d | ||
|
|
4ff549a450 | ||
|
|
309c48e327 | ||
|
|
552e1c7a7a | ||
|
|
46b9b7a080 | ||
|
|
eaaa628af2 | ||
|
|
7a97c4ca97 | ||
|
|
ee6560c89f | ||
|
|
8d11e4630c | ||
|
|
03a4afcf14 | ||
|
|
901de8f33a | ||
|
|
ce6991780a | ||
|
|
df013c5e28 | ||
|
|
f7ad906b49 | ||
|
|
7f360001f9 | ||
|
|
36c2589d3a | ||
|
|
14107e37d9 | ||
|
|
a06bcf836b | ||
|
|
5253c8f165 | ||
|
|
8f0a1a3f82 | ||
|
|
2c0dd2468e | ||
|
|
7ae24d0b85 | ||
|
|
5aeca597fe | ||
|
|
dcb289539b | ||
|
|
9bcffbd655 | ||
|
|
334cd242d4 | ||
|
|
bba75d5e45 | ||
|
|
4062c10370 | ||
|
|
b78d1dc0ae | ||
|
|
83a01d29ca | ||
|
|
560fa88c96 | ||
|
|
55bb5ef867 | ||
|
|
b37889e52d | ||
|
|
1dde4a13c0 | ||
|
|
11ce79a4f0 | ||
|
|
0904a42fa4 | ||
|
|
d24195e9a1 | ||
|
|
134b21ae60 | ||
|
|
d96daa220d | ||
|
|
fdc1c32340 | ||
|
|
5aa483e16c | ||
|
|
12591caa91 | ||
|
|
ee26caffb3 | ||
|
|
8b08df5c5a | ||
|
|
3bba35b8f7 | ||
|
|
8953ba9c2f | ||
|
|
aa90ab4142 | ||
|
|
46b0dfef8f | ||
|
|
83efceb3cd | ||
|
|
b4945057b7 | ||
|
|
b3904aeed7 | ||
|
|
721c80644b | ||
|
|
badef1d32e | ||
|
|
4e6da5ed34 | ||
|
|
8dff37827e | ||
|
|
c055c36b40 | ||
|
|
993fad6aeb | ||
|
|
3382763df6 | ||
|
|
e81fca06dd | ||
|
|
d339bd5515 | ||
|
|
157273fda0 | ||
|
|
1546599a13 | ||
|
|
79b4dd0fb0 | ||
|
|
c2342fc2d0 | ||
|
|
e541bf68f5 | ||
|
|
5ad6435660 | ||
|
|
e684e36377 | ||
|
|
3318a2b904 | ||
|
|
84730068af | ||
|
|
85337c5160 | ||
|
|
53cd6e7ff7 | ||
|
|
1dd396033a | ||
|
|
3b1ac29b77 | ||
|
|
be68ef03b4 | ||
|
|
f1097d1cba | ||
|
|
3fe7f196e6 | ||
|
|
bad47bd024 | ||
|
|
7f3093a0ad | ||
|
|
1804ff58d7 | ||
|
|
906b9df316 | ||
|
|
f4e5177050 | ||
|
|
2a6beac88f | ||
|
|
d8a2324699 | ||
|
|
874744976c | ||
|
|
9f13b2c6ac | ||
|
|
ec14e1648c | ||
|
|
0ea173ec8c | ||
|
|
5e393f207c | ||
|
|
162591af47 | ||
|
|
dbd5643d37 | ||
|
|
31ef2cbbb3 | ||
|
|
e338d34ce1 | ||
|
|
d36093d084 | ||
|
|
cc4b04a684 | ||
|
|
b3c90564d7 | ||
|
|
6bdc7f9eb7 | ||
|
|
63272b6c82 | ||
|
|
73af02b89f | ||
|
|
549a9f1dbb | ||
|
|
ca1ce84ee5 | ||
|
|
58eeb9041c | ||
|
|
7c77537b25 | ||
|
|
63287e1855 | ||
|
|
d2855d3dab | ||
|
|
1408be5fe0 | ||
|
|
1589d0b21e | ||
|
|
a86419fb66 | ||
|
|
11ff18bb0f | ||
|
|
2e2691b34b | ||
|
|
f4194fc65f | ||
|
|
e12132abd4 | ||
|
|
1cefbea7ea | ||
|
|
8279e68805 | ||
|
|
f18b7a46bf | ||
|
|
fe220a0d7d | ||
|
|
bbdc265798 | ||
|
|
5442aff218 | ||
|
|
83fcab7578 | ||
|
|
2ae019161a | ||
|
|
fb89820f20 | ||
|
|
4e1a381e5b | ||
|
|
fa2b08b378 | ||
|
|
670ec6f757 | ||
|
|
02267d86f5 | ||
|
|
d2003dc886 | ||
|
|
45fd2d9b07 | ||
|
|
0a967797a1 | ||
|
|
fb8dc8ff5c | ||
|
|
2996c25c94 | ||
|
|
cf06250d36 | ||
|
|
28f8fdaf0f | ||
|
|
669c847ceb | ||
|
|
0163143fdd | ||
|
|
20f2ba0141 | ||
|
|
e2e6a4d90a | ||
|
|
9ef5995c22 | ||
|
|
42b7d1f897 | ||
|
|
bd573a9d38 | ||
|
|
2351a98005 | ||
|
|
a5f701c4ab | ||
|
|
4ca76d9de4 | ||
|
|
846a5436e7 | ||
|
|
8779eac3b8 | ||
|
|
3473118213 | ||
|
|
f2022c23ac | ||
|
|
b5456c1b41 | ||
|
|
5a322f21af | ||
|
|
6680e0592f | ||
|
|
0b0bb9951d | ||
|
|
7732a55200 | ||
|
|
be9f7550b5 | ||
|
|
4d213653d8 | ||
|
|
8afddc1a81 | ||
|
|
9a7e3f102b | ||
|
|
5366902f9d | ||
|
|
a978ad3180 | ||
|
|
0ccb050583 | ||
|
|
7321444660 | ||
|
|
cf9e34c1f4 | ||
|
|
5141a90993 | ||
|
|
2320e0b757 | ||
|
|
0d69a2930d | ||
|
|
ebbe682f7d | ||
|
|
151b74284e | ||
|
|
3c878f3e70 | ||
|
|
3e961c2771 | ||
|
|
0ea9205a6c | ||
|
|
cba32d001a | ||
|
|
5c958dfe1e | ||
|
|
4c0445aed1 | ||
|
|
d48a2fc469 | ||
|
|
47b43054f1 | ||
|
|
52367eac67 | ||
|
|
4bee135cc1 | ||
|
|
f19e72c402 | ||
|
|
b471fa337b | ||
|
|
57bb46bedf | ||
|
|
6dc4ca2391 | ||
|
|
b528b1b8ea | ||
|
|
ba9569e382 | ||
|
|
dc5fa29851 | ||
|
|
a98dd6d911 | ||
|
|
d49319c2d2 | ||
|
|
74c97ef814 | ||
|
|
be525521ad | ||
|
|
0cd5ca5527 | ||
|
|
11ffc8680e | ||
|
|
7616c42095 | ||
|
|
e1bd631593 | ||
|
|
70dff3b84f | ||
|
|
0c239c9d48 | ||
|
|
9c02cdb073 | ||
|
|
d0e8fd6d40 | ||
|
|
ddfefd9bf8 | ||
|
|
08b5c18d70 | ||
|
|
e11744a411 | ||
|
|
db0abfa907 | ||
|
|
7389b6c483 | ||
|
|
4ec62d7f73 | ||
|
|
1df8738f27 | ||
|
|
99d9f1ff38 | ||
|
|
96d80801bc | ||
|
|
f5bc97c37e | ||
|
|
050c3b26ae | ||
|
|
9aa7a0b2a7 | ||
|
|
94fceaeac5 | ||
|
|
d659f3c3f6 | ||
|
|
2e4309315c | ||
|
|
afc1dc69cd | ||
|
|
0cc2485594 | ||
|
|
1f687b2f60 | ||
|
|
dd38b4e811 | ||
|
|
3a088de2d1 | ||
|
|
0241d516f6 | ||
|
|
afb664527f | ||
|
|
d535728803 | ||
|
|
d9369bda1e | ||
|
|
acef78c778 | ||
|
|
d1c2528aed | ||
|
|
7b66330dea | ||
|
|
d711906e3e | ||
|
|
f1e628b889 | ||
|
|
39718cd28e | ||
|
|
211dfd0754 | ||
|
|
fd3afef122 | ||
|
|
b30dc9701f | ||
|
|
2893d0add4 | ||
|
|
ed1e470663 | ||
|
|
3d6d026fe1 | ||
|
|
51ba70f47b | ||
|
|
ec146157d3 | ||
|
|
de2380e5a6 | ||
|
|
a34b487f22 | ||
|
|
1b3e7cc491 | ||
|
|
4270d5bc43 | ||
|
|
880e43ee54 | ||
|
|
70865a894e | ||
|
|
f0f274725d | ||
|
|
94fb7033a4 | ||
|
|
1ff303f36e | ||
|
|
fc8090b607 | ||
|
|
1c5d0d5539 | ||
|
|
67c5bdd639 | ||
|
|
1ed962d259 | ||
|
|
f0008f50cc | ||
|
|
7bf848454d | ||
|
|
0aa5ef29ec | ||
|
|
f90eff306d | ||
|
|
04915be829 | ||
|
|
3fc15ad81c | ||
|
|
61b9339d3a | ||
|
|
ea6515c4b3 | ||
|
|
f33943d73e | ||
|
|
251c3f857d | ||
|
|
1b0c0f00e9 | ||
|
|
02fd1df10b | ||
|
|
8b35534201 | ||
|
|
51c1fb1f93 | ||
|
|
3ca1ba1be3 | ||
|
|
72f0abeed5 | ||
|
|
1724b3f104 | ||
|
|
c2e7ab5351 | ||
|
|
200771078f | ||
|
|
4e3afa7beb | ||
|
|
c0a5c9655e | ||
|
|
8e289ecddc | ||
|
|
189dbbc04f | ||
|
|
b6cb5ece58 | ||
|
|
51c244a098 | ||
|
|
f27ba5efd1 | ||
|
|
e9fbe0a838 | ||
|
|
edef2e4441 | ||
|
|
b55ca71d5b | ||
|
|
2f778554b8 | ||
|
|
66e0f1e621 | ||
|
|
9807f56580 | ||
|
|
1ba02656e6 | ||
|
|
8a418b1aab | ||
|
|
b34235ca66 | ||
|
|
37b854769b | ||
|
|
a3e7b16072 | ||
|
|
8865850496 | ||
|
|
4c00099ed6 | ||
|
|
a085b6c9ec | ||
|
|
80d3c2ad95 | ||
|
|
5c4e38ab17 | ||
|
|
39eb43d441 | ||
|
|
1d5ed5c46b | ||
|
|
7338a473a7 | ||
|
|
5f200dca54 | ||
|
|
8b98db13e3 | ||
|
|
6b8b35cdf2 | ||
|
|
38ee7c9301 | ||
|
|
217324d880 | ||
|
|
e4630ed15a | ||
|
|
35914aa9a2 | ||
|
|
2b941c44b5 | ||
|
|
c797e27a1c | ||
|
|
4346b91559 | ||
|
|
35bdbca153 | ||
|
|
edaf51dd99 | ||
|
|
ef9e3f7159 | ||
|
|
09ba099461 | ||
|
|
030ae1fd97 | ||
|
|
1533fe49be | ||
|
|
c03a81b927 | ||
|
|
643966d9c7 | ||
|
|
77fba0f400 | ||
|
|
f0bea79a6e | ||
|
|
20d1118865 | ||
|
|
75b958a018 | ||
|
|
650a062e19 | ||
|
|
b723c1b7b7 | ||
|
|
ceb8f1e34b | ||
|
|
f1fa370579 | ||
|
|
6d1444be3a | ||
|
|
eb84aac7ad | ||
|
|
abbd78aa59 | ||
|
|
ebcab90976 | ||
|
|
ed1584666c | ||
|
|
b9ae246f20 | ||
|
|
86cf9d8a2e | ||
|
|
0b3c56968d | ||
|
|
c1bb90a823 | ||
|
|
77c638db67 | ||
|
|
f66ca05b31 | ||
|
|
d23eb3b93e | ||
|
|
a64b75a2e0 | ||
|
|
453efbd103 | ||
|
|
877d5a5be6 | ||
|
|
8d487ef6eb | ||
|
|
daf16b8229 | ||
|
|
e8b11a126b | ||
|
|
9a3948df82 | ||
|
|
7f1f776f58 | ||
|
|
81eed868b6 | ||
|
|
98b5ef929c | ||
|
|
2c4a5cc6e6 | ||
|
|
9e75d6b3d1 | ||
|
|
e8c740368c | ||
|
|
c2212d0abd | ||
|
|
7f1ebc7ae6 | ||
|
|
31d326f895 | ||
|
|
5d6356bc16 | ||
|
|
f42ce7067f | ||
|
|
7478c10268 | ||
|
|
c54f5417cc | ||
|
|
57208b8bce | ||
|
|
3a4a9b21eb | ||
|
|
60d0be0e97 | ||
|
|
0fd5448b2c | ||
|
|
1b85b6a396 | ||
|
|
cae480683a | ||
|
|
db7e5f1fa7 | ||
|
|
ff30ac9666 | ||
|
|
7c3e169b67 | ||
|
|
09414a4187 | ||
|
|
c748e6a338 | ||
|
|
4379a6fbe3 | ||
|
|
c139b63342 | ||
|
|
6cd9bbe531 | ||
|
|
5de5072940 | ||
|
|
1f74fb9a07 | ||
|
|
d7036cfd74 | ||
|
|
3375a0c990 | ||
|
|
7a27e2b00d | ||
|
|
fdeac17237 | ||
|
|
1829ac5b44 | ||
|
|
53d20a83f3 | ||
|
|
6e393a5599 | ||
|
|
9b11fd5802 | ||
|
|
5930c162ef | ||
|
|
838bb57e27 | ||
|
|
252c43265d | ||
|
|
876ba58e28 | ||
|
|
a54f9a9c69 | ||
|
|
9f2319b46d | ||
|
|
9faebb3c97 | ||
|
|
262018f14c | ||
|
|
180ba5e7d0 | ||
|
|
1ebcbdbab3 | ||
|
|
d1bfa979f7 | ||
|
|
1a6a9fb22f | ||
|
|
518e376820 | ||
|
|
111c9b0733 | ||
|
|
4924319c50 | ||
|
|
b58cba9eb6 | ||
|
|
4d5b13f765 | ||
|
|
2da86b80c9 | ||
|
|
5392f6df69 | ||
|
|
3c8df6358f | ||
|
|
c0318cea6e | ||
|
|
b2117bb2ca | ||
|
|
6954845d8d | ||
|
|
e114880dc4 | ||
|
|
76db346f7e | ||
|
|
5f7b03a441 | ||
|
|
100e74d4d6 | ||
|
|
ca3e1c8f9c | ||
|
|
87083fdbf6 | ||
|
|
2954dc1a70 | ||
|
|
7c3a920a81 | ||
|
|
a7483d181b | ||
|
|
ef7f54b357 | ||
|
|
eba7338484 | ||
|
|
e0a8216554 | ||
|
|
a9070ba3f9 | ||
|
|
9b981035db | ||
|
|
fee353e63d | ||
|
|
0c0112dfef | ||
|
|
c8cd8da496 | ||
|
|
af10c132b8 | ||
|
|
4e817f804c | ||
|
|
8a316e68a5 | ||
|
|
07756abb3e |
+7
-7
@@ -58,8 +58,8 @@ task:
|
||||
- export VALID_ARCHS="i386 x86_64"
|
||||
- xcrun --sdk macosx --show-sdk-path
|
||||
- xcodebuild -version
|
||||
- export CC=/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -arch x86_64"
|
||||
- export CC=/Applications/Xcode_16.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_16.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -arch x86_64"
|
||||
- make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
|
||||
always:
|
||||
config_artifacts:
|
||||
@@ -78,8 +78,8 @@ task:
|
||||
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
|
||||
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
- export CC=/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk -arch arm64 -miphoneos-version-min=10.0"
|
||||
- export CC=/Applications/Xcode_16.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_16.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.4.sdk -arch arm64 -miphoneos-version-min=10.0"
|
||||
- xcrun --sdk iphoneos --show-sdk-path
|
||||
- ls -l /Applications
|
||||
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
|
||||
@@ -127,7 +127,7 @@ task:
|
||||
FreeBSD_task:
|
||||
name: FreeBSD-gcc
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-1
|
||||
image_family: freebsd-14-2
|
||||
install_script:
|
||||
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
|
||||
compile_script:
|
||||
@@ -138,7 +138,7 @@ FreeBSD_task:
|
||||
FreeBSD_task:
|
||||
name: freebsd-gcc-ilp64
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-1
|
||||
image_family: freebsd-14-2
|
||||
install_script:
|
||||
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
|
||||
compile_script:
|
||||
@@ -148,7 +148,7 @@ FreeBSD_task:
|
||||
FreeBSD_task:
|
||||
name: FreeBSD-clang-openmp
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-1
|
||||
image_family: freebsd-14-2
|
||||
install_script:
|
||||
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
|
||||
- ln -s /usr/local/lib/gcc13/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
|
||||
brew reinstall gcc
|
||||
brew install coreutils cmake ccache
|
||||
brew install coreutils ccache
|
||||
brew install llvm
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
@@ -87,10 +87,16 @@ jobs:
|
||||
echo "max_size = 300M" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
|
||||
- name: Add gfortran runtime to link path
|
||||
if: matrix.build == 'make' && runner.os == 'macOS'
|
||||
run: |
|
||||
GFORTRAN_LIBDIR=$(gfortran -print-file-name=libgfortran.dylib | xargs dirname)
|
||||
echo "Using gfortran runtime in $GFORTRAN_LIBDIR"
|
||||
echo "LDFLAGS=-L/opt/homebrew/opt/llvm/lib -L$GFORTRAN_LIBDIR" >> $GITHUB_ENV
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
export CC="/opt/homebrew/opt/llvm/bin/clang"
|
||||
case "${{ matrix.build }}" in
|
||||
@@ -102,6 +108,7 @@ jobs:
|
||||
mkdir build && cd build
|
||||
cmake -DDYNAMIC_ARCH=1 \
|
||||
-DUSE_OPENMP=${{matrix.openmp}} \
|
||||
-DOpenMP_Fortran_LIB_NAMES=omp \
|
||||
-DINTERFACE64=${{matrix.ilp64}} \
|
||||
-DNOFORTRAN=0 \
|
||||
-DBUILD_WITHOUT_LAPACK=0 \
|
||||
|
||||
@@ -88,13 +88,14 @@ jobs:
|
||||
run: |
|
||||
case "${{ matrix.build }}" in
|
||||
"make")
|
||||
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
|
||||
make -j$(nproc) DYNAMIC_ARCH=1 BUILD_BFLOAT16=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
|
||||
;;
|
||||
"cmake")
|
||||
mkdir build && cd build
|
||||
cmake -DDYNAMIC_ARCH=1 \
|
||||
-DNOFORTRAN=0 \
|
||||
-DBUILD_WITHOUT_LAPACK=0 \
|
||||
-DBUILD_BFLOAT16=1 \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_Fortran_COMPILER=${{ matrix.fortran }} \
|
||||
|
||||
+41
-10
@@ -31,27 +31,28 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: install build deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache \
|
||||
gcc-${{ matrix.apt_triple }} gfortran-${{ matrix.apt_triple }} libgomp1-riscv64-cross
|
||||
gcc-${{ matrix.apt_triple }} gfortran-${{ matrix.apt_triple }} libgomp1-riscv64-cross libglib2.0-dev
|
||||
|
||||
- name: checkout qemu
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: T-head-Semi/qemu
|
||||
repository: XUANTIE-RV/qemu
|
||||
path: qemu
|
||||
ref: 1e692ebb43d396c52352406323fc782c1ac99a42
|
||||
ref: e0ace167effcd36d1f82c7ccb4522b3126011479 # xuantie-qemu-9.0
|
||||
|
||||
- name: build qemu
|
||||
run: |
|
||||
# Force use c910v qemu-user
|
||||
wget https://github.com/revyos/qemu/commit/5164bca5a4bcde4534dc1a9aa3a7f619719874cf.patch
|
||||
wget https://github.com/revyos/qemu/commit/222729c7455784dd855216d7a2bec4bd8f2a6800.patch
|
||||
cd qemu
|
||||
patch -p1 < ../5164bca5a4bcde4534dc1a9aa3a7f619719874cf.patch
|
||||
patch -p1 < ../222729c7455784dd855216d7a2bec4bd8f2a6800.patch
|
||||
export CXXFLAGS="-Wno-error"; export CFLAGS="-Wno-error"
|
||||
./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=riscv64-linux-user --disable-system
|
||||
make -j$(nproc)
|
||||
make install
|
||||
@@ -82,9 +83,39 @@ jobs:
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
|
||||
qemu-riscv64 ./utest/openblas_utest
|
||||
qemu-riscv64 ./utest/openblas_utest_ext
|
||||
run_with_retry() {
|
||||
local cmd="$1"
|
||||
local time_out=10
|
||||
local retries=10
|
||||
local attempt=0
|
||||
|
||||
for ((i=1; i<=retries; i++)); do
|
||||
attempt=$((i))
|
||||
if timeout -s 12 --preserve-status $time_out $cmd; then
|
||||
echo "Command succeeded on attempt $i."
|
||||
return 0
|
||||
else
|
||||
local exit_code=$?
|
||||
if [ $exit_code -eq 140 ]; then
|
||||
echo "Attempt $i timed out (retrying...)"
|
||||
time_out=$((time_out + 5))
|
||||
else
|
||||
echo "Attempt $i failed with exit code $exit_code. Aborting workflow."
|
||||
exit $exit_code
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo "All $retries attempts failed, giving up."
|
||||
echo "Final failure was due to timeout."
|
||||
echo "Aborting workflow."
|
||||
exit $exit_code
|
||||
}
|
||||
export PATH=$GITHUB_WORKSPACE/qemu-install/bin:$PATH
|
||||
which qemu-riscv64
|
||||
export QEMU_BIN=$(which qemu-riscv64)
|
||||
run_with_retry "$QEMU_BIN ./utest/openblas_utest"
|
||||
run_with_retry "$QEMU_BIN ./utest/openblas_utest_ext"
|
||||
|
||||
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xscblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xdcblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xccblat1
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
os: [ubuntu-22.04]
|
||||
fortran: [gfortran]
|
||||
build: [make]
|
||||
pyver: ["3.12"]
|
||||
@@ -147,7 +147,7 @@ jobs:
|
||||
OPENBLAS_NUM_THREADS=1 pytest benchmarks/bench_blas.py -k 'gesdd'
|
||||
|
||||
- name: Run benchmarks
|
||||
uses: CodSpeedHQ/action@v2
|
||||
uses: CodSpeedHQ/action@v3
|
||||
with:
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
run: |
|
||||
|
||||
@@ -43,11 +43,13 @@ jobs:
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gfortran cmake ccache libtinfo5
|
||||
sudo apt-get install -y gfortran cmake ccache
|
||||
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
|
||||
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
|
||||
brew reinstall gcc
|
||||
brew install coreutils cmake ccache
|
||||
brew install coreutils ccache
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
exit 1
|
||||
@@ -87,6 +89,14 @@ jobs:
|
||||
echo "max_size = 300M" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
|
||||
- name: Add gfortran runtime to link path
|
||||
if: matrix.build == 'make' && runner.os == 'macOS'
|
||||
run: |
|
||||
GFORTRAN_LIBDIR=$(gfortran -print-file-name=libgfortran.dylib | xargs dirname)
|
||||
echo "Using gfortran runtime in $GFORTRAN_LIBDIR"
|
||||
# Preserve whatever LDFLAGS may already contain
|
||||
echo "LDFLAGS=${LDFLAGS:+$LDFLAGS }-L$GFORTRAN_LIBDIR" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
@@ -354,3 +364,23 @@ jobs:
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
make -j$(nproc) HOSTCC="ccache gcc" CC="ccache ${{ matrix.triple }}-gcc" FC="ccache ${{ matrix.triple }}-gfortran" ARCH=${{ matrix.target }} ${{ matrix.opts }}
|
||||
|
||||
neoverse_build:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc gfortran make
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
make -j${nproc}
|
||||
make -j${nproc} lapack-test
|
||||
|
||||
|
||||
|
||||
@@ -35,13 +35,13 @@ jobs:
|
||||
|
||||
- name: Install libffi6
|
||||
run: |
|
||||
wget http://ftp.ca.debian.org/debian/pool/main/libf/libffi/libffi6_3.2.1-9_amd64.deb
|
||||
wget https://download.nvidia.com/cumulus/apt.cumulusnetworks.com/pool/upstream/libf/libffi/libffi6_3.2.1-9_amd64.deb
|
||||
sudo dpkg -i libffi6_3.2.1-9_amd64.deb
|
||||
|
||||
- name: Install APT deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache
|
||||
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache libglib2.0-dev
|
||||
|
||||
- name: Download and install loongarch64-toolchain
|
||||
run: |
|
||||
|
||||
@@ -41,14 +41,14 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache \
|
||||
gcc-${{ matrix.triple }} gfortran-${{ matrix.triple }} libgomp1-mips64el-cross
|
||||
gcc-${{ matrix.triple }} gfortran-${{ matrix.triple }} libgomp1-mips64el-cross libglib2.0-dev
|
||||
|
||||
- name: checkout qemu
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: qemu/qemu
|
||||
path: qemu
|
||||
ref: 79dfa177ae348bb5ab5f97c0915359b13d6186e2
|
||||
ref: ae35f033b874c627d81d51070187fbf55f0bf1a7
|
||||
|
||||
- name: build qemu
|
||||
run: |
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
triple: riscv64-unknown-linux-gnu
|
||||
riscv_gnu_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain
|
||||
riscv_gnu_toolchain_version: 13.2.0
|
||||
riscv_gnu_toolchain_nightly_download_path: /releases/download/2024.02.02/riscv64-glibc-ubuntu-22.04-llvm-nightly-2024.02.02-nightly.tar.gz
|
||||
riscv_gnu_toolchain_nightly_download_path: /releases/download/2025.08.29/riscv64-glibc-ubuntu-22.04-llvm-nightly-2025.08.29-nightly.tar.xz
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
name: Windows ARM64 CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: windows-11-arm
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install LLVM for Win-ARM64
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/LLVM-20.1.8-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe
|
||||
Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait
|
||||
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
#dir "C:\Program Files\LLVM\include\flang"
|
||||
#rmdir /Q /S "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/ARM64"
|
||||
|
||||
- name: Install CMake and Ninja for Win-ARM64
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest https://github.com/Kitware/CMake/releases/download/v3.29.4/cmake-3.29.4-windows-arm64.msi -OutFile cmake-arm64.msi
|
||||
Start-Process msiexec.exe -ArgumentList "/i cmake-arm64.msi /quiet /norestart" -Wait
|
||||
echo "C:\Program Files\CMake\bin" >> $env:GITHUB_PATH
|
||||
|
||||
Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-winarm64.zip -OutFile ninja-winarm64.zip
|
||||
Expand-Archive ninja-winarm64.zip -DestinationPath ninja
|
||||
Copy-Item ninja\ninja.exe -Destination "C:\Windows\System32"
|
||||
|
||||
- name: Configure OpenBLAS
|
||||
shell: cmd
|
||||
run: |
|
||||
CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat"
|
||||
set PATH=C:\Program Files\LLVM\bin;%PATH%
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G Ninja ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DTARGET=ARMV8 ^
|
||||
-DBINARY=64 ^
|
||||
-DCMAKE_C_COMPILER=clang-cl ^
|
||||
-DCMAKE_Fortran_COMPILER=flang-new ^
|
||||
-DBUILD_SHARED_LIBS=ON ^
|
||||
-DCMAKE_SYSTEM_PROCESSOR=arm64 ^
|
||||
-DCMAKE_SYSTEM_NAME=Windows ^
|
||||
-DCMAKE_INSTALL_PREFIX=C:/opt
|
||||
|
||||
- name: Build OpenBLAS
|
||||
shell: cmd
|
||||
run: |
|
||||
cd build
|
||||
ninja -j16
|
||||
|
||||
- name: Install OpenBLAS
|
||||
shell: cmd
|
||||
run: |
|
||||
cd build
|
||||
cmake --install .
|
||||
|
||||
- name: Run ctests
|
||||
shell: pwsh
|
||||
run: |
|
||||
$env:PATH = "C:\opt\bin;$env:PATH"
|
||||
cd build
|
||||
ctest
|
||||
|
||||
|
||||
+7
-1
@@ -13,8 +13,8 @@ lapack-3.4.1.tgz
|
||||
lapack-3.4.2
|
||||
lapack-3.4.2.tgz
|
||||
lapack-netlib/make.inc
|
||||
lapack-netlib/lapacke/include/lapacke_mangling.h
|
||||
lapack-netlib/SRC/la_constants.mod
|
||||
lapack-netlib/SRC/la_xisnan.mod
|
||||
lapack-netlib/TESTING/testing_results.txt
|
||||
lapack-netlib/INSTALL/test*
|
||||
lapack-netlib/TESTING/xeigtstc
|
||||
@@ -81,7 +81,10 @@ test/ZBLAT2.SUMM
|
||||
test/ZBLAT3.SUMM
|
||||
test/ZBLAT3_3M.SUMM
|
||||
test/SHBLAT3.SUMM
|
||||
test/SBBLAT2.SUMM
|
||||
test/SBBLAT3.SUMM
|
||||
test/BBLAT2.SUMM
|
||||
test/BBLAT3.SUMM
|
||||
test/cblat1
|
||||
test/cblat2
|
||||
test/cblat3
|
||||
@@ -96,6 +99,9 @@ test/sblat3
|
||||
test/sblat3_3m
|
||||
test/test_shgemm
|
||||
test/test_sbgemm
|
||||
test/test_sbgemv
|
||||
test/test_bgemm
|
||||
test/test_bgemv
|
||||
test/zblat1
|
||||
test/zblat2
|
||||
test/zblat3
|
||||
|
||||
+111
-29
@@ -9,7 +9,7 @@ project(OpenBLAS C ASM)
|
||||
|
||||
set(OpenBLAS_MAJOR_VERSION 0)
|
||||
set(OpenBLAS_MINOR_VERSION 3)
|
||||
set(OpenBLAS_PATCH_VERSION 29)
|
||||
set(OpenBLAS_PATCH_VERSION 30.dev)
|
||||
|
||||
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
|
||||
|
||||
@@ -21,6 +21,8 @@ include(CMakePackageConfigHelpers)
|
||||
#######
|
||||
option(BUILD_WITHOUT_LAPACK "Do not build LAPACK and LAPACKE (Only BLAS or CBLAS)" OFF)
|
||||
|
||||
option(BUILD_WITHOUT_LAPACKE "Do not build the C interface to LAPACK)" OFF)
|
||||
|
||||
option(BUILD_LAPACK_DEPRECATED "When building LAPACK, include also some older, deprecated routines" ON)
|
||||
|
||||
set(LAPACK_STRLEN "" CACHE STRING "When building LAPACK, use this type (e.g. \"int\") for character lengths (defaults to size_t)")
|
||||
@@ -60,6 +62,7 @@ option(CPP_THREAD_SAFETY_TEST "Run a massively parallel DGEMM test to confirm th
|
||||
|
||||
option(CPP_THREAD_SAFETY_GEMV "Run a massively parallel DGEMV test to confirm thread safety of the library (requires OpenMP)" OFF)
|
||||
option(BUILD_STATIC_LIBS "Build static library" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||
if(NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
|
||||
set(BUILD_STATIC_LIBS ON CACHE BOOL "Build static library" FORCE)
|
||||
endif()
|
||||
@@ -75,12 +78,27 @@ set(SYMBOLPREFIX "" CACHE STRING "Add a prefix to all exported symbol names in
|
||||
|
||||
set(SYMBOLSUFFIX "" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" )
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows" AND BUILD_SHARED_LIBS AND NOT ("${SYMBOLPREFIX}${SYMBOLSUFFIX}" STREQUAL ""))
|
||||
set (DELETE_STATIC_LIBS "")
|
||||
if (NOT BUILD_STATIC_LIBS)
|
||||
message (STATUS "forcing build of a temporary static library for symbol renaming")
|
||||
set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared library" FORCE)
|
||||
set (BUILD_STATIC_LIBS ON CACHE BOOL "Build static library" FORCE)
|
||||
set (DELETE_STATIC_LIBS file (REMOVE $<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.lib))
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
|
||||
#######
|
||||
if(BUILD_WITHOUT_LAPACK)
|
||||
set(NO_LAPACK 1)
|
||||
set(NO_LAPACKE 1)
|
||||
endif()
|
||||
|
||||
if (BUILD_WITHOUT_LAPACKE)
|
||||
set(NO_LAPACKE 1)
|
||||
endif()
|
||||
|
||||
if(BUILD_WITHOUT_CBLAS)
|
||||
set(NO_CBLAS 1)
|
||||
endif()
|
||||
@@ -103,14 +121,15 @@ endif()
|
||||
|
||||
message(WARNING "CMake support is experimental. It does not yet support all build options and may not produce the same Makefiles that OpenBLAS ships with.")
|
||||
|
||||
if (USE_OPENMP)
|
||||
find_package(OpenMP REQUIRED)
|
||||
endif ()
|
||||
|
||||
include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
|
||||
include("${PROJECT_SOURCE_DIR}/cmake/system.cmake")
|
||||
|
||||
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE})
|
||||
string(FIND "${LIBNAMESUFFIX}" "${SUFFIX64_UNDERSCORE}" HAVE64)
|
||||
if (${HAVE64} GREATER -1)
|
||||
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX})
|
||||
else ()
|
||||
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE})
|
||||
endif ()
|
||||
|
||||
set(BLASDIRS interface driver/level2 driver/level3 driver/others)
|
||||
|
||||
@@ -133,6 +152,9 @@ endif ()
|
||||
if (NOT DEFINED BUILD_BFLOAT16)
|
||||
set (BUILD_BFLOAT16 false)
|
||||
endif ()
|
||||
if (NOT DEFINED BUILD_HFLOAT16)
|
||||
set (BUILD_HFLOAT16 false)
|
||||
endif ()
|
||||
# set which float types we want to build for
|
||||
if (NOT DEFINED BUILD_SINGLE AND NOT DEFINED BUILD_DOUBLE AND NOT DEFINED BUILD_COMPLEX AND NOT DEFINED BUILD_COMPLEX16)
|
||||
# if none are defined, build for all
|
||||
@@ -224,6 +246,12 @@ endif ()
|
||||
# add objects to the openblas lib
|
||||
if(NOT NO_LAPACK)
|
||||
add_library(LAPACK_OVERRIDES OBJECT ${LA_SOURCES})
|
||||
if (USE_OPENMP AND (NOT NOFORTRAN))
|
||||
# Disable OpenMP for LAPACK Fortran codes on Windows.
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(LAPACK_OVERRIDES OpenMP::OpenMP_Fortran)
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND TARGET_OBJS "$<TARGET_OBJECTS:LAPACK_OVERRIDES>")
|
||||
endif()
|
||||
if(NOT NO_LAPACKE)
|
||||
@@ -265,30 +293,59 @@ endif()
|
||||
|
||||
if (USE_OPENMP)
|
||||
if(BUILD_STATIC_LIBS)
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_static OpenMP::OpenMP_C)
|
||||
if(NOFORTRAN)
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_static OpenMP::OpenMP_C)
|
||||
else()
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_static OpenMP::OpenMP_C OpenMP::OpenMP_Fortran)
|
||||
endif()
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_shared OpenMP::OpenMP_C)
|
||||
if(NOFORTRAN)
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_shared OpenMP::OpenMP_C)
|
||||
else()
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_shared OpenMP::OpenMP_C OpenMP::OpenMP_Fortran)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Seems that this hack doesn't required since macOS 11 Big Sur
|
||||
if (APPLE AND BUILD_SHARED_LIBS AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 20)
|
||||
set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
if (NOT NOFORTRAN)
|
||||
set (CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
set (CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' "
|
||||
"sh -c 'echo \"\" | ${CMAKE_Fortran_COMPILER} -o dummy.o -c -x f95-cpp-input - '"
|
||||
"sh -c '${CMAKE_Fortran_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,libopenblas.a -Wl,-noall_load dummy.o -o ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib'"
|
||||
"sh -c 'ls -l ${CMAKE_BINARY_DIR}/lib'")
|
||||
else ()
|
||||
set (CMAKE_C_CREATE_SHARED_LIBRARY
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' "
|
||||
"sh -c '${CMAKE_C_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,libopenblas.a -Wl,-noall_load -o ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib'")
|
||||
endif ()
|
||||
# Fix "Argument list too long" for macOS with POWERPC or Intel CPUs
|
||||
if(APPLE AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64"))
|
||||
# Use response files
|
||||
set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
# Always build static library first
|
||||
if(BUILD_STATIC_LIBS)
|
||||
set(STATIC_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${OpenBLAS_LIBNAME}.a")
|
||||
else()
|
||||
add_library(${OpenBLAS_LIBNAME}_static STATIC ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
|
||||
set(STATIC_PATH "lib${OpenBLAS_LIBNAME}.a")
|
||||
endif()
|
||||
set(CREATE_STATIC_LIBRARY_COMMAND
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/${OpenBLAS_LIBNAME}_static.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru ${STATIC_PATH} && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs ${STATIC_PATH} ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' ")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_dependencies(${OpenBLAS_LIBNAME}_shared ${OpenBLAS_LIBNAME}_static)
|
||||
set(SHARED_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib")
|
||||
endif()
|
||||
if(USE_OPENMP)
|
||||
get_target_property(OMP_LIB OpenMP::OpenMP_C INTERFACE_LINK_LIBRARIES)
|
||||
else()
|
||||
set(OMP_LIB "")
|
||||
endif()
|
||||
if(NOT NOFORTRAN)
|
||||
set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
set(CMAKE_Fortran_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
||||
"sh -c 'echo \"\" | ${CMAKE_Fortran_COMPILER} -o dummy.o -c -x f95-cpp-input - '"
|
||||
"sh -c '${CMAKE_Fortran_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,${STATIC_PATH} dummy.o -o ${SHARED_PATH} ${OMP_LIB}'")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_C_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_C_CREATE_SHARED_LIBRARY
|
||||
"sh -c '${CMAKE_C_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,${STATIC_PATH} -o ${SHARED_PATH} ${OMP_LIB}'")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Handle MSVC exports
|
||||
@@ -373,7 +430,7 @@ if (BUILD_SHARED_LIBS AND BUILD_RELAPACK)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
|
||||
if (BUILD_SHARED_LIBS OR DELETE_STATIC_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
|
||||
if (NOT DEFINED ARCH)
|
||||
set(ARCH_IN "x86_64")
|
||||
else()
|
||||
@@ -461,20 +518,44 @@ if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
|
||||
else ()
|
||||
set (BZ 0)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||
if (CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
set (CRTLIB msvcrtd)
|
||||
set (PDBOPT -debug -pdb:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.pdb)
|
||||
set (PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||
else ()
|
||||
set (CRTLIB msvcrt)
|
||||
set (PDBOPT "")
|
||||
endif()
|
||||
#if (USE_PERL)
|
||||
message(STATUS "adding postbuild instruction to rename syms")
|
||||
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_static POST_BUILD
|
||||
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol.pl "win2k" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" "${SYMBOLPREFIX}" "${SYMBOLSUFFIX}" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/renamesyms.def
|
||||
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR} -I${PROJECT_BINARY_DIR} -c -o ${PROJECT_BINARY_DIR}/dllinit.o ${PROJECT_SOURCE_DIR}/exports/dllinit.c
|
||||
COMMAND lld-link -nodefaultlib:libcmt -defaultlib:${CRTLIB} ${CMAKE_LINKER_FLAGS} -errorlimit:0 -def:${PROJECT_BINARY_DIR}/renamesyms.def ${PROJECT_BINARY_DIR}/dllinit.o $<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -wholearchive:$<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -dll -out:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll -implib:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll.a ${PDBOPT}
|
||||
#COMMAND lld-link -nodefaultlib:libcmt -defaultlib:msvcrt ${CMAKE_LINKER_FLAGS} -errorlimit:0 -def:${PROJECT_BINARY_DIR}/renamesyms.def ${PROJECT_BINARY_DIR}/dllinit.o $<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -wholearchive:$<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -dll -out:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll -implib:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll.a
|
||||
${REMOVE_STATIC_LIB} VERBATIM
|
||||
)
|
||||
#endif ()
|
||||
else ()
|
||||
if (NOT USE_PERL)
|
||||
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_shared POST_BUILD
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
|
||||
COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
|
||||
COMMAND sh ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
|
||||
COMMAND objcopy --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/${OpenBLAS_LIBNAME}.so
|
||||
COMMENT "renaming symbols"
|
||||
)
|
||||
else()
|
||||
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_shared POST_BUILD
|
||||
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol.pl "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
|
||||
COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
|
||||
COMMAND objcopy --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
|
||||
COMMENT "renaming symbols"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_BENCHMARKS)
|
||||
#find_package(OpenMP REQUIRED)
|
||||
@@ -645,3 +726,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
|
||||
install(EXPORT "${PN}${SUFFIX64}Targets"
|
||||
NAMESPACE "${PN}${SUFFIX64}::"
|
||||
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|
||||
|
||||
|
||||
+36
-1
@@ -26,6 +26,9 @@
|
||||
* Chris Sidebottom <chris.sidebottom@arm.com>
|
||||
* Optimizations and other improvements targeting AArch64
|
||||
|
||||
* Annop Wongwathanarat <annop.wongwathanarat@arm.com>
|
||||
* Optimizations and other improvements targeting AArch64
|
||||
|
||||
## Previous Developers
|
||||
|
||||
* Zaheer Chothia <zaheer.chothia@gmail.com>
|
||||
@@ -231,4 +234,36 @@ In chronological order:
|
||||
* [2024-01-24] Optimize GEMV forwarding on ARM64 systems
|
||||
|
||||
* Aniket P. Garade <https://github.com/garadeaniket> Sushil Pratap Singh <https://github.com/SushilPratap04> Juliya James <https://github.com/Juliya32>
|
||||
* [2024-12-13] Optimized swap and rot Level-1 BLAS routines with ARM SVE
|
||||
* [2024-12-13] Optimized swap and rot Level-1 BLAS routines with ARM SVE
|
||||
|
||||
* Annop Wongwathanarat <annop.wongwathanarat@arm.com>
|
||||
* [2025-01-10] Add thread throttling profile for SGEMM on NEOVERSEV1
|
||||
* [2025-01-21] Optimize gemv_t_sve_v1x3 kernel
|
||||
* [2025-02-26] Add sbgemv_t_bfdot kernel
|
||||
* [2025-03-12] Fix aarch64 sbgemv_t compilation error for GCC < 13
|
||||
* [2025-03-12] Optimize aarch64 sgemm_ncopy
|
||||
|
||||
* Marek Michalowski <marek.michalowski@arm.com>
|
||||
* [2025-01-21] Add thread throttling profile for SGEMV on `NEOVERSEV1`
|
||||
* [2025-02-18] Add thread throttling profile for SGEMM on `NEOVERSEV2`
|
||||
* [2025-02-19] Add thread throttling profile for SGEMV on `NEOVERSEV2`
|
||||
|
||||
* Ye Tao <ye.tao@arm.com>
|
||||
* [2025-02-03] Optimize SBGEMM kernel on NEOVERSEV1
|
||||
* [2025-02-27] Add sbgemv_n_neon kernel
|
||||
* [2025-05-17] Impl prototype of BGEMM inferface
|
||||
|
||||
* Abhishek Kumar <https://github.com/abhishek-iitmadras>
|
||||
* [2025-04-22] Optimise dot kernel for NEOVERSE V1
|
||||
* [2025-07-23] ARM64-Enable bfloat16 kernels by default
|
||||
|
||||
* Sharif Inamdar <sharif.inamdar@arm.com>
|
||||
* [2025-06-05] Optimize gemv_n_sve_v1x3 kernel
|
||||
|
||||
* Guoyuan Li <https://github.com/guoyuanplct>
|
||||
* [2025-04-11] Optimise gemv kernel for RISCV64_ZVL256B
|
||||
* [2025-05-01] Optimise zgemv kernel for RISCV64_ZVL256B
|
||||
* [2025-05-17] Optimise omatcopy/zomatcopy kernel for RISCV64_ZVL256B
|
||||
* [2025-05-29] Optimise axpby kernel for RISCV64_ZVL256B
|
||||
* [2025-06-05] Optimise hbmv kernel for RISCV64_ZVL256B
|
||||
|
||||
|
||||
+134
@@ -1,4 +1,138 @@
|
||||
OpenBLAS ChangeLog
|
||||
====================================================================
|
||||
Version 0.3.30
|
||||
19-Jun-2025
|
||||
|
||||
general:
|
||||
- fixed an installation problem with the thread safety test in gmake builds
|
||||
- fixed spurious overwriting of an input array in complex GEMMT/GEMMTR
|
||||
- fixed naming of GEMMTR in error messages from XERBLA
|
||||
- fixed compilation of SBGEMMT/SBGEMMTR in CMake builds
|
||||
- fixed the implementation of ?NRM2 to handle INCX=0 correctly
|
||||
- removed tests for CSROT and ZDROT that relied on unspecified behavior
|
||||
- fixed a performance regression in multithreaded GEMM that was particularly
|
||||
serious on POWER targets
|
||||
- fixed linking issues when using LLVM's flang-new with gmake
|
||||
- fixed a potential thread safety problem with C11 atomic operations
|
||||
- further improved the workload partitioning in parallel GEMM
|
||||
- fixed omission of LAPACKE interfaces for CGESVDQ,CTRSYL3 and ?GEQPF in
|
||||
CMake builds
|
||||
- fixed mishandling of setting NO_LAPACK to FALSE, and incorrect dependencies
|
||||
for LAPACK function SPMV in CMake builds
|
||||
- added explicit CMake options for building LAPACKE and shared libraries
|
||||
- simplified and improved handling of OpenMP options in CMake builds
|
||||
- reworked Windows DLL generation in CMake builds to ensure correct symbol
|
||||
renaming (pre/postfixing) and optional generation of PDB files for debugging
|
||||
- updated the Perl script version of the gensymbol utility for use with
|
||||
Windows-on-Arm
|
||||
- Fixed building with (Mingw) gmake on Windows to ensure completeness of the
|
||||
LAPACK included in the static library (potential race condition due to the
|
||||
Windows version of the "ln" utility creating snapshot copies rather than links)
|
||||
- fixed unwanted deletion of the lapacke_mangling.h file by "make clean"
|
||||
- fixed potential duplication of a _64 suffix on library names in CMake builds
|
||||
- fixed compilation of the C fallback copies of the LAPACK code with GCC 15
|
||||
- included fixed from the Reference-LAPACK project:
|
||||
- fixed a truncated error message in the EIG part of the testsuite
|
||||
(Reference-LAPACK PR 1119)
|
||||
- fixed too strict check in LAPACKE_?gesdd_work (PR #1126)
|
||||
- fixed memory corruption when calling ?GEEV with non-finite data (PR #1128)
|
||||
- fixed missing initialization of a variable in C/GEQP3RK (PR #1131)
|
||||
- fixed 2nd dimension chosen in C/ZUNMLQ transposition operation (PR #1135)
|
||||
|
||||
x86_64:
|
||||
- fixed an error in the SBGEMV kernel for Cooper Lake/Sapphire Rapids
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- improved the compiler identification code for flang-new
|
||||
- fixed a potential build issue in the ZSUM kernel
|
||||
- fixed "argument list too long" errors when building on MacOS
|
||||
- added cpu autodetection support for several new Arrow Lake models
|
||||
- fixed conditional inclusion of the fast path SGEMM kernel in DYNAMIC_ARCH
|
||||
- fixed compilation with the MinGW build of GCC 15
|
||||
|
||||
arm64:
|
||||
- fixed cpu type detection of A64FX and some ThunderX models (broken in 0.3.29)
|
||||
- added support for the AmpereOne/1A cpus in DYNAMIC_ ARCH builds
|
||||
- added an optimized SBGEMM kernel for NEOVERSEV1
|
||||
- improved 1xN SBGEMM performance by forwarding to SBGEMV
|
||||
- introduced a stepwise increase of the thread count used for
|
||||
SGEMM and SGEMV on NEOVERSEV1/V2 in relation to problem size
|
||||
- introduced a stepwise increase of the thread count used for
|
||||
DGEMV on NEOVERSEV1 in relation to problem size
|
||||
- introduced a stepwise increase of the thread count used for
|
||||
SDOT and DDOT on NEOVERSEV1 in relation to problem size
|
||||
- worked around assembler limitations in LLVM for Windows-on-Arm
|
||||
- enabled cpu type autodetection from the registry on Windows-on-Arm
|
||||
- improved multithreading threshold for GEMV and GESV on Windows-on-Arm
|
||||
- fixed overoptimization issues with LLVM's flang in Windows-on-Arm
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- added a fast path SGEMM kernel for small workloads on SME capable targets
|
||||
- improved performance of SGEMM and DGEMM kernels for small workloads
|
||||
- improved performance of SGEMV and DGEMV on SVE-capable targets
|
||||
- improved performance of SGEMV on NEOVERSEN1 and Apple M
|
||||
- added optimized SSYMV and DSYMV kernels for NEOVERSEN1, Apple M and all
|
||||
SVE capable targets
|
||||
- added optimized SBGEMV kernels for NEOVERSEV1/V2/N2
|
||||
- improved performance of SGEMM through faster NCOPY kernels
|
||||
- added compiler options for the NVIDIA HPC Compiler Suite
|
||||
- fixed compilation on OSX with XCode 16.3 and later
|
||||
- fixed cpu core type and cache size detection on Apple M4
|
||||
- updated GEMM parameter settings for Neoverse cpus in cross-builds with CMake
|
||||
- fixed default compiler options for NEOVERSEN1 and CORTEXX2 in CMake builds
|
||||
- fixed conditional inclusion of the fast path SGEMM kernel in DYNAMIC_ARCH
|
||||
- fixed potential miscompilation of the non-SVE SDOT kernel
|
||||
|
||||
riscv64:
|
||||
- added optimized SROTM and DROTM kernels for x280
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- improved performance of GEMM_TCOPY on RVV1.0 targets with
|
||||
VLEN of 128 or 256
|
||||
- improved performance of OMATCOPY on targets with VLEN 256
|
||||
- greatly improved performance of SGEMV/DGEMV
|
||||
- improved performance of CGEMV and ZGEMV on C910V and all RVV targets
|
||||
with VLEN 256
|
||||
- improved performance of SAXPBY and DAXPBY on C910V and all RVV targets
|
||||
with VLEN 256
|
||||
- improved performance of AXPY and DOT on C910V and ZVL256B targets by
|
||||
falling back to non-vectorized code for very small N. (Thereby fixing
|
||||
poor performance of CHBMV/ZHBMV for very small K)
|
||||
- fixed CMake build failures of the TRMM kernels
|
||||
|
||||
loongarch64:
|
||||
- improved performance of the LSX versions of SSYMV/DSYMV
|
||||
- made the LASX versions of the DSYMV and SSYMV kernels
|
||||
compatible with hardware changes in LA664 and future targets
|
||||
- fixed inaccuracies in several LASX kernels
|
||||
- improved compatibility of LSX kernels with LA264 targets
|
||||
- fixed handling of deprecated target names in CMake builds
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
|
||||
power:
|
||||
- fixed building for PPCG4 with CMake
|
||||
- fixed SSCAL/DSCAL on PPC970 running FreeBSD
|
||||
- fixed a potential alignment issue in the POWER8 SGEMV kernel
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
|
||||
zarch:
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- fixed unwanted generation of object files with a writable stack
|
||||
|
||||
x86:
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- worked around potential miscompilation of CDOT with very old binutils
|
||||
|
||||
arm:
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- fixed unwanted generation of object files with a writable stack
|
||||
|
||||
sparc:
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
|
||||
alpha:
|
||||
- fixed build failure caused by spurious Windows-only typecasts
|
||||
|
||||
cell:
|
||||
- fixed probable build issue caused by spurious Windows-only typecasts
|
||||
|
||||
====================================================================
|
||||
Version 0.3.29
|
||||
12-Jan-2025
|
||||
|
||||
Vendored
+5
@@ -10,5 +10,10 @@ pipeline {
|
||||
sh 'make clean && make'
|
||||
}
|
||||
}
|
||||
stage('CMakeBuild') {
|
||||
steps {
|
||||
sh 'sudo apt update && sudo apt install cmake -y && make clean && rm -rf build && mkdir build && cd build && cmake -DDYNAMIC_ARCH=1 .. && make'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,11 @@ ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
|
||||
echo " Fortran compiler ... $(F_COMPILER) (command line : $(FC))";\
|
||||
fi
|
||||
endif
|
||||
|
||||
ifeq ($(OSNAME), WINNT)
|
||||
@-$(LNCMD) $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
|
||||
endif
|
||||
|
||||
ifneq ($(OSNAME), AIX)
|
||||
@echo -n " Library Name ... $(LIBNAME)"
|
||||
else
|
||||
@@ -447,7 +452,7 @@ endif
|
||||
@rm -f cblas.tmp cblas.tmp2
|
||||
@touch $(NETLIB_LAPACK_DIR)/make.inc
|
||||
@$(MAKE) -C $(NETLIB_LAPACK_DIR) clean
|
||||
@rm -f $(NETLIB_LAPACK_DIR)/make.inc $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_mangling.h
|
||||
@rm -f $(NETLIB_LAPACK_DIR)/make.inc
|
||||
@$(MAKE) -C relapack clean
|
||||
@rm -f *.grd Makefile.conf_last config_last.h
|
||||
@(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt)
|
||||
|
||||
+53
-5
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
@@ -30,6 +58,11 @@ FCOMMON_OPT += -march=armv8-a+sve
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), ARMV9SME)
|
||||
CCOMMON_OPT += -march=armv9-a+sve2+sme
|
||||
FCOMMON_OPT += -march=armv9-a+sve2
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), CORTEXA53)
|
||||
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
@@ -101,7 +134,7 @@ ifeq ($(CORE), NEOVERSEV1)
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG)))
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG)))
|
||||
ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG)))
|
||||
CCOMMON_OPT += -march=armv8.4-a+sve
|
||||
CCOMMON_OPT += -march=armv8.4-a+sve+bf16
|
||||
ifeq (1, $(ISCLANG))
|
||||
CCOMMON_OPT += -mtune=cortex-x1
|
||||
else
|
||||
@@ -111,7 +144,7 @@ ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv8.4-a -mtune=neoverse-v1
|
||||
endif
|
||||
else
|
||||
CCOMMON_OPT += -march=armv8.4-a+sve
|
||||
CCOMMON_OPT += -march=armv8.4-a+sve+bf16
|
||||
ifneq ($(CROSS), 1)
|
||||
CCOMMON_OPT += -mtune=native
|
||||
endif
|
||||
@@ -178,10 +211,25 @@ endif
|
||||
|
||||
# Detect ARM Neoverse V2.
|
||||
ifeq ($(CORE), NEOVERSEV2)
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
|
||||
CCOMMON_OPT += -march=armv9-a -mtune=neoverse-v2
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ13) $(ISCLANG)))
|
||||
CCOMMON_OPT += -mcpu=neoverse-v2
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv9-a -mtune=neoverse-v2
|
||||
FCOMMON_OPT += -mcpu=neoverse-v2
|
||||
endif
|
||||
else
|
||||
CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n1
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv8.2-a -mtune=neoverse-n1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Detect Ampere AmpereOne(ampere1,ampere1a) processors.
|
||||
ifeq ($(CORE), AMPERE1)
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
|
||||
CCOMMON_OPT += -march=armv8.6-a+crypto+crc+fp16+sha3+rng
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv8.6-a+crypto+crc+fp16+sha3+rng
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
+26
-3
@@ -71,7 +71,7 @@ install : lib.grd
|
||||
@cat common_interface.h >> "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/f77blas.h"
|
||||
@echo \#endif >> "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/f77blas.h"
|
||||
|
||||
ifndef NO_CBLAS
|
||||
ifneq ($(NO_CBLAS),1)
|
||||
@echo Generating cblas.h in $(DESTDIR)$(OPENBLAS_INCLUDE_DIR)
|
||||
@cp cblas.h cblas.tmp
|
||||
ifdef SYMBOLPREFIX
|
||||
@@ -189,6 +189,8 @@ endif
|
||||
|
||||
|
||||
#Generating OpenBLASConfig.cmake
|
||||
ifneq ($(origin _OpenBLAS_ROOT_DIR),"undefined")
|
||||
|
||||
@echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
|
||||
@echo "SET(OpenBLAS_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@echo "file(REAL_PATH \"../../..\" _OpenBLAS_ROOT_DIR BASE_DIRECTORY \$${CMAKE_CURRENT_LIST_DIR} )" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@@ -215,6 +217,27 @@ else
|
||||
#only static
|
||||
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/lib/$(LIBPREFIX).$(LIBSUFFIX))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
else
|
||||
echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
|
||||
@echo "SET(OpenBLAS_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@echo "SET(OpenBLAS_INCLUDE_DIRS ${OPENBLAS_INCLUDE_DIR})" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
ifneq ($(NO_SHARED),1)
|
||||
#ifeq logical or
|
||||
ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD OpenBSD DragonFly))
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX)$(SYMBOLSUFFIX).so)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
ifeq ($(OSNAME), $(filter $(OSNAME),WINNT CYGWIN_NT))
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_BINARY_DIR}/$(LIBDLLNAME))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
ifeq ($(OSNAME), Darwin)
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX).dylib)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
else
|
||||
#only static
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX).$(LIBSUFFIX))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#Generating OpenBLASConfigVersion.cmake
|
||||
@echo Generating $(OPENBLAS_CMAKE_CONFIG_VERSION) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
|
||||
@echo "set (PACKAGE_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG_VERSION)"
|
||||
@@ -315,8 +338,8 @@ endif
|
||||
|
||||
endif
|
||||
ifeq ($(CPP_THREAD_SAFETY_TEST), 1)
|
||||
@install -m 666 cpp_thread_test/dgemm_tester $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 cpp_thread_test/dgemv_tester $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 cpp_thread_test/dgemm_tester $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 cpp_thread_test/dgemv_tester $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
+6
-6
@@ -13,16 +13,16 @@ ifeq ($(CORE), POWER10)
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
ifeq ($(GCCVERSIONGTEQ10), 1)
|
||||
CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
else ifneq ($(GCCVERSIONGT4), 1)
|
||||
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
|
||||
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
|
||||
else
|
||||
$(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended)
|
||||
CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math
|
||||
endif
|
||||
else
|
||||
CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
endif
|
||||
ifeq ($(F_COMPILER), IBM)
|
||||
FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize
|
||||
@@ -34,7 +34,7 @@ endif
|
||||
|
||||
ifeq ($(CORE), POWER9)
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
CCOMMON_OPT += -Ofast -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mvsx -fno-fast-math
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
ifneq ($(GCCVERSIONGT4), 1)
|
||||
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
|
||||
@@ -70,7 +70,7 @@ endif
|
||||
|
||||
ifeq ($(CORE), POWER8)
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
|
||||
else
|
||||
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
|
||||
endif
|
||||
|
||||
+11
-1
@@ -7,13 +7,23 @@ CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d -static
|
||||
endif
|
||||
ifeq ($(CORE), RISCV64_ZVL256B)
|
||||
ifeq ($(BUILD_HFLOAT16), 1)
|
||||
CCOMMON_OPT += -march=rv64imafdcv_zvl256b_zvfh_zfh -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
|
||||
else
|
||||
CCOMMON_OPT += -march=rv64imafdcv_zvl256b -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CORE), RISCV64_ZVL128B)
|
||||
CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
|
||||
ifeq ($(BUILD_HFLOAT16), 1)
|
||||
CCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
|
||||
else
|
||||
CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CORE), RISCV64_GENERIC)
|
||||
CCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
|
||||
|
||||
+3
-1
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# This library's version
|
||||
VERSION = 0.3.29
|
||||
VERSION = 0.3.30.dev
|
||||
|
||||
# If you set this prefix, the library name will be lib$(LIBNAMESUFFIX)openblas.a
|
||||
# and lib$(LIBNAMESUFFIX)openblas.so, with a matching soname in the shared library
|
||||
@@ -308,6 +308,8 @@ COMMON_PROF = -pg
|
||||
# If you want to enable the experimental BFLOAT16 support
|
||||
# BUILD_BFLOAT16 = 1
|
||||
|
||||
# If you want to enable the experimental HFLOAT16 support
|
||||
# BUILD_HFLOAT16 = 1
|
||||
|
||||
# Set the thread number threshold beyond which the job array for the threaded level3 BLAS
|
||||
# will be allocated on the heap rather than the stack. (This array alone requires
|
||||
|
||||
+37
-5
@@ -270,19 +270,22 @@ SMALL_MATRIX_OPT = 1
|
||||
BUILD_BFLOAT16 = 1
|
||||
else ifeq ($(ARCH), arm64)
|
||||
SMALL_MATRIX_OPT = 1
|
||||
BUILD_BFLOAT16 = 1
|
||||
endif
|
||||
ifeq ($(ARCH), loongarch64)
|
||||
SMALL_MATRIX_OPT = 1
|
||||
endif
|
||||
ifeq ($(ARCH), arm64)
|
||||
GEMM_GEMV_FORWARD = 1
|
||||
SBGEMM_GEMV_FORWARD = 1
|
||||
BGEMM_GEMV_FORWARD = 1
|
||||
endif
|
||||
ifeq ($(ARCH), riscv)
|
||||
GEMM_GEMV_FORWARD = 1
|
||||
endif
|
||||
ifeq ($(ARCH), power)
|
||||
GEMM_GEMV_FORWARD = 1
|
||||
GEMM_GEMV_FORWARD_BF16 = 1
|
||||
SBGEMM_GEMV_FORWARD = 1
|
||||
endif
|
||||
|
||||
ifeq ($(SMALL_MATRIX_OPT), 1)
|
||||
@@ -292,8 +295,11 @@ ifneq ($(ONLY_CBLAS), 1)
|
||||
ifeq ($(GEMM_GEMV_FORWARD), 1)
|
||||
CCOMMON_OPT += -DGEMM_GEMV_FORWARD
|
||||
endif
|
||||
ifeq ($(GEMM_GEMV_FORWARD_BF16), 1)
|
||||
CCOMMON_OPT += -DGEMM_GEMV_FORWARD_BF16
|
||||
ifeq ($(SBGEMM_GEMV_FORWARD), 1)
|
||||
CCOMMON_OPT += -DSBGEMM_GEMV_FORWARD
|
||||
endif
|
||||
ifeq ($(BGEMM_GEMV_FORWARD), 1)
|
||||
CCOMMON_OPT += -DBGEMM_GEMV_FORWARD
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -392,6 +398,8 @@ GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
||||
GCCVERSIONGTEQ10 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 10)
|
||||
GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
|
||||
GCCVERSIONGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||
GCCVERSIONGTEQ13 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 13)
|
||||
GCCVERSIONGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
||||
# Note that the behavior of -dumpversion is compile-time-configurable for
|
||||
# gcc-7.x and newer. Use -dumpfullversion there
|
||||
ifeq ($(GCCVERSIONGTEQ7),1)
|
||||
@@ -418,9 +426,8 @@ ifeq ($(OSNAME), Darwin)
|
||||
ifndef MACOSX_DEPLOYMENT_TARGET
|
||||
ifeq ($(ARCH), arm64)
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
export NO_SVE = 1
|
||||
endif
|
||||
export NO_SME = 1
|
||||
else
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.8
|
||||
endif
|
||||
@@ -434,6 +441,9 @@ ifeq (x$(XCVER), x 15)
|
||||
CCOMMON_OPT += -Wl,-ld_classic
|
||||
FCOMMON_OPT += -Wl,-ld_classic
|
||||
endif
|
||||
ifeq (x$(XCVER), x 16)
|
||||
override CEXTRALIB := $(filter-out(-lto_library, $(CEXTRALIB)))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring $(OSNAME), FreeBSD OpenBSD DragonFly))
|
||||
@@ -709,6 +719,9 @@ DYNAMIC_CORE += NEOVERSEN2
|
||||
DYNAMIC_CORE += ARMV8SVE
|
||||
DYNAMIC_CORE += A64FX
|
||||
endif
|
||||
ifneq ($(NO_SME), 1)
|
||||
DYNAMIC_CORE += ARMV9SME
|
||||
endif
|
||||
DYNAMIC_CORE += THUNDERX
|
||||
DYNAMIC_CORE += THUNDERX2T99
|
||||
DYNAMIC_CORE += TSV110
|
||||
@@ -1181,6 +1194,13 @@ endif
|
||||
else ifeq ($(ARCH), $(filter $(ARCH),mips))
|
||||
FCOMMON_OPT += -mabi=32
|
||||
endif
|
||||
ifeq ($(ARCH), $(filter $(ARCH),loongarch64))
|
||||
ifdef INTERFACE64
|
||||
ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -fdefault-integer-8
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifdef BINARY64
|
||||
ifneq ($(OSNAME), AIX)
|
||||
@@ -1472,6 +1492,10 @@ ifeq ($(NO_SVE), 1)
|
||||
CCOMMON_OPT += -DNO_SVE
|
||||
endif
|
||||
|
||||
ifeq ($(NO_SME), 1)
|
||||
CCOMMON_OPT += -DNO_SME
|
||||
endif
|
||||
|
||||
ifdef SMP
|
||||
CCOMMON_OPT += -DSMP_SERVER
|
||||
|
||||
@@ -1533,6 +1557,9 @@ endif
|
||||
ifeq ($(BUILD_BFLOAT16), 1)
|
||||
CCOMMON_OPT += -DBUILD_BFLOAT16
|
||||
endif
|
||||
ifeq ($(BUILD_HFLOAT16), 1)
|
||||
CCOMMON_OPT += -DBUILD_HFLOAT16
|
||||
endif
|
||||
ifeq ($(BUILD_SINGLE), 1)
|
||||
CCOMMON_OPT += -DBUILD_SINGLE=1
|
||||
endif
|
||||
@@ -1875,11 +1902,16 @@ export TARGET_CORE
|
||||
export NO_AVX512
|
||||
export NO_AVX2
|
||||
export BUILD_BFLOAT16
|
||||
export BUILD_HFLOAT16
|
||||
export NO_LSX
|
||||
export NO_LASX
|
||||
|
||||
export BGEMM_UNROLL_M
|
||||
export BGEMM_UNROLL_N
|
||||
export SBGEMM_UNROLL_M
|
||||
export SBGEMM_UNROLL_N
|
||||
export SHGEMM_UNROLL_M
|
||||
export SHGEMM_UNROLL_N
|
||||
export SGEMM_UNROLL_M
|
||||
export SGEMM_UNROLL_N
|
||||
export DGEMM_UNROLL_M
|
||||
|
||||
+36
-2
@@ -1,4 +1,34 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
BBLASOBJS_P = $(BBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
SBBLASOBJS_P = $(SBBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
SHBLASPBJS_P = $(SHBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
SBLASOBJS_P = $(SBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
DBLASOBJS_P = $(DBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
QBLASOBJS_P = $(QBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
@@ -11,8 +41,8 @@ COMMONOBJS_P = $(COMMONOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
|
||||
HPLOBJS_P = $(HPLOBJS:.$(SUFFIX)=.$(PSUFFIX))
|
||||
|
||||
BLASOBJS = $(SBEXTOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(CBAUXOBJS)
|
||||
BLASOBJS_P = $(SBEXTOBJS_P) $(SBBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) $(CBAUXOBJS_P)
|
||||
BLASOBJS = $(SHBLASOBJS) $(BBLASOBJS) $(SBEXTOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(CBAUXOBJS)
|
||||
BLASOBJS_P = $(SHBLASPBJS_P) $(BBLASOBJS_P) $(SBEXTOBJS_P) $(SBBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) $(CBAUXOBJS_P)
|
||||
|
||||
ifdef EXPRECISION
|
||||
BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
|
||||
@@ -24,6 +54,8 @@ BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
|
||||
BLASOBJS_P += $(QBLASOBJS_P) $(XBLASOBJS_P)
|
||||
endif
|
||||
|
||||
$(SHBLASOBJS) $(SHBLASOBJS_P) : override CFLAGS += -DHFLOAT16 -UDOUBLE -UCOMPLEX
|
||||
$(BBLASOBJS) $(BBLASOBJS_P) : override CFLAGS += -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX
|
||||
$(SBBLASOBJS) $(SBBLASOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
|
||||
$(SBLASOBJS) $(SBLASOBJS_P) : override CFLAGS += -UDOUBLE -UCOMPLEX
|
||||
$(DBLASOBJS) $(DBLASOBJS_P) : override CFLAGS += -DDOUBLE -UCOMPLEX
|
||||
@@ -33,6 +65,8 @@ $(ZBLASOBJS) $(ZBLASOBJS_P) : override CFLAGS += -DDOUBLE -DCOMPLEX
|
||||
$(XBLASOBJS) $(XBLASOBJS_P) : override CFLAGS += -DXDOUBLE -DCOMPLEX
|
||||
$(SBEXTOBJS) $(SBEXTOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
|
||||
|
||||
$(SHBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(BBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(SBBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(SBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
$(DBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
|
||||
|
||||
@@ -29,6 +29,7 @@ For a general introduction to the BLAS routines, please refer to the extensive d
|
||||
We provide official binary packages for the following platform:
|
||||
|
||||
* Windows x86/x86_64
|
||||
* Windows arm64 (woa)
|
||||
|
||||
You can download them from [file hosting on sourceforge.net](https://sourceforge.net/projects/openblas/files/) or from the [Releases section of the GitHub project page](https://github.com/OpenMathLib/OpenBLAS/releases).
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ POWER7
|
||||
POWER8
|
||||
POWER9
|
||||
POWER10
|
||||
POWER11
|
||||
PPCG4
|
||||
PPC970
|
||||
PPC970MP
|
||||
@@ -101,6 +102,7 @@ CORTEXX2
|
||||
NEOVERSEN1
|
||||
NEOVERSEV1
|
||||
NEOVERSEN2
|
||||
NEOVERSEV2
|
||||
CORTEXA55
|
||||
EMAG8180
|
||||
FALKOR
|
||||
@@ -111,6 +113,7 @@ THUNDERX3T110
|
||||
VORTEX
|
||||
A64FX
|
||||
ARMV8SVE
|
||||
ARMV9SME
|
||||
FT2000
|
||||
|
||||
9.System Z:
|
||||
|
||||
+40
-14
@@ -25,14 +25,28 @@ jobs:
|
||||
echo "FROM quay.io/pypa/manylinux1_x86_64
|
||||
COPY . /tmp/openblas
|
||||
RUN cd /tmp/openblas && \
|
||||
COMMON_FLAGS='DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32' && \
|
||||
BTYPE='BINARY=64' CC=gcc && \
|
||||
make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE && \
|
||||
make -C test $COMMON_FLAGS $BTYPE && \
|
||||
make -C ctest $COMMON_FLAGS $BTYPE && \
|
||||
make -C utest $COMMON_FLAGS $BTYPE" > Dockerfile
|
||||
CC=gcc && \
|
||||
make QUIET_MAKE=1 BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C test BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C ctest BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C utest BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32" > Dockerfile
|
||||
docker build .
|
||||
displayName: Run manylinux1 docker build
|
||||
- job: manylinux_32bit
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: |
|
||||
echo "FROM quay.io/pypa/manylinux2014_i686
|
||||
COPY . /tmp/openblas
|
||||
RUN cd /tmp/openblas && \
|
||||
CC=gcc && \
|
||||
make QUIET_MAKE=1 BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C test BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C ctest BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C utest BINARY=32 TARGET=NEHALEM NUM_THREADS=32" > Dockerfile
|
||||
docker build .
|
||||
displayName: Run manylinux 32bit docker build
|
||||
- job: Intel_SDE_skx
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
@@ -141,7 +155,7 @@ jobs:
|
||||
|
||||
- job: OSX_OpenMP
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
@@ -151,7 +165,7 @@ jobs:
|
||||
|
||||
- job: OSX_GCC_Nothreads
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
@@ -164,7 +178,19 @@ jobs:
|
||||
- script: |
|
||||
brew update
|
||||
make CC=gcc-12 FC=gfortran-12
|
||||
|
||||
|
||||
- job: OSX_LLVM_flangnew
|
||||
pool:
|
||||
vmImage: 'macOS-latest'
|
||||
variables:
|
||||
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
brew install llvm flang
|
||||
make TARGET=NEHALEM CC=/usr/local/opt/llvm/bin/clang FC=/usr/local/opt/flang/bin/flang NO_SHARED=1
|
||||
|
||||
- job: OSX_OpenMP_Clang
|
||||
pool:
|
||||
vmImage: 'macOS-latest'
|
||||
@@ -195,7 +221,7 @@ jobs:
|
||||
|
||||
- job: OSX_dynarch_cmake
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
variables:
|
||||
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
@@ -242,7 +268,7 @@ jobs:
|
||||
|
||||
- job: OSX_NDK_ARMV7
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
@@ -252,7 +278,7 @@ jobs:
|
||||
|
||||
- job: OSX_IOS_ARMV8
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
variables:
|
||||
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -arch arm64 -miphoneos-version-min=10.0
|
||||
@@ -262,7 +288,7 @@ jobs:
|
||||
|
||||
- job: OSX_IOS_ARMV7
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
variables:
|
||||
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
CFLAGS: -O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -arch armv7 -miphoneos-version-min=5.1
|
||||
@@ -272,7 +298,7 @@ jobs:
|
||||
|
||||
- job: OSX_xbuild_DYNAMIC_ARM64
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
variables:
|
||||
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -arch arm64
|
||||
|
||||
+64
-5
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
TOPDIR = ..
|
||||
include $(TOPDIR)/Makefile.system
|
||||
|
||||
@@ -56,9 +84,15 @@ GOTO_LAPACK_TARGETS=
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
GOTO_HALF_TARGETS=sbgemm.goto
|
||||
GOTO_BFLOAT_TARGETS=bgemm.goto sbgemm.goto bgemv.goto sbgemv.goto
|
||||
else
|
||||
GOTO_HALF_TARGETS=
|
||||
GOTO_BFLOAT_TARGETS=
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
GOTO_HFLOAT_TARGETS=shgemm.goto
|
||||
else
|
||||
GOTO_HFLOAT_TARGETS=
|
||||
endif
|
||||
|
||||
ifeq ($(OSNAME), WINNT)
|
||||
@@ -104,7 +138,7 @@ goto :: slinpack.goto dlinpack.goto clinpack.goto zlinpack.goto \
|
||||
spotrf.goto dpotrf.goto cpotrf.goto zpotrf.goto \
|
||||
ssymm.goto dsymm.goto csymm.goto zsymm.goto \
|
||||
somatcopy.goto domatcopy.goto comatcopy.goto zomatcopy.goto \
|
||||
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto $(GOTO_HALF_TARGETS)
|
||||
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto $(GOTO_BFLOAT_TARGETS) $(GOTO_HFLOAT_TARGETS)
|
||||
|
||||
acml :: slinpack.acml dlinpack.acml clinpack.acml zlinpack.acml \
|
||||
scholesky.acml dcholesky.acml ccholesky.acml zcholesky.acml \
|
||||
@@ -278,7 +312,7 @@ goto :: sgemm.goto dgemm.goto cgemm.goto zgemm.goto \
|
||||
smin.goto dmin.goto \
|
||||
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto \
|
||||
somatcopy.goto domatcopy.goto comatcopy.goto zomatcopy.goto \
|
||||
snrm2.goto dnrm2.goto scnrm2.goto dznrm2.goto $(GOTO_LAPACK_TARGETS) $(GOTO_HALF_TARGETS)
|
||||
snrm2.goto dnrm2.goto scnrm2.goto dznrm2.goto $(GOTO_LAPACK_TARGETS) $(GOTO_BFLOAT_TARGETS) $(GOTO_HFLOAT_TARGETS)
|
||||
|
||||
acml :: slinpack.acml dlinpack.acml clinpack.acml zlinpack.acml \
|
||||
scholesky.acml dcholesky.acml ccholesky.acml zcholesky.acml \
|
||||
@@ -629,8 +663,19 @@ zcholesky.essl : zcholesky.$(SUFFIX)
|
||||
|
||||
##################################### Sgemm ####################################################
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemm.goto : bgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
sbgemm.goto : sbgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
bgemv.goto : bgemv.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
sbgemv.goto : sbgemv.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
shgemm.goto : shgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
endif
|
||||
|
||||
sgemm.goto : sgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
@@ -2959,8 +3004,15 @@ zcholesky.$(SUFFIX) : cholesky.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemm.$(SUFFIX) : gemm.c
|
||||
$(CC) $(CFLAGS) -c -DBFLOAT16 -DBGEMM -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
sbgemm.$(SUFFIX) : gemm.c
|
||||
$(CC) $(CFLAGS) -c -DHALF -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
$(CC) $(CFLAGS) -c -DBFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
shgemm.$(SUFFIX) : gemm.c
|
||||
$(CC) $(CFLAGS) -c -DHFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
endif
|
||||
|
||||
sgemm.$(SUFFIX) : gemm.c
|
||||
@@ -3098,6 +3150,13 @@ dgemv.$(SUFFIX) : gemv.c
|
||||
cgemv.$(SUFFIX) : gemv.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemv.$(SUFFIX) : gemv.c
|
||||
$(CC) $(CFLAGS) -c -DBFLOAT16 -DBGEMM -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
sbgemv.$(SUFFIX) : gemv.c
|
||||
$(CC) $(CFLAGS) -c -DBFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
endif ()
|
||||
|
||||
zgemv.$(SUFFIX) : gemv.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
|
||||
|
||||
|
||||
+20
-1
@@ -33,10 +33,19 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifdef DOUBLE
|
||||
#define GEMM BLASFUNC(dgemm)
|
||||
#elif defined(HALF)
|
||||
#elif defined(BFLOAT16) && defined(BGEMM)
|
||||
#define GEMM BLASFUNC(bgemm)
|
||||
#elif defined(BFLOAT16)
|
||||
#define GEMM BLASFUNC(sbgemm)
|
||||
#undef IFLOAT
|
||||
#define IFLOAT bfloat16
|
||||
#elif defined(HFLOAT16)
|
||||
#define GEMM BLASFUNC(shgemm)
|
||||
#undef IFLOAT
|
||||
#define IFLOAT hfloat16
|
||||
#else
|
||||
#define GEMM BLASFUNC(sgemm)
|
||||
#define IFLOAT float
|
||||
#endif
|
||||
|
||||
#else
|
||||
@@ -53,8 +62,18 @@ int main(int argc, char *argv[]){
|
||||
|
||||
IFLOAT *a, *b;
|
||||
FLOAT *c;
|
||||
#ifdef BGEMM
|
||||
blasint one=1;
|
||||
blasint two=2;
|
||||
float alpha_in[] = {1.0, 0.0};
|
||||
float beta_in[] = {0.0, 0.0};
|
||||
FLOAT alpha[2], beta[2];
|
||||
sbstobf16_(&two, alpha_in, &one, alpha, &one);
|
||||
sbstobf16_(&two, beta_in, &one, beta, &one);
|
||||
#else
|
||||
FLOAT alpha[] = {1.0, 0.0};
|
||||
FLOAT beta [] = {0.0, 0.0};
|
||||
#endif
|
||||
char transa = 'N';
|
||||
char transb = 'N';
|
||||
blasint m, n, k, i, j, lda, ldb, ldc;
|
||||
|
||||
+25
-8
@@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
Copyright (c) 2014, The OpenBLAS Project
|
||||
Copyright (c) 2014, 2025 The OpenBLAS Project
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
@@ -34,6 +34,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifdef DOUBLE
|
||||
#define GEMV BLASFUNC(dgemv)
|
||||
#elif defined(BFLOAT16) && defined(BGEMM)
|
||||
#define GEMV BLASFUNC(bgemv)
|
||||
#elif defined(BFLOAT16)
|
||||
#define GEMV BLASFUNC(sbgemv)
|
||||
#undef IFLOAT
|
||||
#define IFLOAT bfloat16
|
||||
#else
|
||||
#define GEMV BLASFUNC(sgemv)
|
||||
#endif
|
||||
@@ -49,9 +55,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#endif
|
||||
int main(int argc, char *argv[]){
|
||||
|
||||
FLOAT *a, *x, *y;
|
||||
FLOAT alpha[] = {1.0, 1.0};
|
||||
FLOAT beta [] = {1.0, 0.0};
|
||||
IFLOAT *a, *x;
|
||||
FLOAT *y;
|
||||
#ifdef BGEMM
|
||||
blasint one=1;
|
||||
blasint two=2;
|
||||
float alpha_in[] = {1.0, 0.0};
|
||||
float beta_in[] = {0.0, 0.0};
|
||||
FLOAT alpha[2], beta[2];
|
||||
sbstobf16_(&two, alpha_in, &one, alpha, &one);
|
||||
sbstobf16_(&two, beta_in, &one, beta, &one);
|
||||
#else
|
||||
FLOAT alpha[] = {1.0, 0.0};
|
||||
FLOAT beta [] = {0.0, 0.0};
|
||||
#endif
|
||||
char trans='N';
|
||||
blasint m, i, j;
|
||||
blasint inc_x=1,inc_y=1;
|
||||
@@ -97,11 +114,11 @@ int main(int argc, char *argv[]){
|
||||
|
||||
fprintf(stderr, "From : %3d To : %3d Step = %3d Trans = '%c' Inc_x = %d Inc_y = %d Loops = %d\n", from, to, step,trans,inc_x,inc_y,loops);
|
||||
|
||||
if (( a = (FLOAT *)malloc(sizeof(FLOAT) * tomax * tomax * COMPSIZE)) == NULL){
|
||||
if (( a = (IFLOAT *)malloc(sizeof(IFLOAT) * tomax * tomax * COMPSIZE)) == NULL){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
if (( x = (FLOAT *)malloc(sizeof(FLOAT) * tomax * abs(inc_x) * COMPSIZE)) == NULL){
|
||||
if (( x = (IFLOAT *)malloc(sizeof(IFLOAT) * tomax * abs(inc_x) * COMPSIZE)) == NULL){
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
@@ -125,7 +142,7 @@ int main(int argc, char *argv[]){
|
||||
fprintf(stderr, " %6dx%d : ", (int)m,(int)n);
|
||||
for(j = 0; j < m; j++){
|
||||
for(i = 0; i < n * COMPSIZE; i++){
|
||||
a[(long)i + (long)j * (long)m * COMPSIZE] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
|
||||
a[(long)i + (long)j * (long)m * COMPSIZE] = ((IFLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +150,7 @@ int main(int argc, char *argv[]){
|
||||
{
|
||||
|
||||
for(i = 0; i < n * COMPSIZE * abs(inc_x); i++){
|
||||
x[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
|
||||
x[i] = ((IFLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
|
||||
}
|
||||
|
||||
for(i = 0; i < m * COMPSIZE * abs(inc_y); i++){
|
||||
|
||||
@@ -334,6 +334,24 @@ if [ "$architecture" = "arm64" ]; then
|
||||
rm -rf "$tmpd"
|
||||
fi
|
||||
|
||||
no_sme=0
|
||||
if [ "$architecture" = "arm64" ]; then
|
||||
tmpd=$(mktemp -d 2>/dev/null || mktemp -d -t 'OBC')
|
||||
tmpf="$tmpd/a.S"
|
||||
printf ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n">> "$tmpf"
|
||||
args=" -march=armv9-a+sve2+sme -c -o $tmpf.o $tmpf"
|
||||
no_sme=0
|
||||
{
|
||||
$compiler_name $flags $args >/dev/null 2>&1
|
||||
} || {
|
||||
args=" -march=armv9-a+sme -c -o $tmpf.o $tmpf"
|
||||
$compiler_name $flags $args >/dev/null 2>&1
|
||||
} || {
|
||||
no_sme=1
|
||||
}
|
||||
rm -rf "$tmpd"
|
||||
fi
|
||||
|
||||
c11_atomics=0
|
||||
case "$data" in
|
||||
*HAVE_C11*)
|
||||
@@ -475,6 +493,7 @@ done
|
||||
printf "CEXTRALIB=%s %s %s\n" "$linker_L" "$linker_l" "$linker_a"
|
||||
[ "$no_msa" -eq 1 ] && printf "NO_MSA=1\n"
|
||||
[ "$no_sve" -eq 1 ] && printf "NO_SVE=1\n"
|
||||
[ "$no_sme" -eq 1 ] && printf "NO_SME=1\n"
|
||||
[ "$no_rv64gv" -eq 1 ] && printf "NO_RV64GV=1\n"
|
||||
[ "$no_avx512" -eq 1 ] && printf "NO_AVX512=1\n"
|
||||
[ "$no_avx512bf" -eq 1 ] && printf "NO_AVX512BF16=1\n"
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2025, The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#ifndef CBLAS_H
|
||||
#define CBLAS_H
|
||||
|
||||
@@ -437,15 +465,22 @@ void cblas_sbdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPEN
|
||||
void cblas_sbf16tos(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, float *out, OPENBLAS_CONST blasint incout);
|
||||
/* convert BFLOAT16 array to double array */
|
||||
void cblas_dbf16tod(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, double *out, OPENBLAS_CONST blasint incout);
|
||||
void cblas_bgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 beta, bfloat16 *y, OPENBLAS_CONST blasint incy);
|
||||
/* dot production of BFLOAT16 input arrays, and output as float */
|
||||
float cblas_sbdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 *y, OPENBLAS_CONST blasint incy);
|
||||
void cblas_sbgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
|
||||
|
||||
void cblas_bgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
|
||||
OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST bfloat16 beta, bfloat16 *C, OPENBLAS_CONST blasint ldc);
|
||||
void cblas_sbgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
|
||||
OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
|
||||
void cblas_sbgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
|
||||
OPENBLAS_CONST float * alpha_array, OPENBLAS_CONST bfloat16 ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST bfloat16 ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST float * beta_array, float ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
|
||||
|
||||
/*** FLOAT16 extensions ***/
|
||||
void cblas_shgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
|
||||
OPENBLAS_CONST float alpha, OPENBLAS_CONST hfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST hfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
+22
-15
@@ -31,22 +31,23 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -wd981")
|
||||
endif ()
|
||||
|
||||
if (USE_OPENMP)
|
||||
# USE_SIMPLE_THREADED_LEVEL3 = 1
|
||||
# NO_AFFINITY = 1
|
||||
find_package(OpenMP REQUIRED)
|
||||
if (OpenMP_FOUND)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} ${OpenMP_C_FLAGS} -DUSE_OPENMP")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} ${OpenMP_Fortran_FLAGS}")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
|
||||
if (DYNAMIC_ARCH)
|
||||
if (ARM64)
|
||||
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 9.99)
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
|
||||
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) # SVE ACLE supported in GCC >= 10
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
|
||||
endif ()
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 14) # SME ACLE supported in GCC >= 14
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
|
||||
endif()
|
||||
elseif (${CMAKE_C_COMPILER_ID} MATCHES "Clang")
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 11) # SVE ACLE supported in LLVM >= 11
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
|
||||
endif ()
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19) # SME ACLE supported in LLVM >= 19
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
|
||||
endif()
|
||||
endif ()
|
||||
if (DYNAMIC_LIST)
|
||||
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
|
||||
@@ -93,7 +94,13 @@ if (DYNAMIC_ARCH)
|
||||
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
if (ZARCH)
|
||||
set(DYNAMIC_CORE Z13 Z14 ZARCH_GENERIC)
|
||||
set(DYN_Z13 1)
|
||||
set(DYN_Z14 1)
|
||||
endif ()
|
||||
|
||||
if (LOONGARCH64)
|
||||
set(DYNAMIC_CORE LA64_GENERIC LA264 LA464)
|
||||
endif ()
|
||||
|
||||
+94
-13
@@ -1,3 +1,30 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
##
|
||||
## Author: Hank Anderson <hank@statease.com>
|
||||
## Description: Ported from portion of OpenBLAS/Makefile.system
|
||||
@@ -59,6 +86,10 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "LS
|
||||
set(BINARY_DEFINED 1)
|
||||
endif ()
|
||||
|
||||
if (ZARCH)
|
||||
set (BINARY_DEFINED 1)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
|
||||
set(BINARY_DEFINED 1)
|
||||
endif ()
|
||||
@@ -84,7 +115,7 @@ endif ()
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC")
|
||||
if (POWER)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -tp pwr8")
|
||||
else ()
|
||||
elseif (X86_64)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -tp px")
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -182,7 +213,9 @@ endif ()
|
||||
|
||||
if (${CORE} STREQUAL A64FX)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${GCC_VERSION} VERSION_GREATER 11.0 OR ${GCC_VERSION} VERSION_EQUAL 11.0)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=a64fx")
|
||||
elseif (${GCC_VERSION} VERSION_GREATER 11.0 OR ${GCC_VERSION} VERSION_EQUAL 11.0)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve -mtune=a64fx")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
|
||||
@@ -190,15 +223,35 @@ if (${CORE} STREQUAL A64FX)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL NEOVERSEV2)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-v2")
|
||||
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v2")
|
||||
else ()
|
||||
if (${GCC_VERSION} VERSION_GREATER 13.0 OR ${GCC_VERSION} VERSION_EQUAL 13.0)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -mcpu=neoverse-v2")
|
||||
elseif (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL NEOVERSEN2)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
|
||||
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v2")
|
||||
else ()
|
||||
if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
|
||||
if (${GCC_VERSION} VERSION_GREATER 11.1 OR ${GCC_VERSION} VERSION_EQUAL 11.1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -207,12 +260,14 @@ endif ()
|
||||
if (${CORE} STREQUAL NEOVERSEV1)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.4-a+sve -mtune=neoverse-v1")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v1")
|
||||
else ()
|
||||
if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve -mtune=neoverse-v1")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
|
||||
endif()
|
||||
endif()
|
||||
endif ()
|
||||
@@ -220,10 +275,24 @@ endif ()
|
||||
|
||||
if (${CORE} STREQUAL NEOVERSEN1)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${GCC_VERSION} VERSION_GREATER 9.4 OR ${GCC_VERSION} VERSION_EQUAL 9.4)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve -mtune=neoverse-n1")
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-n1")
|
||||
elseif (${GCC_VERSION} VERSION_GREATER 9.4 OR ${GCC_VERSION} VERSION_EQUAL 9.4)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a -mtune=neoverse-n1")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL AMPEREONE)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-n1")
|
||||
elseif (${GCC_VERSION} VERSION_GREATER 12.1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.6-a+crypto+crc+fp16+sha3+rng -mtune=ampereone")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.6-a+fp16")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -232,21 +301,33 @@ if (${CORE} STREQUAL ARMV8SVE)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8-a+sve")
|
||||
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL ARMV9SME)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv9-a+sme")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL CORTEXA510)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL CORTEXA710)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -258,7 +339,7 @@ endif ()
|
||||
|
||||
if (${CORE} STREQUAL CORTEXX2)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
+12
-12
@@ -7,7 +7,7 @@ if (${F_COMPILER} STREQUAL "FLANG" AND NOT CMAKE_Fortran_COMPILER_ID STREQUAL "L
|
||||
# This is for classic Flang. LLVM Flang is handled with gfortran below.
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_FLANG")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fopenmp")
|
||||
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -Mrecursive -Kieee")
|
||||
endif ()
|
||||
@@ -117,7 +117,7 @@ if (${F_COMPILER} STREQUAL "GFORTRAN" OR ${F_COMPILER} STREQUAL "F95" OR CMAKE_F
|
||||
endif ()
|
||||
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fopenmp")
|
||||
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -128,14 +128,14 @@ if (${F_COMPILER} STREQUAL "INTEL" OR CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
|
||||
endif ()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -recursive -fp-model=consistent")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${F_COMPILER} STREQUAL "FUJITSU")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_FUJITSU")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -151,7 +151,7 @@ if (${F_COMPILER} STREQUAL "IBM")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -q32")
|
||||
endif ()
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -168,7 +168,7 @@ if (${F_COMPILER} STREQUAL "PGI" OR ${F_COMPILER} STREQUAL "PGF95")
|
||||
endif ()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -Mrecursive")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
|
||||
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -195,7 +195,7 @@ if (${F_COMPILER} STREQUAL "PATHSCALE")
|
||||
endif ()
|
||||
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
|
||||
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -233,7 +233,7 @@ if (${F_COMPILER} STREQUAL "OPEN64")
|
||||
|
||||
if (USE_OPENMP)
|
||||
set(FEXTRALIB "${FEXTRALIB} -lstdc++")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
|
||||
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -245,14 +245,14 @@ if (${F_COMPILER} STREQUAL "SUN")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -m64")
|
||||
endif ()
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -xopenmp=parallel")
|
||||
set(OpenMP_Fortran_FLAGS "-xopenmp=parallel" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${F_COMPILER} STREQUAL "COMPAQ")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_COMPAQ")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -265,7 +265,7 @@ if (${F_COMPILER} STREQUAL "CRAY")
|
||||
if (NOT USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fno-openmp")
|
||||
else ()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fopenmp")
|
||||
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -290,7 +290,7 @@ if (${F_COMPILER} STREQUAL "NAGFOR")
|
||||
# -w=unused: Suppress warning messages about unused variables
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -w=x77 -w=ques -w=unused")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
# helper functions for the kernel CMakeLists.txt
|
||||
|
||||
function(SetFallback KERNEL SOURCE_PATH)
|
||||
@@ -79,6 +107,10 @@ macro(SetDefaultL1)
|
||||
SetFallback(CROTKERNEL zrot.S)
|
||||
SetFallback(ZROTKERNEL zrot.S)
|
||||
SetFallback(XROTKERNEL zrot.S)
|
||||
SetFallback(SROTMKERNEL rotm.S)
|
||||
SetFallback(DROTMKERNEL rotm.S)
|
||||
SetFallback(QROTMKERNEL rotm.S)
|
||||
SetFallback(BSCALKERNEL ../generic/scal.c)
|
||||
SetFallback(SSCALKERNEL scal.S)
|
||||
SetFallback(DSCALKERNEL scal.S)
|
||||
SetFallback(CSCALKERNEL zscal.S)
|
||||
@@ -138,6 +170,8 @@ if (BUILD_BFLOAT16)
|
||||
SetFallback(SHSWAPKERNEL ../arm/swap.c)
|
||||
SetFallback(TOBF16KERNEL ../x86_64/tobf16.c)
|
||||
SetFallback(BF16TOKERNEL ../x86_64/bf16to.c)
|
||||
SetFallback(BGEMVNKERNEL ../generic/gemv_n.c)
|
||||
SetFallback(BGEMVTKERNEL ../generic/gemv_t.c)
|
||||
SetFallback(SBGEMVNKERNEL ../x86_64/sbgemv_n.c)
|
||||
SetFallback(SBGEMVTKERNEL ../x86_64/sbgemv_t.c)
|
||||
endif ()
|
||||
@@ -190,6 +224,8 @@ macro(SetDefaultL2)
|
||||
SetFallback(XHEMV_V_KERNEL ../generic/zhemv_k.c)
|
||||
SetFallback(XHEMV_M_KERNEL ../generic/zhemv_k.c)
|
||||
if (BUILD_BFLOAT16)
|
||||
SetFallback(BGEMVNKERNEL ../generic/gemv_n.c)
|
||||
SetFallback(BGEMVTKERNEL ../generic/gemv_t.c)
|
||||
SetFallback(SBGEMVNKERNEL ../x86_64/sbgemv_n.c)
|
||||
SetFallback(SBGEMVTKERNEL ../x86_64/sbgemv_t.c)
|
||||
SetFallback(SHGERKERNEL ../generic/ger.c)
|
||||
@@ -203,6 +239,16 @@ macro(SetDefaultL3)
|
||||
SetFallback(ZGEADD_KERNEL ../generic/zgeadd.c)
|
||||
if (BUILD_BFLOAT16)
|
||||
SetFallback(SHGEADD_KERNEL ../generic/geadd.c)
|
||||
SetFallback(BGEMMKERNEL ../generic/gemmkernel_2x2.c)
|
||||
SetFallback(BGEMM_BETA ../generic/gemm_beta.c)
|
||||
SetFallback(BGEMMINCOPY ../generic/gemm_ncopy_2.c)
|
||||
SetFallback(BGEMMITCOPY ../generic/gemm_tcopy_2.c)
|
||||
SetFallback(BGEMMONCOPY ../generic/gemm_ncopy_2.c)
|
||||
SetFallback(BGEMMOTCOPY ../generic/gemm_tcopy_2.c)
|
||||
SetFallback(BGEMMINCOPYOBJ bgemm_incopy.o)
|
||||
SetFallback(BGEMMITCOPYOBJ bgemm_itcopy.o)
|
||||
SetFallback(BGEMMONCOPYOBJ bgemm_oncopy.o)
|
||||
SetFallback(BGEMMOTCOPYOBJ bgemm_otcopy.o)
|
||||
SetFallback(SBGEMMKERNEL ../generic/gemmkernel_2x2.c)
|
||||
SetFallback(SBGEMM_BETA ../generic/gemm_beta.c)
|
||||
SetFallback(SBGEMMINCOPY ../generic/gemm_ncopy_2.c)
|
||||
|
||||
+4
-4
@@ -11,7 +11,7 @@ set(SCLAUX
|
||||
la_constants.f90
|
||||
sbdsdc.f
|
||||
sbdsqr.f sdisna.f slabad.f slacpy.f sladiv.f slae2.f slaebz.f
|
||||
slaed0.f slaed1.f slaed2.f slaed3.f slaed4.f slaed5.f slaed6.f
|
||||
slaed0.f slaed1.f slaed2.f slaed4.f slaed5.f slaed6.f
|
||||
slaed7.f slaed8.f slaed9.f slaeda.f slaev2.f slagtf.f
|
||||
slagts.f slamrg.f slanst.f
|
||||
slapy2.f slapy3.f slarnv.f
|
||||
@@ -31,7 +31,7 @@ set(DZLAUX
|
||||
dbdsdc.f
|
||||
dbdsvdx.f dstevx.f dstein.f
|
||||
dbdsqr.f ddisna.f dlabad.f dlacpy.f dladiv.f dlae2.f dlaebz.f
|
||||
dlaed0.f dlaed1.f dlaed2.f dlaed3.f dlaed4.f dlaed5.f dlaed6.f
|
||||
dlaed0.f dlaed1.f dlaed2.f dlaed4.f dlaed5.f dlaed6.f
|
||||
dlaed7.f dlaed8.f dlaed9.f dlaeda.f dlaev2.f dlagtf.f
|
||||
dlagts.f dlamrg.f dlanst.f
|
||||
dlapy2.f dlapy3.f dlarnv.f
|
||||
@@ -517,7 +517,7 @@ set(SCLAUX
|
||||
scombssq.c sbdsvdx.c sstevx.c sstein.c
|
||||
sbdsdc.c
|
||||
sbdsqr.c sdisna.c slabad.c slacpy.c sladiv.c slae2.c slaebz.c
|
||||
slaed0.c slaed1.c slaed2.c slaed3.c slaed4.c slaed5.c slaed6.c
|
||||
slaed0.c slaed1.c slaed2.c slaed4.c slaed5.c slaed6.c
|
||||
slaed7.c slaed8.c slaed9.c slaeda.c slaev2.c slagtf.c
|
||||
slagts.c slamrg.c slanst.c
|
||||
slapy2.c slapy3.c slarnv.c
|
||||
@@ -536,7 +536,7 @@ set(DZLAUX
|
||||
dbdsdc.c
|
||||
dbdsvdx.c dstevx.c dstein.c
|
||||
dbdsqr.c ddisna.c dlabad.c dlacpy.c dladiv.c dlae2.c dlaebz.c
|
||||
dlaed0.c dlaed1.c dlaed2.c dlaed3.c dlaed4.c dlaed5.c dlaed6.c
|
||||
dlaed0.c dlaed1.c dlaed2.c dlaed4.c dlaed5.c dlaed6.c
|
||||
dlaed7.c dlaed8.c dlaed9.c dlaeda.c dlaev2.c dlagtf.c
|
||||
dlagts.c dlamrg.c dlanst.c
|
||||
dlapy2.c dlapy3.c dlarnv.c
|
||||
|
||||
+8
-6
@@ -98,6 +98,8 @@ set(CSRC
|
||||
lapacke_cgesv_work.c
|
||||
lapacke_cgesvd.c
|
||||
lapacke_cgesvd_work.c
|
||||
lapacke_cgesvdq.c
|
||||
lapacke_cgesvdq_work.c
|
||||
lapacke_cgesvdx.c
|
||||
lapacke_cgesvdx_work.c
|
||||
lapacke_cgesvj.c
|
||||
@@ -1766,8 +1768,8 @@ set(SSRC
|
||||
lapacke_strsna_work.c
|
||||
lapacke_strsyl.c
|
||||
lapacke_strsyl_work.c
|
||||
lapacke_ctrsyl3.c
|
||||
lapacke_ctrsyl3_work.c
|
||||
lapacke_strsyl3.c
|
||||
lapacke_strsyl3_work.c
|
||||
lapacke_strtri.c
|
||||
lapacke_strtri_work.c
|
||||
lapacke_strtrs.c
|
||||
@@ -2410,10 +2412,10 @@ set(ZSRC
|
||||
lapacke_ilaver.c
|
||||
)
|
||||
if (BUILD_LAPACK_DEPRECATED)
|
||||
set(SRCS $SRCS lapacke_sgeqpf.c lapacke_sgeqpf_work.c lapacke_sggsvd.c lapacke_sggsvd_work.c lapacke_sggsvp.c lapacke_sggsvp_work.c)
|
||||
set(SRCD $SRCD lapacke_dgeqpf.c lapacke_dgeqpf_work.c lapacke_dggsvd.c lapacke_dggsvd_work.c lapacke_dggsvp.c lapacke_dggsvp_work.c)
|
||||
set(SRCC $SRCC lapacke_cgeqpf.c lapacke_cgeqpf_work.c lapacke_cggsvd.c lapacke_cggsvd_work.c lapacke_cggsvp.c lapacke_cggsvp_work.c)
|
||||
set(SRCZ $SRCZ lapacke_zgeqpf.c lapacke_zgeqpf_work.c lapacke_zggsvd.c lapacke_zggsvd_work.c lapacke_zggsvp.c lapacke_zggsvp_work.c)
|
||||
list(APPEND SSRC lapacke_sgeqpf.c lapacke_sgeqpf_work.c lapacke_sggsvd.c lapacke_sggsvd_work.c lapacke_sggsvp.c lapacke_sggsvp_work.c)
|
||||
list(APPEND DSRC lapacke_dgeqpf.c lapacke_dgeqpf_work.c lapacke_dggsvd.c lapacke_dggsvd_work.c lapacke_dggsvp.c lapacke_dggsvp_work.c)
|
||||
list(APPEND CSRC lapacke_cgeqpf.c lapacke_cgeqpf_work.c lapacke_cggsvd.c lapacke_cggsvd_work.c lapacke_cggsvp.c lapacke_cggsvp_work.c)
|
||||
list(APPEND ZSRC lapacke_zgeqpf.c lapacke_zgeqpf_work.c lapacke_zggsvd.c lapacke_zggsvd_work.c lapacke_zggsvp.c lapacke_zggsvp_work.c)
|
||||
endif()
|
||||
|
||||
set(SRCX
|
||||
|
||||
+157
-7
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
##
|
||||
## Author: Hank Anderson <hank@statease.com>
|
||||
## Description: Ported from OpenBLAS/Makefile.prebuild
|
||||
@@ -131,6 +159,8 @@ if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSS
|
||||
set(HAVE_SSE2 1)
|
||||
set(HAVE_SSE3 1)
|
||||
set(HAVE_SSSE3 1)
|
||||
set(BGEMM_UNROLL_M 8)
|
||||
set(BGEMM_UNROLL_N 4)
|
||||
set(SBGEMM_UNROLL_M 8)
|
||||
set(SBGEMM_UNROLL_N 4)
|
||||
set(SGEMM_UNROLL_M 8)
|
||||
@@ -1006,15 +1036,15 @@ endif ()
|
||||
"#define HAVE_SVE\n"
|
||||
"#define ARMV8\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 4)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 4)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 2)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_M 2)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "NEOVERSEN2")
|
||||
elseif ("${TCORE}" STREQUAL "NEOVERSEN2" OR "${TCORE}" STREQUAL "ARMV9SME")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_CODE_SIZE\t65536\n"
|
||||
"#define L1_CODE_LINESIZE\t64\n"
|
||||
@@ -1195,6 +1225,33 @@ endif ()
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "AMPEREONE")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_CODE_SIZE\t16384\n"
|
||||
"#define L1_CODE_LINESIZE\t64\n"
|
||||
"#define L1_CODE_ASSOCIATIVE\t4\n"
|
||||
"#define L1_DATA_SIZE\t65536\n"
|
||||
"#define L1_DATA_LINESIZE\t64\n"
|
||||
"#define L1_DATA_ASSOCIATIVE\t4\n"
|
||||
"#define L2_SIZE\t2097152\n\n"
|
||||
"#define L2_LINESIZE\t64\n"
|
||||
"#define L2_ASSOCIATIVE\t8\n"
|
||||
"#define DTB_DEFAULT_ENTRIES\t64\n"
|
||||
"#define DTB_SIZE\t4096\n"
|
||||
"#define HAVE_VFPV4\n"
|
||||
"#define HAVE_VFPV3\n"
|
||||
"#define HAVE_VFP\n"
|
||||
"#define HAVE_NEON\n"
|
||||
"#define ARMV8\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 4)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "VORTEX")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define ARMV8\n"
|
||||
@@ -1249,6 +1306,25 @@ endif ()
|
||||
set(ZGEMM_UNROLL_M 2)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "ARMV8SVE" OR "${TCORE}" STREQUAL "CORTEXA510" OR "${TCORE}" STREQUAL "CORTEXX2" OR "${TCORE}" STREQUAL "ARMV9")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE\t32768\n"
|
||||
"#define L1_DATA_LINESIZE\t64\n"
|
||||
"#define L2_SIZE\t1048576\n"
|
||||
"#define L2_LINESIZE\t64\n"
|
||||
"#define DTB_DEFAULT_ENTRIES\t64\n"
|
||||
"#define DTB_SIZE\t4096\n"
|
||||
"#define L2_ASSOCIATIVE\t32\n"
|
||||
"#define ARMV8\n")
|
||||
set(SGEMM_UNROLL_M 4)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 4)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 2)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 2)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "P5600")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L2_SIZE 1048576\n"
|
||||
@@ -1331,6 +1407,78 @@ endif ()
|
||||
set(ZGEMM_UNROLL_M 8)
|
||||
set(ZGEMM_UNROLL_N 2)
|
||||
set(SYMV_P 8)
|
||||
elseif ("${TCORE}" STREQUAL "C910V")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 1048576\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 4)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 2)
|
||||
set(CGEMM_UNROLL_N 2)
|
||||
set(ZGEMM_UNROLL_M 2)
|
||||
set(ZGEMM_UNROLL_N 2)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "x280")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 65536\n"
|
||||
"#define L1_LINESIZE 32 \n"
|
||||
"#define L2_SIZE 2097152\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 16)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 8)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "RISCV64_ZVL128B")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 1048576\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
set(SGEMM_UNROLL_M 8)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "RISCV64_ZVL256B")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 65536\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 2097152\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 8)
|
||||
set(ZGEMM_UNROLL_M 8)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
@@ -1342,7 +1490,7 @@ endif ()
|
||||
"#define L2_ASSOCIATIVE 8\n")
|
||||
elseif ("${TCORE}" STREQUAL "RISCV64_GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 1048576\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
@@ -1409,9 +1557,11 @@ endif ()
|
||||
# GetArch_2nd
|
||||
foreach(float_char S;D;Q;C;Z;X)
|
||||
if (NOT DEFINED ${float_char}GEMM_UNROLL_M)
|
||||
message(STATUS "setting unrollm=2")
|
||||
set(${float_char}GEMM_UNROLL_M 2)
|
||||
endif()
|
||||
if (NOT DEFINED ${float_char}GEMM_UNROLL_N)
|
||||
message(STATUS "setting unrolln=2")
|
||||
set(${float_char}GEMM_UNROLL_N 2)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
+107
-24
@@ -1,3 +1,30 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
##
|
||||
## Author: Hank Anderson <hank@statease.com>
|
||||
## Description: Ported from OpenBLAS/Makefile.system
|
||||
@@ -21,7 +48,15 @@ endif()
|
||||
# Other files expect CORE, which is actually TARGET and will become TARGET_CORE for kernel build. Confused yet?
|
||||
# It seems we are meant to use TARGET as input and CORE internally as kernel.
|
||||
if(NOT DEFINED CORE AND DEFINED TARGET)
|
||||
set(CORE ${TARGET})
|
||||
if (${TARGET} STREQUAL "LOONGSON3R5")
|
||||
set(CORE "LA464")
|
||||
elseif (${TARGET} STREQUAL "LOONGSON2K1000")
|
||||
set(CORE "LA264")
|
||||
elseif (${TARGET} STREQUAL "LOONGSONGENERIC")
|
||||
set(CORE "LA64_GENERIC)")
|
||||
else ()
|
||||
set(CORE ${TARGET})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# TARGET_CORE will override TARGET which is used in DYNAMIC_ARCH=1.
|
||||
@@ -281,12 +316,19 @@ if (DEFINED TARGET)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math")
|
||||
endif()
|
||||
|
||||
if (${TARGET} STREQUAL Z13)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=z13 -mzvector")
|
||||
endif()
|
||||
if (${TARGET} STREQUAL Z14)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=z14 -mzvector")
|
||||
endif()
|
||||
|
||||
if (${TARGET} STREQUAL NEOVERSEV1)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve_intrinsics -march=armv8.4-a+sve -mtune=neoverse-v1")
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve_intrinsics -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.4 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.4)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve -mtune=neoverse-v1")
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_VERSION} does not support Neoverse V1.")
|
||||
endif()
|
||||
@@ -303,6 +345,19 @@ if (${TARGET} STREQUAL NEOVERSEV1)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (${TARGET} STREQUAL NEOVERSEV2)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv9-a+sve+sve2+bf16 -mtune=neoverse-v2")
|
||||
else ()
|
||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.0 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 13.0)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=neoverse-v2")
|
||||
elseif (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.4 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.4)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler $${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_VERSION} does not support Neoverse V2.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (${TARGET} STREQUAL ARMV8SVE)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv8.2-a+sve")
|
||||
@@ -310,6 +365,9 @@ if (${TARGET} STREQUAL NEOVERSEV1)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.2-a+sve")
|
||||
endif()
|
||||
endif()
|
||||
if (${TARGET} STREQUAL ARMV9SME)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv9-a+sme -O3")
|
||||
endif()
|
||||
if (${TARGET} STREQUAL A64FX)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv8.2-a+sve -mtune=a64fx")
|
||||
@@ -361,6 +419,20 @@ else ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (USE_OPENMP)
|
||||
find_package(OpenMP COMPONENTS C REQUIRED)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_OPENMP")
|
||||
if (NOT NOFORTRAN)
|
||||
find_package(OpenMP COMPONENTS Fortran REQUIRED)
|
||||
# Avoid mixed OpenMP linkage
|
||||
get_target_property(OMP_C_LIB OpenMP::OpenMP_C INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(OMP_Fortran_LIB OpenMP::OpenMP_Fortran INTERFACE_LINK_LIBRARIES)
|
||||
if (NOT OMP_C_LIB STREQUAL OMP_Fortran_LIB)
|
||||
message(FATAL_ERROR "Multiple OpenMP runtime libraries detected. Mixed OpenMP runtime linkage is dangerous. You may pass -DOpenMP_LANG_LIB_NAMES and -DOpenMP_omp_LIBRARY to manually choose the OpenMP library.")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (BINARY64)
|
||||
if (INTERFACE64)
|
||||
# CCOMMON_OPT += -DUSE64BITINT
|
||||
@@ -395,20 +467,32 @@ if (X86_64 OR ${CORE} STREQUAL POWER10 OR ARM64 OR LOONGARCH64)
|
||||
endif ()
|
||||
if (ARM64)
|
||||
set(GEMM_GEMV_FORWARD TRUE)
|
||||
set(SBGEMM_GEMV_FORWARD TRUE)
|
||||
set(BGEMM_GEMV_FORWARD TRUE)
|
||||
endif ()
|
||||
if (POWER)
|
||||
set(GEMM_GEMV_FORWARD TRUE)
|
||||
set(SBGEMM_GEMV_FORWARD TRUE)
|
||||
endif ()
|
||||
if (RISCV64)
|
||||
set(GEMM_GEMV_FORWARD TRUE)
|
||||
endif ()
|
||||
|
||||
if (GEMM_GEMV_FORWARD AND NOT ONLY_CBLAS)
|
||||
if (GEMM_GEMV_FORWARD)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DGEMM_GEMV_FORWARD")
|
||||
endif ()
|
||||
if (GEMM_GEMV_FORWARD_BF16 AND NOT ONLY_CBLAS)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DGEMM_GEMV_FORWARD_BF16")
|
||||
if (SBGEMM_GEMV_FORWARD)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DSBGEMM_GEMV_FORWARD")
|
||||
endif ()
|
||||
if (BGEMM_GEMV_FORWARD)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DBGEMM_GEMV_FORWARD")
|
||||
endif ()
|
||||
if (SMALL_MATRIX_OPT)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DSMALL_MATRIX_OPT")
|
||||
endif ()
|
||||
|
||||
if (DYNAMIC_ARCH)
|
||||
if (X86 OR X86_64 OR ARM64 OR POWER OR RISCV64 OR LOONGARCH64)
|
||||
if (X86 OR X86_64 OR ARM64 OR POWER OR RISCV64 OR LOONGARCH64 OR ZARCH)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH")
|
||||
if (DYNAMIC_OLDER)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER")
|
||||
@@ -615,11 +699,26 @@ endif()
|
||||
if (BUILD_BFLOAT16)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_BFLOAT16")
|
||||
endif()
|
||||
if (BUILD_HFLOAT16)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_HFLOAT16")
|
||||
endif()
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${CCOMMON_OPT}")
|
||||
endif()
|
||||
# TODO: not sure what PFLAGS is -hpa
|
||||
set(PFLAGS "${PFLAGS} ${CCOMMON_OPT} -I${TOPDIR} -DPROFILE ${COMMON_PROF}")
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
|
||||
if ("${F_COMPILER}" STREQUAL "FLANG")
|
||||
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fno-unroll-loops")
|
||||
endif ()
|
||||
endif ()
|
||||
if (ARM64 AND CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O2")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FCOMMON_OPT}")
|
||||
# TODO: not sure what FPFLAGS is -hpa
|
||||
@@ -632,20 +731,11 @@ if (LAPACK_STRLEN)
|
||||
endif()
|
||||
set(LAPACK_FPFLAGS "${LAPACK_FPFLAGS} ${FPFLAGS}")
|
||||
|
||||
#Disable -fopenmp for LAPACK Fortran codes on Windows.
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
set(FILTER_FLAGS "-fopenmp;-mp;-openmp;-xopenmp=parallel")
|
||||
foreach (FILTER_FLAG ${FILTER_FLAGS})
|
||||
string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
|
||||
string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS})
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
if (CMAKE_Fortran_COMPILER)
|
||||
if ("${F_COMPILER}" STREQUAL "NAGFOR" OR "${F_COMPILER}" STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
|
||||
set(FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512")
|
||||
if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
|
||||
message(STATUS "removing fortran flags")
|
||||
message(STATUS "removing fortran flags not supported by the compiler")
|
||||
set(FILTER_FLAGS "${FILTER_FLAGS};-m32;-m64")
|
||||
endif ()
|
||||
foreach (FILTER_FLAG ${FILTER_FLAGS})
|
||||
@@ -676,13 +766,6 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM" AND ${CMAKE_SYSTEM_NAME} STREQUAL
|
||||
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DNOCHANGE")
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
if ("${F_COMPILER}" STREQUAL "FLANG")
|
||||
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fno-unroll-loops")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED SUFFIX)
|
||||
set(SUFFIX o)
|
||||
|
||||
@@ -50,6 +50,9 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64.*")
|
||||
set(LOONGARCH64 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64.*")
|
||||
set(RISCV64 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390.*")
|
||||
set(ZARCH 1)
|
||||
set(BINARY 64)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*"))
|
||||
if (NOT BINARY)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
@@ -100,6 +103,8 @@ elseif(X86)
|
||||
set(ARCH "x86")
|
||||
elseif(POWER)
|
||||
set(ARCH "power")
|
||||
elseif(ZARCH)
|
||||
set(ARCH "zarch")
|
||||
elseif(MIPS32)
|
||||
set(ARCH "mips")
|
||||
elseif(MIPS64)
|
||||
@@ -139,6 +144,17 @@ endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ARM64)
|
||||
if (NOT NO_SME)
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/sme.c ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=armv9-a+sve2+sme -c -v -o ${PROJECT_BINARY_DIR}/sme.o ${PROJECT_BINARY_DIR}/sme.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_SME)
|
||||
if (NO_SME EQUAL 1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_SME")
|
||||
endif()
|
||||
file(REMOVE "${PROJECT_BINARY_DIR}/sme.c" "${PROJECT_BINARY_DIR}/sme.o")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CheckIncludeFile)
|
||||
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
|
||||
if (HAVE_C11 EQUAL 1)
|
||||
|
||||
+37
-1
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
# Functions to help with the OpenBLAS build
|
||||
|
||||
# Reads string from getarch into CMake vars. Format of getarch vars is VARNAME=VALUE
|
||||
@@ -16,6 +44,14 @@ endfunction ()
|
||||
macro(ParseMakefileVars MAKEFILE_IN)
|
||||
message(STATUS "Reading vars from ${MAKEFILE_IN}...")
|
||||
set (C_COMPILER ${CMAKE_C_COMPILER_ID})
|
||||
set (OSNAME ${CMAKE_SYSTEM_NAME})
|
||||
if (${C_COMPILER} MATCHES Clang)
|
||||
set (C_COMPILER CLANG)
|
||||
endif ()
|
||||
if (${OSNAME} STREQUAL Windows)
|
||||
set (OSNAME WINNT)
|
||||
endif ()
|
||||
message(STATUS OS ${OSNAME} COMPILER ${C_COMPILER})
|
||||
set (IfElse 0)
|
||||
set (ElseSeen 0)
|
||||
set (SkipIfs 0)
|
||||
@@ -339,7 +375,7 @@ function(GenerateNamedObjects sources_in)
|
||||
if (NOT no_float_type)
|
||||
string(SUBSTRING ${float_type} 0 1 float_char)
|
||||
string(TOLOWER ${float_char} float_char)
|
||||
if (${float_type} STREQUAL "BFLOAT16")
|
||||
if (${float_type} STREQUAL "BFLOAT16" AND NOT "${defines_in}" MATCHES "BGEM")
|
||||
set (float_char "sb")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* Copyright 2025 The OpenBLAS Project. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
@@ -266,6 +267,14 @@ typedef uint16_t bfloat16;
|
||||
#define BFLOAT16CONVERSION 1
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_HFLOAT16
|
||||
#ifndef hfloat16
|
||||
typedef _Float16 hfloat16;
|
||||
#endif
|
||||
#else
|
||||
typedef uint16_t hfloat16;
|
||||
#endif
|
||||
|
||||
#ifdef USE64BITINT
|
||||
typedef BLASLONG blasint;
|
||||
#if defined(OS_WINDOWS) && defined(__64BIT__)
|
||||
@@ -309,10 +318,21 @@ typedef int blasint;
|
||||
#elif defined(BFLOAT16)
|
||||
#define IFLOAT bfloat16
|
||||
#define XFLOAT IFLOAT
|
||||
#define FLOAT float
|
||||
#ifdef BGEMM
|
||||
#define FLOAT bfloat16
|
||||
#else
|
||||
#define FLOAT float
|
||||
#endif
|
||||
#define SIZE 2
|
||||
#define BASE_SHIFT 1
|
||||
#define ZBASE_SHIFT 2
|
||||
#elif defined(HFLOAT16)
|
||||
#define IFLOAT hfloat16
|
||||
#define XFLOAT IFLOAT
|
||||
#define FLOAT float
|
||||
#define SIZE 2
|
||||
#define BASE_SHIFT 1
|
||||
#define ZBASE_SHIFT 2
|
||||
#else
|
||||
#define FLOAT float
|
||||
#define SIZE 4
|
||||
@@ -702,6 +722,7 @@ void gotoblas_profile_init(void);
|
||||
void gotoblas_profile_quit(void);
|
||||
|
||||
int support_avx512(void);
|
||||
int support_sme1(void);
|
||||
|
||||
#ifdef USE_OPENMP
|
||||
|
||||
|
||||
+9
-1
@@ -114,7 +114,15 @@ static inline int blas_quickdivide(blasint x, blasint y){
|
||||
OPENBLAS_ARM_TYPE_FUNCTION \
|
||||
REALNAME:
|
||||
|
||||
#define EPILOGUE
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
# define GNUSTACK .section .note.GNU-stack,"",%progbits
|
||||
#else
|
||||
# define GNUSTACK
|
||||
#endif
|
||||
|
||||
#define EPILOGUE \
|
||||
GNUSTACK
|
||||
|
||||
|
||||
#define PROFCODE
|
||||
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ REALNAME:
|
||||
#define HUGE_PAGESIZE ( 4 << 20)
|
||||
|
||||
#ifndef BUFFERSIZE
|
||||
#if defined(NEOVERSEN1) || defined(NEOVERSEN2) || defined(NEOVERSEV1) || defined(A64FX) || defined(ARMV8SVE)
|
||||
#if defined(NEOVERSEN1) || defined(NEOVERSEN2) || defined(NEOVERSEV1) || defined(A64FX) || defined(ARMV8SVE) || defined(ARMV9SME)
|
||||
#define BUFFER_SIZE (32 << 22)
|
||||
#else
|
||||
#define BUFFER_SIZE (32 << 20)
|
||||
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2025, The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#ifndef COMMON_B_H
|
||||
#define COMMON_B_H
|
||||
|
||||
#ifndef DYNAMIC_ARCH
|
||||
#define BGEMV_N_K bgemv_n
|
||||
#define BGEMV_T_K bgemv_t
|
||||
|
||||
#define BSCAL_K bscal_k
|
||||
|
||||
#define BGEMM_ONCOPY bgemm_oncopy
|
||||
#define BGEMM_OTCOPY bgemm_otcopy
|
||||
|
||||
#if BGEMM_DEFAULT_UNROLL_M == BGEMM_DEFAULT_UNROLL_N
|
||||
#define BGEMM_INCOPY bgemm_oncopy
|
||||
#define BGEMM_ITCOPY bgemm_otcopy
|
||||
#else
|
||||
#define BGEMM_INCOPY bgemm_incopy
|
||||
#define BGEMM_ITCOPY bgemm_itcopy
|
||||
#endif
|
||||
|
||||
#define BGEMM_BETA bgemm_beta
|
||||
#define BGEMM_KERNEL bgemm_kernel
|
||||
|
||||
#else
|
||||
#define BGEMV_N_K gotoblas->bgemv_n
|
||||
#define BGEMV_T_K gotoblas->bgemv_t
|
||||
|
||||
#define BSCAL_K gotoblas->bscal_k
|
||||
|
||||
#define BGEMM_ONCOPY gotoblas->bgemm_oncopy
|
||||
#define BGEMM_OTCOPY gotoblas->bgemm_otcopy
|
||||
#define BGEMM_INCOPY gotoblas->bgemm_incopy
|
||||
#define BGEMM_ITCOPY gotoblas->bgemm_itcopy
|
||||
#define BGEMM_BETA gotoblas->bgemm_beta
|
||||
#define BGEMM_KERNEL gotoblas->bgemm_kernel
|
||||
|
||||
#endif
|
||||
|
||||
#define BGEMM_NN bgemm_nn
|
||||
#define BGEMM_CN bgemm_tn
|
||||
#define BGEMM_TN bgemm_tn
|
||||
#define BGEMM_NC bgemm_nt
|
||||
#define BGEMM_NT bgemm_nt
|
||||
#define BGEMM_CC bgemm_tt
|
||||
#define BGEMM_CT bgemm_tt
|
||||
#define BGEMM_TC bgemm_tt
|
||||
#define BGEMM_TT bgemm_tt
|
||||
#define BGEMM_NR bgemm_nn
|
||||
#define BGEMM_TR bgemm_tn
|
||||
#define BGEMM_CR bgemm_tn
|
||||
#define BGEMM_RN bgemm_nn
|
||||
#define BGEMM_RT bgemm_nt
|
||||
#define BGEMM_RC bgemm_nt
|
||||
#define BGEMM_RR bgemm_nn
|
||||
|
||||
#define BGEMM_THREAD_NN bgemm_thread_nn
|
||||
#define BGEMM_THREAD_CN bgemm_thread_tn
|
||||
#define BGEMM_THREAD_TN bgemm_thread_tn
|
||||
#define BGEMM_THREAD_NC bgemm_thread_nt
|
||||
#define BGEMM_THREAD_NT bgemm_thread_nt
|
||||
#define BGEMM_THREAD_CC bgemm_thread_tt
|
||||
#define BGEMM_THREAD_CT bgemm_thread_tt
|
||||
#define BGEMM_THREAD_TC bgemm_thread_tt
|
||||
#define BGEMM_THREAD_TT bgemm_thread_tt
|
||||
#define BGEMM_THREAD_NR bgemm_thread_nn
|
||||
#define BGEMM_THREAD_TR bgemm_thread_tn
|
||||
#define BGEMM_THREAD_CR bgemm_thread_tn
|
||||
#define BGEMM_THREAD_RN bgemm_thread_nn
|
||||
#define BGEMM_THREAD_RT bgemm_thread_nt
|
||||
#define BGEMM_THREAD_RC bgemm_thread_nt
|
||||
#define BGEMM_THREAD_RR bgemm_thread_nn
|
||||
#endif
|
||||
@@ -22,6 +22,7 @@
|
||||
#define DSUM_K dsum_k
|
||||
#define DSWAP_K dswap_k
|
||||
#define DROT_K drot_k
|
||||
#define DROTM_K drotm_k
|
||||
|
||||
#define DGEMV_N dgemv_n
|
||||
#define DGEMV_T dgemv_t
|
||||
@@ -180,6 +181,7 @@
|
||||
#define DSUM_K gotoblas -> dsum_k
|
||||
#define DSWAP_K gotoblas -> dswap_k
|
||||
#define DROT_K gotoblas -> drot_k
|
||||
#define DROTM_K gotoblas -> drotm_k
|
||||
|
||||
#define DGEMV_N gotoblas -> dgemv_n
|
||||
#define DGEMV_T gotoblas -> dgemv_t
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* Copyright 2025 The OpenBLAS Project. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
@@ -59,6 +60,7 @@ double BLASFUNC(dsdot) (blasint *, float *, blasint *, float *, blasint *);
|
||||
double BLASFUNC(ddot) (blasint *, double *, blasint *, double *, blasint *);
|
||||
xdouble BLASFUNC(qdot) (blasint *, xdouble *, blasint *, xdouble *, blasint *);
|
||||
|
||||
void BLASFUNC(bscal) (blasint *, bfloat16 *, bfloat16 *, blasint *);
|
||||
float BLASFUNC(sbdot) (blasint *, bfloat16 *, blasint *, bfloat16 *, blasint *);
|
||||
void BLASFUNC(sbstobf16) (blasint *, float *, blasint *, bfloat16 *, blasint *);
|
||||
void BLASFUNC(sbdtobf16) (blasint *, double *, blasint *, bfloat16 *, blasint *);
|
||||
@@ -255,6 +257,8 @@ void BLASFUNC(xgeru)(blasint *, blasint *, xdouble *, xdouble *, blasint *,
|
||||
void BLASFUNC(xgerc)(blasint *, blasint *, xdouble *, xdouble *, blasint *,
|
||||
xdouble *, blasint *, xdouble *, blasint *);
|
||||
|
||||
void BLASFUNC(bgemv)(char *, blasint *, blasint *, bfloat16 *, bfloat16 *, blasint *,
|
||||
bfloat16 *, blasint *, bfloat16 *, bfloat16 *, blasint *);
|
||||
void BLASFUNC(sbgemv)(char *, blasint *, blasint *, float *, bfloat16 *, blasint *,
|
||||
bfloat16 *, blasint *, float *, float *, blasint *);
|
||||
void BLASFUNC(sgemv)(char *, blasint *, blasint *, float *, float *, blasint *,
|
||||
@@ -481,6 +485,10 @@ void BLASFUNC(xhbmv)(char *, blasint *, blasint *, xdouble *, xdouble *, blasint
|
||||
|
||||
/* Level 3 routines */
|
||||
|
||||
void BLASFUNC(shgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
|
||||
hfloat16 *, blasint *, hfloat16 *, blasint *, float *, float *, blasint *);
|
||||
void BLASFUNC(bgemm)(char *, char *, blasint *, blasint *, blasint *, bfloat16 *,
|
||||
bfloat16 *, blasint *, bfloat16 *, blasint *, bfloat16 *, bfloat16 *, blasint *);
|
||||
void BLASFUNC(sbgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
|
||||
bfloat16 *, blasint *, bfloat16 *, blasint *, float *, float *, blasint *);
|
||||
void BLASFUNC(sgemm)(char *, char *, blasint *, blasint *, blasint *, float *,
|
||||
|
||||
@@ -439,4 +439,9 @@ blasint xtrtrs_LRN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdo
|
||||
blasint xtrtrs_LCU_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG);
|
||||
blasint xtrtrs_LCN_parallel(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG);
|
||||
|
||||
blasint slaed3_single(blasint *, blasint *, blasint *, float *, float *, blasint *, float *, float *, float *, blasint *, blasint *, float *, float *, blasint *);
|
||||
blasint dlaed3_single(blasint *, blasint *, blasint *, double *, double *, blasint *, double *, double *, double *, blasint *, blasint *, double *, double *, blasint *);
|
||||
blasint slaed3_parallel(blasint *, blasint *, blasint *, float *, float *, blasint *, float *, float *, float *, blasint *, blasint *, float *, float *, blasint *);
|
||||
blasint dlaed3_parallel(blasint *, blasint *, blasint *, double *, double *, blasint *, double *, double *, double *, blasint *, blasint *, double *, double *, blasint *);
|
||||
|
||||
#endif
|
||||
|
||||
+7
-3
@@ -1,4 +1,5 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2025 The OpenBLAS Project. */
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
@@ -169,6 +170,9 @@ BLASLONG icmin_k(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG izmin_k(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG ixmin_k(BLASLONG, xdouble *, BLASLONG);
|
||||
|
||||
|
||||
int bscal_k(BLASLONG, BLASLONG, BLASLONG, bfloat16,
|
||||
bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
int sscal_k(BLASLONG, BLASLONG, BLASLONG, float,
|
||||
float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
int dscal_k(BLASLONG, BLASLONG, BLASLONG, double,
|
||||
@@ -213,9 +217,9 @@ int srotmg_k(float *, float *, float *, float *, float *);
|
||||
int drotmg_k(double *, double *, double *, double *, double *);
|
||||
int qrotmg_k(xdouble *, xdouble *, xdouble *, xdouble *, xdouble *);
|
||||
|
||||
int srotm_k (BLASLONG, float, BLASLONG, float, BLASLONG, float);
|
||||
int drotm_k (BLASLONG, double, BLASLONG, double, BLASLONG, double);
|
||||
int qrotm_k (BLASLONG, xdouble, BLASLONG, xdouble, BLASLONG, xdouble);
|
||||
int srotm_k (BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int drotm_k (BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
|
||||
int qrotm_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *);
|
||||
|
||||
|
||||
int saxpby_k (BLASLONG, float, float *, BLASLONG, float, float *, BLASLONG);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2025 The OpenBLAS Project */
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
@@ -44,6 +45,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
int bgemv_n(BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
|
||||
int bgemv_t(BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
|
||||
int bgemv_thread_n(BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG, int);
|
||||
int bgemv_thread_t(BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG, int);
|
||||
int sbgemv_n(BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
|
||||
int sbgemv_t(BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
|
||||
int sbgemv_thread_n(BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG, int);
|
||||
|
||||
+42
-1
@@ -52,9 +52,19 @@ void sgemm_direct(BLASLONG M, BLASLONG N, BLASLONG K,
|
||||
float * B, BLASLONG strideB,
|
||||
float * R, BLASLONG strideR);
|
||||
|
||||
void sgemm_direct_alpha_beta(BLASLONG M, BLASLONG N, BLASLONG K,
|
||||
float alpha,
|
||||
float * A, BLASLONG strideA,
|
||||
float * B, BLASLONG strideB,
|
||||
float beta,
|
||||
float * R, BLASLONG strideR);
|
||||
|
||||
int sgemm_direct_performant(BLASLONG M, BLASLONG N, BLASLONG K);
|
||||
|
||||
|
||||
int shgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
|
||||
hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
int bgemm_beta(BLASLONG, BLASLONG, BLASLONG, bfloat16,
|
||||
bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
int sbgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
|
||||
bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
int sgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
|
||||
@@ -78,6 +88,14 @@ int xgemm_beta(BLASLONG, BLASLONG, BLASLONG, xdouble *,
|
||||
xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
#endif
|
||||
|
||||
int shgemm_incopy(BLASLONG m, BLASLONG n, hfloat16 *a, BLASLONG lda, hfloat16 *b);
|
||||
int shgemm_itcopy(BLASLONG m, BLASLONG n, hfloat16 *a, BLASLONG lda, hfloat16 *b);
|
||||
int shgemm_oncopy(BLASLONG m, BLASLONG n, hfloat16 *a, BLASLONG lda, hfloat16 *b);
|
||||
int shgemm_otcopy(BLASLONG m, BLASLONG n, hfloat16 *a, BLASLONG lda, hfloat16 *b);
|
||||
int bgemm_incopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int bgemm_itcopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int bgemm_oncopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int bgemm_otcopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int sbgemm_incopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int sbgemm_itcopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
int sbgemm_oncopy(BLASLONG m, BLASLONG n, bfloat16 *a, BLASLONG lda, bfloat16 *b);
|
||||
@@ -505,6 +523,8 @@ int xher2k_kernel_UC(BLASLONG m, BLASLONG n, BLASLONG k, xdouble alpha_r, xdoubl
|
||||
int xher2k_kernel_LN(BLASLONG m, BLASLONG n, BLASLONG k, xdouble alpha_r, xdouble alpha_i, xdouble *a, xdouble *b, xdouble *c, BLASLONG ldc, BLASLONG offset, int flag);
|
||||
int xher2k_kernel_LC(BLASLONG m, BLASLONG n, BLASLONG k, xdouble alpha_r, xdouble alpha_i, xdouble *a, xdouble *b, xdouble *c, BLASLONG ldc, BLASLONG offset, int flag);
|
||||
|
||||
int shgemm_kernel(BLASLONG, BLASLONG, BLASLONG, float, hfloat16 *, hfloat16 *, float *, BLASLONG);
|
||||
int bgemm_kernel(BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int sbgemm_kernel(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, bfloat16 *, float *, BLASLONG);
|
||||
int sgemm_kernel(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG);
|
||||
int dgemm_kernel(BLASLONG, BLASLONG, BLASLONG, double, double *, double *, double *, BLASLONG);
|
||||
@@ -657,6 +677,16 @@ int cgemm3m_kernel(BLASLONG, BLASLONG, BLASLONG, float, float, float *, float
|
||||
int zgemm3m_kernel(BLASLONG, BLASLONG, BLASLONG, double, double, double *, double *, double *, BLASLONG);
|
||||
int xgemm3m_kernel(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble, xdouble *, xdouble *, xdouble *, BLASLONG);
|
||||
|
||||
int shgemm_nn(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
|
||||
int shgemm_nt(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
|
||||
int shgemm_tn(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
|
||||
int shgemm_tt(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
|
||||
|
||||
int bgemm_nn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int bgemm_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int bgemm_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int bgemm_tt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
|
||||
int sbgemm_nn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int sbgemm_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int sbgemm_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
@@ -754,6 +784,16 @@ int xgemm_cr(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLON
|
||||
int xgemm_cc(blas_arg_t *, BLASLONG *, BLASLONG *, xdouble *, xdouble *, BLASLONG);
|
||||
#endif
|
||||
|
||||
int shgemm_thread_nn(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
|
||||
int shgemm_thread_nt(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
|
||||
int shgemm_thread_tn(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
|
||||
int shgemm_thread_tt(blas_arg_t *, BLASLONG *, BLASLONG *, hfloat16 *, hfloat16 *, BLASLONG);
|
||||
|
||||
int bgemm_thread_nn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int bgemm_thread_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int bgemm_thread_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int bgemm_thread_tt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
|
||||
int sbgemm_thread_nn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int sbgemm_thread_nt(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int sbgemm_thread_tn(blas_arg_t *, BLASLONG *, BLASLONG *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
@@ -1944,6 +1984,7 @@ int dgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
|
||||
int cgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
|
||||
int zgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
|
||||
int sbgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
|
||||
// int shgemm_batch_thread(blas_arg_t * queue, BLASLONG nums);
|
||||
|
||||
#ifdef __CUDACC__
|
||||
}
|
||||
|
||||
+109
-5
@@ -1,5 +1,6 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* Copyright 2025 The OpenBLAS Project. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
@@ -39,6 +40,8 @@
|
||||
#ifndef COMMON_MACRO
|
||||
#define COMMON_MACRO
|
||||
|
||||
#include "common_sh.h"
|
||||
#include "common_b.h"
|
||||
#include "common_sb.h"
|
||||
#include "common_s.h"
|
||||
#include "common_d.h"
|
||||
@@ -70,6 +73,7 @@
|
||||
#define SUM_K QSUM_K
|
||||
#define SWAP_K QSWAP_K
|
||||
#define ROT_K QROT_K
|
||||
#define ROTM_K QROTM_K
|
||||
|
||||
#define GEMV_N QGEMV_N
|
||||
#define GEMV_T QGEMV_T
|
||||
@@ -361,6 +365,7 @@
|
||||
#define SUM_K DSUM_K
|
||||
#define SWAP_K DSWAP_K
|
||||
#define ROT_K DROT_K
|
||||
#define ROTM_K DROTM_K
|
||||
|
||||
#define GEMV_N DGEMV_N
|
||||
#define GEMV_T DGEMV_T
|
||||
@@ -654,15 +659,108 @@
|
||||
#define GEMM_SMALL_KERNEL_B0_NT DGEMM_SMALL_KERNEL_B0_NT
|
||||
#define GEMM_SMALL_KERNEL_B0_TN DGEMM_SMALL_KERNEL_B0_TN
|
||||
#define GEMM_SMALL_KERNEL_B0_TT DGEMM_SMALL_KERNEL_B0_TT
|
||||
#elif defined(HFLOAT16)
|
||||
#define GEMM_BETA SHGEMM_BETA
|
||||
#define GEMM_KERNEL_N SHGEMM_KERNEL
|
||||
#define GEMM_KERNEL_L SHGEMM_KERNEL
|
||||
#define GEMM_KERNEL_R SHGEMM_KERNEL
|
||||
#define GEMM_KERNEL_B SHGEMM_KERNEL
|
||||
#define GEMM_NN SHGEMM_NN
|
||||
#define GEMM_CN SHGEMM_TN
|
||||
#define GEMM_TN SHGEMM_TN
|
||||
#define GEMM_NC SHGEMM_NT
|
||||
#define GEMM_NT SHGEMM_NT
|
||||
#define GEMM_CC SHGEMM_TT
|
||||
#define GEMM_CT SHGEMM_TT
|
||||
#define GEMM_TC SHGEMM_TT
|
||||
#define GEMM_TT SHGEMM_TT
|
||||
#define GEMM_NR SHGEMM_NN
|
||||
#define GEMM_TR SHGEMM_TN
|
||||
#define GEMM_CR SHGEMM_TN
|
||||
#define GEMM_RN SHGEMM_NN
|
||||
#define GEMM_RT SHGEMM_NT
|
||||
#define GEMM_RC SHGEMM_NT
|
||||
#define GEMM_RR SHGEMM_NN
|
||||
#define GEMM_ONCOPY SHGEMM_ONCOPY
|
||||
#define GEMM_OTCOPY SHGEMM_OTCOPY
|
||||
#define GEMM_INCOPY SHGEMM_INCOPY
|
||||
#define GEMM_ITCOPY SHGEMM_ITCOPY
|
||||
|
||||
#define GEMM_THREAD_NN SHGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_CN SHGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_TN SHGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_NC SHGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_NT SHGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_CC SHGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_CT SHGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_TC SHGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_TT SHGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_NR SHGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_TR SHGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_CR SHGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_RN SHGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_RT SHGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_RC SHGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_RR SHGEMM_THREAD_NN
|
||||
|
||||
|
||||
#elif defined(BFLOAT16) && defined(BGEMM)
|
||||
#define SCAL_K BSCAL_K
|
||||
|
||||
#define GEMV_N BGEMV_N_K
|
||||
#define GEMV_T BGEMV_T_K
|
||||
|
||||
#define GEMM_BETA BGEMM_BETA
|
||||
#define GEMM_KERNEL_N BGEMM_KERNEL
|
||||
#define GEMM_KERNEL_L BGEMM_KERNEL
|
||||
#define GEMM_KERNEL_R BGEMM_KERNEL
|
||||
#define GEMM_KERNEL_B BGEMM_KERNEL
|
||||
|
||||
#define GEMM_NN BGEMM_NN
|
||||
#define GEMM_CN BGEMM_TN
|
||||
#define GEMM_TN BGEMM_TN
|
||||
#define GEMM_NC BGEMM_NT
|
||||
#define GEMM_NT BGEMM_NT
|
||||
#define GEMM_CC BGEMM_TT
|
||||
#define GEMM_CT BGEMM_TT
|
||||
#define GEMM_TC BGEMM_TT
|
||||
#define GEMM_TT BGEMM_TT
|
||||
#define GEMM_NR BGEMM_NN
|
||||
#define GEMM_TR BGEMM_TN
|
||||
#define GEMM_CR BGEMM_TN
|
||||
#define GEMM_RN BGEMM_NN
|
||||
#define GEMM_RT BGEMM_NT
|
||||
#define GEMM_RC BGEMM_NT
|
||||
#define GEMM_RR BGEMM_NN
|
||||
#define GEMM_ONCOPY BGEMM_ONCOPY
|
||||
#define GEMM_OTCOPY BGEMM_OTCOPY
|
||||
#define GEMM_INCOPY BGEMM_INCOPY
|
||||
#define GEMM_ITCOPY BGEMM_ITCOPY
|
||||
|
||||
#define GEMM_THREAD_NN BGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_CN BGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_TN BGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_NC BGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_NT BGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_CC BGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_CT BGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_TC BGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_TT BGEMM_THREAD_TT
|
||||
#define GEMM_THREAD_NR BGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_TR BGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_CR BGEMM_THREAD_TN
|
||||
#define GEMM_THREAD_RN BGEMM_THREAD_NN
|
||||
#define GEMM_THREAD_RT BGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_RC BGEMM_THREAD_NT
|
||||
#define GEMM_THREAD_RR BGEMM_THREAD_NN
|
||||
|
||||
#elif defined(BFLOAT16)
|
||||
|
||||
#define D_TO_BF16_K SBDTOBF16_K
|
||||
#define D_BF16_TO_K DBF16TOD_K
|
||||
#define S_TO_BF16_K SBSTOBF16_K
|
||||
#define S_BF16_TO_K SBF16TOS_K
|
||||
#define SBGEMV_N SBGEMV_N_K
|
||||
#define SBGEMV_T SBGEMV_T_K
|
||||
#define GEMV_N SBGEMV_N_K
|
||||
#define GEMV_T SBGEMV_T_K
|
||||
|
||||
#define AMAX_K SAMAX_K
|
||||
#define AMIN_K SAMIN_K
|
||||
@@ -680,8 +778,6 @@
|
||||
#define AXPYC_K SAXPYC_K
|
||||
#define AXPBY_K SAXPBY_K
|
||||
#define SCAL_K SSCAL_K
|
||||
#define GEMV_N SGEMV_N
|
||||
#define GEMV_T SGEMV_T
|
||||
#define SYMV_U SSYMV_U
|
||||
#define SYMV_L SSYMV_L
|
||||
#define GERU_K SGERU_K
|
||||
@@ -977,6 +1073,7 @@
|
||||
#define SUM_K SSUM_K
|
||||
#define SWAP_K SSWAP_K
|
||||
#define ROT_K SROT_K
|
||||
#define ROTM_K SROTM_K
|
||||
|
||||
#define GEMV_N SGEMV_N
|
||||
#define GEMV_T SGEMV_T
|
||||
@@ -2615,6 +2712,9 @@
|
||||
|| defined(ARCH_LOONGARCH64) || defined(ARCH_E2K) || defined(ARCH_ALPHA))
|
||||
extern BLASLONG gemm_offset_a;
|
||||
extern BLASLONG gemm_offset_b;
|
||||
extern BLASLONG bgemm_p;
|
||||
extern BLASLONG bgemm_q;
|
||||
extern BLASLONG bgemm_r;
|
||||
extern BLASLONG sbgemm_p;
|
||||
extern BLASLONG sbgemm_q;
|
||||
extern BLASLONG sbgemm_r;
|
||||
@@ -2987,6 +3087,8 @@ typedef struct {
|
||||
#define NEG_TCOPY DNEG_TCOPY
|
||||
#define LARF_L DLARF_L
|
||||
#define LARF_R DLARF_R
|
||||
#define LAED3_SINGLE dlaed3_single
|
||||
#define LAED3_PARALLEL dlaed3_parallel
|
||||
#else
|
||||
#define GETF2 SGETF2
|
||||
#define GETRF SGETRF
|
||||
@@ -3008,6 +3110,8 @@ typedef struct {
|
||||
#define NEG_TCOPY SNEG_TCOPY
|
||||
#define LARF_L SLARF_L
|
||||
#define LARF_R SLARF_R
|
||||
#define LAED3_SINGLE slaed3_single
|
||||
#define LAED3_PARALLEL slaed3_parallel
|
||||
#endif
|
||||
#else
|
||||
#ifdef XDOUBLE
|
||||
|
||||
+128
-23
@@ -1,6 +1,6 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* Copyright 2023 The OpenBLAS Project. */
|
||||
/* Copyright 2023, 2025 The OpenBLAS Project. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
@@ -48,8 +48,27 @@ typedef struct {
|
||||
int dtb_entries;
|
||||
int switch_ratio;
|
||||
int offsetA, offsetB, align;
|
||||
#if BUILD_HFLOAT16 == 1
|
||||
int shgemm_p, shgemm_q, shgemm_r;
|
||||
int shgemm_unroll_m, shgemm_unroll_n, shgemm_unroll_mn;
|
||||
|
||||
int (*shgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, hfloat16 *, hfloat16 *, float *, BLASLONG);
|
||||
int (*shgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*shgemm_incopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
|
||||
int (*shgemm_itcopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
|
||||
int (*shgemm_oncopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
|
||||
int (*shgemm_otcopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if BUILD_BFLOAT16 == 1
|
||||
int bgemm_p, bgemm_q, bgemm_r;
|
||||
int bgemm_unroll_m, bgemm_unroll_n, bgemm_unroll_mn;
|
||||
int bgemm_align_k;
|
||||
|
||||
int sbgemm_p, sbgemm_q, sbgemm_r;
|
||||
int sbgemm_unroll_m, sbgemm_unroll_n, sbgemm_unroll_mn;
|
||||
int sbgemm_align_k;
|
||||
@@ -64,10 +83,10 @@ typedef struct {
|
||||
float (*sbamin_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sbmax_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbmax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbmax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
|
||||
float (*sbnrm2_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sbasum_k) (BLASLONG, float *, BLASLONG);
|
||||
@@ -77,11 +96,16 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
double (*dsbdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*sbrot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
|
||||
int (*sbrotm_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
|
||||
int (*bscal_k) (BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
int (*sbaxpy_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
int (*sbscal_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
int (*sbswap_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*bgemv_n) (BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
|
||||
int (*bgemv_t) (BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
|
||||
|
||||
int (*sbgemv_n) (BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
|
||||
int (*sbgemv_t) (BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
|
||||
int (*sbger_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
@@ -89,6 +113,14 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
int (*sbsymv_L) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sbsymv_U) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
|
||||
int (*bgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int (*bgemm_beta )(BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
|
||||
int (*bgemm_incopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*bgemm_itcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*bgemm_oncopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*bgemm_otcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
|
||||
int (*sbgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, bfloat16 *, float *, BLASLONG);
|
||||
int (*sbgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
@@ -179,12 +211,12 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
#endif
|
||||
|
||||
#if (BUILD_SINGLE==1) || (BUILD_DOUBLE ==1) || (BUILD_COMPLEX==1)
|
||||
BLASLONG (*isamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isamax_k)(BLASLONG, float *, BLASLONG);
|
||||
#endif
|
||||
#if (BUILD_SINGLE==1) || (BUILD_COMPLEX==1)
|
||||
BLASLONG (*isamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ismax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ismax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*snrm2_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sasum_k) (BLASLONG, float *, BLASLONG);
|
||||
#endif
|
||||
@@ -197,6 +229,7 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
//double (*dsdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*srot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
|
||||
int (*srotm_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
#endif
|
||||
#if (BUILD_SINGLE==1) || (BUILD_DOUBLE==1) || (BUILD_COMPLEX==1)
|
||||
int (*saxpy_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
@@ -221,6 +254,11 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
void (*sgemm_direct) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG , float *, BLASLONG , float * , BLASLONG);
|
||||
int (*sgemm_direct_performant) (BLASLONG M, BLASLONG N, BLASLONG K);
|
||||
#endif
|
||||
#ifdef ARCH_ARM64
|
||||
void (*sgemm_direct) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG , float *, BLASLONG , float * , BLASLONG);
|
||||
void (*sgemm_direct_alpha_beta) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float * , BLASLONG);
|
||||
#endif
|
||||
|
||||
|
||||
int (*sgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG);
|
||||
int (*sgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
@@ -310,10 +348,10 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
double (*damin_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*dmax_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*dmin_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamin_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmax_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamin_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmax_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
|
||||
double (*dnrm2_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*dasum_k) (BLASLONG, double *, BLASLONG);
|
||||
@@ -330,6 +368,7 @@ BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
#endif
|
||||
#if (BUILD_DOUBLE==1) || (BUILD_COMPLEX16==1)
|
||||
int (*drot_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double);
|
||||
int (*drotm_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
|
||||
int (*daxpy_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
int (*dscal_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
int (*dswap_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
@@ -428,10 +467,10 @@ BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
xdouble (*qamin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*qmax_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*qmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqamax_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqmax_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqamax_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqmax_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
|
||||
xdouble (*qnrm2_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*qasum_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
@@ -439,6 +478,7 @@ BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
int (*qcopy_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*qdot_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
int (*qrot_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble);
|
||||
int (*qrotm_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *);
|
||||
|
||||
int (*qaxpy_k) (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
int (*qscal_k) (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
@@ -520,8 +560,8 @@ BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
float (*camax_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*camin_k) (BLASLONG, float *, BLASLONG);
|
||||
|
||||
BLASLONG (*icamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*icamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
|
||||
|
||||
float (*cnrm2_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*casum_k) (BLASLONG, float *, BLASLONG);
|
||||
@@ -731,8 +771,8 @@ BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
|
||||
|
||||
double (*zamax_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*zamin_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*izamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*izamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
|
||||
|
||||
double (*znrm2_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*zasum_k) (BLASLONG, double *, BLASLONG);
|
||||
@@ -942,8 +982,8 @@ BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
|
||||
|
||||
xdouble (*xamax_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*xamin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*ixamax_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*ixamax_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
|
||||
xdouble (*xnrm2_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*xasum_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
@@ -1221,7 +1261,23 @@ extern gotoblas_t *gotoblas;
|
||||
|
||||
#define HAVE_EX_L2 gotoblas -> exclusive_cache
|
||||
|
||||
#if (BUILD_HFLOAT16==1)
|
||||
#define SHGEMM_P gotoblas -> shgemm_p
|
||||
#define SHGEMM_Q gotoblas -> shgemm_q
|
||||
#define SHGEMM_R gotoblas -> shgemm_r
|
||||
#define SHGEMM_UNROLL_M gotoblas -> shgemm_unroll_m
|
||||
#define SHGEMM_UNROLL_N gotoblas -> shgemm_unroll_n
|
||||
#define SHGEMM_UNROLL_MN gotoblas -> shgemm_unroll_mn
|
||||
#endif
|
||||
|
||||
#if (BUILD_BFLOAT16==1)
|
||||
#define BGEMM_P gotoblas -> bgemm_p
|
||||
#define BGEMM_Q gotoblas -> bgemm_q
|
||||
#define BGEMM_R gotoblas -> bgemm_r
|
||||
#define BGEMM_UNROLL_M gotoblas -> bgemm_unroll_m
|
||||
#define BGEMM_UNROLL_N gotoblas -> bgemm_unroll_n
|
||||
#define BGEMM_UNROLL_MN gotoblas -> bgemm_unroll_mn
|
||||
|
||||
#define SBGEMM_P gotoblas -> sbgemm_p
|
||||
#define SBGEMM_Q gotoblas -> sbgemm_q
|
||||
#define SBGEMM_R gotoblas -> sbgemm_r
|
||||
@@ -1349,7 +1405,31 @@ extern gotoblas_t *gotoblas;
|
||||
#define HAVE_EX_L2 0
|
||||
#endif
|
||||
|
||||
#if (BUILD_HFLOAT16 == 1)
|
||||
#define SHGEMM_P SHGEMM_DEFAULT_P
|
||||
#define SHGEMM_Q SHGEMM_DEFAULT_Q
|
||||
#define SHGEMM_R SHGEMM_DEFAULT_R
|
||||
#define SHGEMM_UNROLL_M SHGEMM_DEFAULT_UNROLL_M
|
||||
#define SHGEMM_UNROLL_N SHGEMM_DEFAULT_UNROLL_N
|
||||
#ifdef SHGEMM_DEFAULT_UNROLL_MN
|
||||
#define SHGEMM_UNROLL_MN SHGEMM_DEFAULT_UNROLL_MN
|
||||
#else
|
||||
#define SHGEMM_UNROLL_MN MAX((SHGEMM_UNROLL_M), (SHGEMM_UNROLL_N))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (BUILD_BFLOAT16 == 1)
|
||||
#define BGEMM_P BGEMM_DEFAULT_P
|
||||
#define BGEMM_Q BGEMM_DEFAULT_Q
|
||||
#define BGEMM_R BGEMM_DEFAULT_R
|
||||
#define BGEMM_UNROLL_M BGEMM_DEFAULT_UNROLL_M
|
||||
#define BGEMM_UNROLL_N BGEMM_DEFAULT_UNROLL_N
|
||||
#ifdef BGEMM_DEFAULT_UNROLL_MN
|
||||
#define BGEMM_UNROLL_MN BGEMM_DEFAULT_UNROLL_MN
|
||||
#else
|
||||
#define BGEMM_UNROLL_MN MAX((BGEMM_UNROLL_M), (BGEMM_UNROLL_N))
|
||||
#endif
|
||||
|
||||
#define SBGEMM_P SBGEMM_DEFAULT_P
|
||||
#define SBGEMM_Q SBGEMM_DEFAULT_Q
|
||||
#define SBGEMM_R SBGEMM_DEFAULT_R
|
||||
@@ -1470,6 +1550,7 @@ extern gotoblas_t *gotoblas;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef COMPLEX
|
||||
@@ -1497,6 +1578,30 @@ extern gotoblas_t *gotoblas;
|
||||
#define GEMM_DEFAULT_R DGEMM_DEFAULT_R
|
||||
#define GEMM_DEFAULT_UNROLL_M DGEMM_DEFAULT_UNROLL_M
|
||||
#define GEMM_DEFAULT_UNROLL_N DGEMM_DEFAULT_UNROLL_N
|
||||
#elif defined(HFLOAT16)
|
||||
#define GEMM_P SHGEMM_P
|
||||
#define GEMM_Q SHGEMM_Q
|
||||
#define GEMM_R SHGEMM_R
|
||||
#define GEMM_UNROLL_M SHGEMM_UNROLL_M
|
||||
#define GEMM_UNROLL_N SHGEMM_UNROLL_N
|
||||
#define GEMM_UNROLL_MN SHGEMM_UNROLL_MN
|
||||
#define GEMM_DEFAULT_P SHGEMM_DEFAULT_P
|
||||
#define GEMM_DEFAULT_Q SHGEMM_DEFAULT_Q
|
||||
#define GEMM_DEFAULT_R SHGEMM_DEFAULT_R
|
||||
#define GEMM_DEFAULT_UNROLL_M SHGEMM_DEFAULT_UNROLL_M
|
||||
#define GEMM_DEFAULT_UNROLL_N SHGEMM_DEFAULT_UNROLL_N
|
||||
#elif defined(BFLOAT16) && defined(BGEMM)
|
||||
#define GEMM_P BGEMM_P
|
||||
#define GEMM_Q BGEMM_Q
|
||||
#define GEMM_R BGEMM_R
|
||||
#define GEMM_UNROLL_M BGEMM_UNROLL_M
|
||||
#define GEMM_UNROLL_N BGEMM_UNROLL_N
|
||||
#define GEMM_UNROLL_MN BGEMM_UNROLL_MN
|
||||
#define GEMM_DEFAULT_P BGEMM_DEFAULT_P
|
||||
#define GEMM_DEFAULT_Q BGEMM_DEFAULT_Q
|
||||
#define GEMM_DEFAULT_R BGEMM_DEFAULT_R
|
||||
#define GEMM_DEFAULT_UNROLL_M BGEMM_DEFAULT_UNROLL_M
|
||||
#define GEMM_DEFAULT_UNROLL_N BGEMM_DEFAULT_UNROLL_N
|
||||
#elif defined(BFLOAT16)
|
||||
#define GEMM_P SBGEMM_P
|
||||
#define GEMM_Q SBGEMM_Q
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define QSUM_K qsum_k
|
||||
#define QSWAP_K qswap_k
|
||||
#define QROT_K qrot_k
|
||||
#define QROTM_K qrotm_k
|
||||
|
||||
#define QGEMV_N qgemv_n
|
||||
#define QGEMV_T qgemv_t
|
||||
@@ -165,6 +166,7 @@
|
||||
#define QSUM_K gotoblas -> qsum_k
|
||||
#define QSWAP_K gotoblas -> qswap_k
|
||||
#define QROT_K gotoblas -> qrot_k
|
||||
#define QROTM_K gotoblas -> qrotm_k
|
||||
|
||||
#define QGEMV_N gotoblas -> qgemv_n
|
||||
#define QGEMV_T gotoblas -> qgemv_t
|
||||
|
||||
+6
-2
@@ -24,6 +24,7 @@
|
||||
#define SSCAL_K sscal_k
|
||||
#define SSWAP_K sswap_k
|
||||
#define SROT_K srot_k
|
||||
#define SROTM_K srotm_k
|
||||
|
||||
#define SGEMV_N sgemv_n
|
||||
#define SGEMV_T sgemv_t
|
||||
@@ -48,6 +49,7 @@
|
||||
|
||||
#define SGEMM_DIRECT_PERFORMANT sgemm_direct_performant
|
||||
#define SGEMM_DIRECT sgemm_direct
|
||||
#define SGEMM_DIRECT_ALPHA_BETA sgemm_direct_alpha_beta
|
||||
|
||||
#define SGEMM_ONCOPY sgemm_oncopy
|
||||
#define SGEMM_OTCOPY sgemm_otcopy
|
||||
@@ -189,6 +191,7 @@
|
||||
#define SSCAL_K gotoblas -> sscal_k
|
||||
#define SSWAP_K gotoblas -> sswap_k
|
||||
#define SROT_K gotoblas -> srot_k
|
||||
#define SROTM_K gotoblas -> srotm_k
|
||||
|
||||
#define SGEMV_N gotoblas -> sgemv_n
|
||||
#define SGEMV_T gotoblas -> sgemv_t
|
||||
@@ -213,9 +216,10 @@
|
||||
#ifdef ARCH_X86_64
|
||||
#define SGEMM_DIRECT_PERFORMANT gotoblas -> sgemm_direct_performant
|
||||
#define SGEMM_DIRECT gotoblas -> sgemm_direct
|
||||
#else
|
||||
#elif ARCH_ARM64
|
||||
#define SGEMM_DIRECT_PERFORMANT sgemm_direct_performant
|
||||
#define SGEMM_DIRECT sgemm_direct
|
||||
#define SGEMM_DIRECT gotoblas -> sgemm_direct
|
||||
#define SGEMM_DIRECT_ALPHA_BETA gotoblas -> sgemm_direct_alpha_beta
|
||||
#endif
|
||||
|
||||
#define SGEMM_ONCOPY gotoblas -> sgemm_oncopy
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#ifndef COMMON_SH_H
|
||||
#define COMMON_SH_H
|
||||
|
||||
#ifndef DYNAMIC_ARCH
|
||||
|
||||
#define SHGEMM_ONCOPY shgemm_oncopy
|
||||
#define SHGEMM_OTCOPY shgemm_otcopy
|
||||
|
||||
#if SGEMM_DEFAULT_UNROLL_M == SGEMM_DEFAULT_UNROLL_N
|
||||
#define SHGEMM_INCOPY shgemm_oncopy
|
||||
#define SHGEMM_ITCOPY shgemm_otcopy
|
||||
#else
|
||||
#define SHGEMM_INCOPY shgemm_incopy
|
||||
#define SHGEMM_ITCOPY shgemm_itcopy
|
||||
#endif
|
||||
|
||||
#define SHGEMM_BETA shgemm_beta
|
||||
#define SHGEMM_KERNEL shgemm_kernel
|
||||
|
||||
|
||||
#else // #DYNAMIC_ARCH
|
||||
|
||||
#define SHGEMM_ONCOPY gotoblas -> shgemm_oncopy
|
||||
#define SHGEMM_OTCOPY gotoblas -> shgemm_otcopy
|
||||
#if SGEMM_DEFAULT_UNROLL_M == SGEMM_DEFAULT_UNROLL_N
|
||||
#define SHGEMM_INCOPY gotoblas -> shgemm_oncopy
|
||||
#define SHGEMM_ITCOPY gotoblas -> shgemm_otcopy
|
||||
#else
|
||||
#define SHGEMM_INCOPY gotoblas -> shgemm_incopy
|
||||
#define SHGEMM_ITCOPY gotoblas -> shgemm_itcopy
|
||||
#endif
|
||||
|
||||
#define SHGEMM_BETA gotoblas -> shgemm_beta
|
||||
#define SHGEMM_KERNEL gotoblas -> shgemm_kernel
|
||||
#endif // #DYNAMIC_ARCH
|
||||
|
||||
#define SHGEMM_NN shgemm_nn
|
||||
#define SHGEMM_CN shgemm_tn
|
||||
#define SHGEMM_TN shgemm_tn
|
||||
#define SHGEMM_NC shgemm_nt
|
||||
#define SHGEMM_NT shgemm_nt
|
||||
#define SHGEMM_CC shgemm_tt
|
||||
#define SHGEMM_CT shgemm_tt
|
||||
#define SHGEMM_TC shgemm_tt
|
||||
#define SHGEMM_TT shgemm_tt
|
||||
#define SHGEMM_NR shgemm_nn
|
||||
#define SHGEMM_TR shgemm_tn
|
||||
#define SHGEMM_CR shgemm_tn
|
||||
#define SHGEMM_RN shgemm_nn
|
||||
#define SHGEMM_RT shgemm_nt
|
||||
#define SHGEMM_RC shgemm_nt
|
||||
#define SHGEMM_RR shgemm_nn
|
||||
|
||||
#define SHGEMM_THREAD_NN shgemm_thread_nn
|
||||
#define SHGEMM_THREAD_CN shgemm_thread_tn
|
||||
#define SHGEMM_THREAD_TN shgemm_thread_tn
|
||||
#define SHGEMM_THREAD_NC shgemm_thread_nt
|
||||
#define SHGEMM_THREAD_NT shgemm_thread_nt
|
||||
#define SHGEMM_THREAD_CC shgemm_thread_tt
|
||||
#define SHGEMM_THREAD_CT shgemm_thread_tt
|
||||
#define SHGEMM_THREAD_TC shgemm_thread_tt
|
||||
#define SHGEMM_THREAD_TT shgemm_thread_tt
|
||||
#define SHGEMM_THREAD_NR shgemm_thread_nn
|
||||
#define SHGEMM_THREAD_TR shgemm_thread_tn
|
||||
#define SHGEMM_THREAD_CR shgemm_thread_tn
|
||||
#define SHGEMM_THREAD_RN shgemm_thread_nn
|
||||
#define SHGEMM_THREAD_RT shgemm_thread_nt
|
||||
#define SHGEMM_THREAD_RC shgemm_thread_nt
|
||||
#define SHGEMM_THREAD_RR shgemm_thread_nn
|
||||
|
||||
|
||||
#endif // #COMMON_SH_H
|
||||
+9
-2
@@ -103,9 +103,16 @@ static inline int blas_quickdivide(blasint x, blasint y){
|
||||
.global REALNAME ;\
|
||||
.type REALNAME, %function ;\
|
||||
REALNAME:
|
||||
|
||||
|
||||
#define EPILOGUE
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
# define GNUSTACK .section .note.GNU-stack,"",@progbits
|
||||
#else
|
||||
# define GNUSTACK
|
||||
#endif
|
||||
|
||||
#define EPILOGUE \
|
||||
.size REALNAME, .-REALNAME; \
|
||||
GNUSTACK
|
||||
|
||||
#define PROFCODE
|
||||
|
||||
|
||||
@@ -65,3 +65,10 @@ _cpuid:
|
||||
.subsections_via_symbols
|
||||
|
||||
#endif
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
#if defined(__arm__)
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
#else
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+65
-6
@@ -43,6 +43,9 @@ size_t length64=sizeof(value64);
|
||||
#ifndef HWCAP_SVE
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#endif
|
||||
#if (defined OS_WINDOWS)
|
||||
#include <winreg.h>
|
||||
#endif
|
||||
|
||||
#define get_cpu_ftr(id, var) ({ \
|
||||
__asm__ __volatile__ ("mrs %0, "#id : "=r" (var)); \
|
||||
@@ -76,6 +79,7 @@ size_t length64=sizeof(value64);
|
||||
#define CPU_TSV110 9
|
||||
// Ampere
|
||||
#define CPU_EMAG8180 10
|
||||
#define CPU_AMPERE1 25
|
||||
// Apple
|
||||
#define CPU_VORTEX 13
|
||||
// Fujitsu
|
||||
@@ -108,7 +112,8 @@ static char *cpuname[] = {
|
||||
"CORTEXA710",
|
||||
"FT2000",
|
||||
"CORTEXA76",
|
||||
"NEOVERSEV2"
|
||||
"NEOVERSEV2",
|
||||
"AMPERE1"
|
||||
};
|
||||
|
||||
static char *cpuname_lower[] = {
|
||||
@@ -136,7 +141,9 @@ static char *cpuname_lower[] = {
|
||||
"cortexa710",
|
||||
"ft2000",
|
||||
"cortexa76",
|
||||
"neoversev2"
|
||||
"neoversev2",
|
||||
"ampere1",
|
||||
"ampere1a"
|
||||
};
|
||||
|
||||
static int cpulowperf=0;
|
||||
@@ -273,11 +280,11 @@ int detect(void)
|
||||
fclose(infile);
|
||||
}
|
||||
}
|
||||
sprintf(cpuimpl,"0x%2x",implementer);
|
||||
sprintf(cpuimpl,"0x%02x",implementer);
|
||||
cpu_implementer=strdup(cpuimpl);
|
||||
}
|
||||
qsort(cpucores,1024,sizeof(int),cpusort);
|
||||
sprintf(cpupart,"0x%3x",cpucores[0]);
|
||||
sprintf(cpupart,"0x%03x",cpucores[0]);
|
||||
cpu_part=strdup(cpupart);
|
||||
if(cpu_part != NULL && cpu_implementer != NULL) {
|
||||
// Arm
|
||||
@@ -331,6 +338,10 @@ int detect(void)
|
||||
// Ampere
|
||||
else if (strstr(cpu_implementer, "0x50") && strstr(cpu_part, "0x000"))
|
||||
return CPU_EMAG8180;
|
||||
else if (strstr(cpu_implementer, "0xc0")) {
|
||||
if (strstr(cpu_part, "0xac3") || strstr(cpu_part, "0xac4"))
|
||||
return CPU_AMPERE1;
|
||||
}
|
||||
// Fujitsu
|
||||
else if (strstr(cpu_implementer, "0x46") && strstr(cpu_part, "0x001"))
|
||||
return CPU_A64FX;
|
||||
@@ -371,20 +382,47 @@ int detect(void)
|
||||
}
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.ncpu",&value64,&length64,NULL,0);
|
||||
cpulowperf=value64;
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.nperflevels",&value64,&length64,NULL,0);
|
||||
if (value64 > 1) {
|
||||
sysctlbyname("hw.perflevel0.cpusperl",&value64,&length64,NULL,0);
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.perflevel0.cpusperl2",&value64,&length64,NULL,0);
|
||||
cpuhiperf=value64;
|
||||
sysctlbyname("hw.perflevel1.cpusperl",&value64,&length64,NULL,0);
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.perflevel1.cpusperl2",&value64,&length64,NULL,0);
|
||||
cpulowperf=value64;
|
||||
}
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.cpufamily",&value64,&length64,NULL,0);
|
||||
if (value64 ==131287967|| value64 == 458787763 ) return CPU_VORTEX; //A12/M1
|
||||
if (value64 == 3660830781) return CPU_VORTEX; //A15/M2
|
||||
if (value64 == 2271604202) return CPU_VORTEX; //A16/M3
|
||||
if (value64 == 1867590060) return CPU_VORTEX; //M4
|
||||
#else
|
||||
#ifdef OS_WINDOWS
|
||||
HKEY reghandle;
|
||||
HKEY hklm = HKEY_LOCAL_MACHINE;
|
||||
WCHAR valstring[512];
|
||||
PVOID pvalstring=valstring;
|
||||
DWORD size=sizeof (valstring);
|
||||
DWORD type=RRF_RT_ANY;
|
||||
DWORD flags=0;
|
||||
LPCWSTR subkey= L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
|
||||
LPCWSTR field=L"ProcessorNameString";
|
||||
LONG errcode=RegOpenKeyEx(HKEY_LOCAL_MACHINE,TEXT("Hardware\\Description\\System\\CentralProcessor\\0"), 0, KEY_READ, ®handle);
|
||||
if (errcode != NO_ERROR) wprintf(L"Could not open registry key for proc0: %x\n",errcode);
|
||||
errcode=RegQueryValueEx(reghandle, "ProcessorNameString", NULL,NULL ,pvalstring,&size);
|
||||
if (errcode != ERROR_SUCCESS) wprintf(L"Error reading cpuname from registry:%x\n",errcode);
|
||||
//wprintf(stderr,L"%s\n",(PWSTR)valstring);
|
||||
RegCloseKey(reghandle);
|
||||
if (strstr(valstring, "Snapdragon(R) X Elite")) return CPU_NEOVERSEN1;
|
||||
if (strstr(valstring, "Ampere(R) Altra")) return CPU_NEOVERSEN1;
|
||||
if (strstr(valstring, "Snapdragon (TM) 8cx Gen 3")) return CPU_CORTEXX1;
|
||||
if (strstr(valstring, "Snapdragon Compute Platform")) return CPU_CORTEXX1;
|
||||
#endif
|
||||
#endif
|
||||
return CPU_ARMV8;
|
||||
#endif
|
||||
@@ -442,6 +480,7 @@ int n=0;
|
||||
printf("#define NUM_CORES_HP %d\n",cpuhiperf);
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.physicalcpu_max",&value,&length,NULL,0);
|
||||
printf("#define NUM_CORES %d\n",value);
|
||||
if (cpulowperf >0)
|
||||
@@ -653,6 +692,21 @@ void get_cpuconfig(void)
|
||||
printf("#define DTB_SIZE 4096\n");
|
||||
break;
|
||||
|
||||
case CPU_AMPERE1:
|
||||
printf("#define %s\n", cpuname[d]);
|
||||
printf("#define L1_CODE_SIZE 16384\n");
|
||||
printf("#define L1_CODE_LINESIZE 64\n");
|
||||
printf("#define L1_CODE_ASSOCIATIVE 4\n");
|
||||
printf("#define L1_DATA_SIZE 65536\n");
|
||||
printf("#define L1_DATA_LINESIZE 64\n");
|
||||
printf("#define L1_DATA_ASSOCIATIVE 4\n");
|
||||
printf("#define L2_SIZE 2097152\n");
|
||||
printf("#define L2_LINESIZE 64\n");
|
||||
printf("#define L2_ASSOCIATIVE 8\n");
|
||||
printf("#define DTB_DEFAULT_ENTRIES 64\n");
|
||||
printf("#define DTB_SIZE 4096\n");
|
||||
break;
|
||||
|
||||
case CPU_THUNDERX3T110:
|
||||
printf("#define THUNDERX3T110 \n");
|
||||
printf("#define L1_CODE_SIZE 65536 \n");
|
||||
@@ -673,12 +727,17 @@ void get_cpuconfig(void)
|
||||
case CPU_VORTEX:
|
||||
printf("#define VORTEX \n");
|
||||
#ifdef __APPLE__
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.l1icachesize",&value64,&length64,NULL,0);
|
||||
printf("#define L1_CODE_SIZE %lld \n",value64);
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.cachelinesize",&value64,&length64,NULL,0);
|
||||
printf("#define L1_CODE_LINESIZE %lld \n",value64);
|
||||
printf("#define L1_DATA_LINESIZE %lld \n",value64);
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.l1dcachesize",&value64,&length64,NULL,0);
|
||||
printf("#define L1_DATA_SIZE %lld \n",value64);
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.l2cachesize",&value64,&length64,NULL,0);
|
||||
printf("#define L2_SIZE %lld \n",value64);
|
||||
#endif
|
||||
|
||||
@@ -131,6 +131,7 @@ int detect(void){
|
||||
if (!strncasecmp(p, "POWER8", 6)) return CPUTYPE_POWER8;
|
||||
if (!strncasecmp(p, "POWER9", 6)) return CPUTYPE_POWER9;
|
||||
if (!strncasecmp(p, "POWER10", 7)) return CPUTYPE_POWER10;
|
||||
if (!strncasecmp(p, "POWER11", 7)) return CPUTYPE_POWER10;
|
||||
if (!strncasecmp(p, "Cell", 4)) return CPUTYPE_CELL;
|
||||
if (!strncasecmp(p, "7447", 4)) return CPUTYPE_PPCG4;
|
||||
|
||||
@@ -171,6 +172,9 @@ int detect(void){
|
||||
int id;
|
||||
__asm __volatile("mfpvr %0" : "=r"(id));
|
||||
switch ( id >> 16 ) {
|
||||
case 0x82: // POWER11
|
||||
return CPUTYPE_POWER10;
|
||||
break;
|
||||
case 0x80: // POWER10
|
||||
return CPUTYPE_POWER10;
|
||||
break;
|
||||
|
||||
+20
-1
@@ -1567,6 +1567,7 @@ int get_cpuname(void){
|
||||
case 10:
|
||||
case 15:
|
||||
case 14: // Alder Lake N
|
||||
case 13: // Lunar Lake
|
||||
if(support_avx2())
|
||||
return CPUTYPE_HASWELL;
|
||||
if(support_avx())
|
||||
@@ -1578,6 +1579,7 @@ int get_cpuname(void){
|
||||
case 12: //family 6 exmodel 12
|
||||
switch (model) {
|
||||
case 15:
|
||||
case 6: // Arrow Lake
|
||||
if(support_avx512())
|
||||
return CPUTYPE_SAPPHIRERAPIDS;
|
||||
if(support_avx2())
|
||||
@@ -2411,7 +2413,8 @@ int get_coretype(void){
|
||||
case 7: // Raptor Lake
|
||||
case 10:
|
||||
case 15:
|
||||
case 14: // Alder Lake N
|
||||
case 14: // Alder Lake N
|
||||
case 13: // Lunar Lake
|
||||
#ifndef NO_AVX2
|
||||
if(support_avx2())
|
||||
return CORE_HASWELL;
|
||||
@@ -2421,6 +2424,22 @@ int get_coretype(void){
|
||||
else
|
||||
return CORE_NEHALEM;
|
||||
}
|
||||
case 12:
|
||||
switch (model) {
|
||||
case 6: // Arrow Lake
|
||||
if(support_amx_bf16())
|
||||
return CORE_SAPPHIRERAPIDS;
|
||||
if(support_avx512_bf16())
|
||||
return CORE_COOPERLAKE;
|
||||
if(support_avx512())
|
||||
return CORE_SKYLAKEX;
|
||||
if(support_avx2())
|
||||
return CORE_HASWELL;
|
||||
if(support_avx())
|
||||
return CORE_SANDYBRIDGE;
|
||||
else
|
||||
return CORE_NEHALEM;
|
||||
}
|
||||
}
|
||||
case 15:
|
||||
if (model <= 0x2) return CORE_NORTHWOOD;
|
||||
|
||||
+1
-17
@@ -6,7 +6,7 @@ enable_language(Fortran)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DADD${BU} -DCBLAS")
|
||||
if (BINARY32 AND CMAKE_C_PLATFORM_ID MATCHES "MinGW" AND CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL 14.2)
|
||||
if (BINARY32 AND CMAKE_C_PLATFORM_ID MATCHES "MinGW" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 14.1)
|
||||
list(REMOVE_ITEM ${CMAKE_Fortran_FLAGS} -O3 -O2 -O1 -Os)
|
||||
set (CMAKE_Fortran_FLAGS_RELEASE "" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
@@ -44,10 +44,6 @@ else()
|
||||
c_${float_char}blas1.c)
|
||||
endif()
|
||||
target_link_libraries(x${float_char}cblat1 ${OpenBLAS_LIBNAME})
|
||||
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
|
||||
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
|
||||
target_link_libraries(x${float_char}cblat1 omp pthread)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
target_link_libraries(x${float_char}cblat1 m)
|
||||
endif()
|
||||
@@ -73,10 +69,6 @@ else()
|
||||
constant.c)
|
||||
endif()
|
||||
target_link_libraries(x${float_char}cblat2 ${OpenBLAS_LIBNAME})
|
||||
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
|
||||
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
|
||||
target_link_libraries(x${float_char}cblat2 omp pthread)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
target_link_libraries(x${float_char}cblat2 m)
|
||||
endif()
|
||||
@@ -124,20 +116,12 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
target_link_libraries(x${float_char}cblat3 ${OpenBLAS_LIBNAME})
|
||||
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
|
||||
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
|
||||
target_link_libraries(x${float_char}cblat3 omp pthread)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
target_link_libraries(x${float_char}cblat3 m)
|
||||
endif()
|
||||
if (USE_GEMM3M)
|
||||
if ((${float_char} STREQUAL "c") OR (${float_char} STREQUAL "z"))
|
||||
target_link_libraries(x${float_char}cblat3_3m ${OpenBLAS_LIBNAME})
|
||||
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
|
||||
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
|
||||
target_link_libraries(x${float_char}cblat3 omp pthread)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
target_link_libraries(x${float_char}cblat3_3m m)
|
||||
endif()
|
||||
|
||||
+4
-4
@@ -235,18 +235,18 @@ FLDFLAGS = $(FFLAGS:-fPIC=) $(LDFLAGS)
|
||||
ifeq ($(USE_OPENMP), 1)
|
||||
ifeq ($(F_COMPILER), GFORTRAN)
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CEXTRALIB += -lomp
|
||||
EXTRALIB += -lomp
|
||||
endif
|
||||
endif
|
||||
ifeq ($(F_COMPILER), NAG)
|
||||
CEXTRALIB = -lgomp
|
||||
EXTRALIB = -lgomp
|
||||
endif
|
||||
ifeq ($(F_COMPILER), IBM)
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
CEXTRALIB += -lgomp
|
||||
EXTRALIB += -lgomp
|
||||
endif
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CEXTRALIB += -lomp
|
||||
EXTRALIB += -lomp
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
+1
-1
@@ -440,7 +440,7 @@ static real c_b43 = (float)1.;
|
||||
extern /* Subroutine */ int ctest_(integer*, complex*, complex*, complex*, real*);
|
||||
static complex mwpcs[5], mwpct[5];
|
||||
extern /* Subroutine */ int itest1_(integer*, integer*), stest1_(real*,real*,real*,real*);
|
||||
extern /* Subroutine */ int cscaltest_(), itest1_(), stest1_();
|
||||
extern /* Subroutine */ int cscaltest_(integer*, complex*, complex*, integer*);
|
||||
static complex cx[8];
|
||||
extern real scnrm2test_(integer*, complex*, integer*);
|
||||
static integer np1;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
+4
-4
@@ -91,7 +91,7 @@ like Intel Haswell. There once was an effort to build an OpenCL implementation t
|
||||
|
||||
We obtained a performance comparable with Intel MKL that actually outperformed Intel MKL in some cases.
|
||||
Here is the result of the DGEMM subroutine's performance on Intel Core i5-2500K Windows 7 SP1 64-bit:
|
||||

|
||||

|
||||
|
||||
<hr noshade="noshade">
|
||||
|
||||
@@ -220,8 +220,8 @@ lead to compiler error messages about an "ABI change" when compiling AVX512 code
|
||||
### <a name="ppcxl"></a>Building OpenBLAS on POWER fails with IBM XL
|
||||
|
||||
Trying to compile OpenBLAS with IBM XL ends with error messages about unknown register names
|
||||
like "vs32". Working around these by using known alternate names for the vector registers only leads to another assembler error about unsupported constraints. This is a known deficiency in the IBM compiler at least up to and including 16.1.0 (and in the POWER version of clang, from which it is derived) - use gcc instead. (See issues #1078
|
||||
and #1699 for related discussions)
|
||||
like "vs32". Working around these by using known alternate names for the vector registers only leads to another assembler error about unsupported constraints. This is a known deficiency in the IBM compiler at least up to and including 16.1.0 (and in the POWER version of clang, from which it is derived) - use gcc instead. (See issues [#1078](https://github.com/OpenMathLib/OpenBLAS/issues/1078)
|
||||
and [#1699](https://github.com/OpenMathLib/OpenBLAS/issues/1699) for related discussions)
|
||||
|
||||
### <a name="debianlts"></a>Replacing system BLAS/updating APT OpenBLAS in Mint/Ubuntu/Debian
|
||||
|
||||
@@ -268,7 +268,7 @@ path (usually either /usr/local/include, /opt/OpenBLAS/include or whatever you s
|
||||
|
||||
This is due to different interpretations of the (informal) standard for passing characters as arguments between C and FORTRAN functions. As the method for storing text differs in the two languages, when C calls Fortran the text length is passed as an "invisible" additional parameter.
|
||||
Historically, this has not been required when the text is just a single character, so older code like the Reference-LAPACK bundled with OpenBLAS
|
||||
does not do it. Recently gcc's checking has changed to require it, but there is no consensus yet if and how the existing LAPACK (and many other codebases) should adapt. (And for actual compilation, gcc has mostly backtracked and provided compatibility options - hence the default build settings in the OpenBLAS Makefiles add -fno-optimize-sibling-calls to the gfortran options to prevent miscompilation with "affected" versions. See ticket 2154 in the issue tracker for more details and links)
|
||||
does not do it. Recently gcc's checking has changed to require it, but there is no consensus yet if and how the existing LAPACK (and many other codebases) should adapt. (And for actual compilation, gcc has mostly backtracked and provided compatibility options - hence the default build settings in the OpenBLAS Makefiles add -fno-optimize-sibling-calls to the gfortran options to prevent miscompilation with "affected" versions. See ticket [#2154](https://github.com/OpenMathLib/OpenBLAS/issues/2154) in the issue tracker for more details and links)
|
||||
<hr noshade="noshade">
|
||||
|
||||
### <a name="newcpu"></a>Build fails with lots of errors about undefined ?GEMM_UNROLL_M
|
||||
|
||||
+13
-5
@@ -480,13 +480,13 @@ the LLVM toolchain enables native compilation of the Fortran sources of LAPACK a
|
||||
|
||||
4. Navigate to the OpenBLAS source code directory and start building OpenBLAS
|
||||
by invoking Ninja:
|
||||
|
||||
|
||||
```cmd
|
||||
cd OpenBLAS
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DTARGET=ARMV8 -DBINARY=64 -DCMAKE_C_COMPILER=clang-cl -DCMAKE_C_COMPILER=arm64-pc-windows-msvc -DCMAKE_ASM_COMPILER=arm64-pc-windows-msvc -DCMAKE_Fortran_COMPILER=flang-new
|
||||
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DTARGET=ARMV8 -DBINARY=64 -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang-new
|
||||
|
||||
ninja -j16
|
||||
```
|
||||
@@ -623,14 +623,22 @@ Note: using `TARGET=CORTEXA57` in place of `ARMV8` will pick up better
|
||||
optimized routines. Implementations for the `CORTEXA57` target are compatible
|
||||
with all other `ARMV8` targets.
|
||||
|
||||
Note: for NDK 23b, something as simple as:
|
||||
Note: for NDK 23b and later, something as simple as:
|
||||
```bash
|
||||
export PATH=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/:$PATH
|
||||
make HOSTCC=gcc CC=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang ONLY_CBLAS=1 TARGET=ARMV8
|
||||
make HOSTCC=gcc CC=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang ONLY_CBLAS=1 TARGET=ARMV8 RANLIB=echo
|
||||
```
|
||||
appears to be sufficient on Linux. On OSX, setting AR to the ar provided in the
|
||||
"bin" path of the NDK (probably `llvm-ar`) is also necessary.
|
||||
|
||||
If you prefer building with CMake, running
|
||||
```bash
|
||||
cmake -DANDROID_ABI=arm64-v8a -DTARGET=ARMV8 -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-r27/build/cmake/android.toolchain.cmake -DNOFORTRAN=1 -DANDROID_PLATFORM=android-23 ..
|
||||
cmake --build .
|
||||
```
|
||||
in your build directory should work (be sure to adjust the toolchain_file argument according to where you installed the NDK, and the ANDROID_PLATFORM
|
||||
according to the minimum version of Android you want to support. (If you leave out the ANDROID_PLATFORM parameter, the build will fail with an error
|
||||
message about a missing declaration or missing header file complex.h)
|
||||
|
||||
??? note "Alternative build script for 3 architectures"
|
||||
|
||||
|
||||
@@ -223,3 +223,7 @@ if (USE_THREAD)
|
||||
endif ()
|
||||
|
||||
add_library(driver_level2 OBJECT ${OPENBLAS_SRC})
|
||||
|
||||
if (USE_OPENMP)
|
||||
target_link_libraries(driver_level2 OpenMP::OpenMP_C)
|
||||
endif()
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025 The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
TOPDIR = ../..
|
||||
include ../../Makefile.system
|
||||
|
||||
@@ -423,6 +451,9 @@ XBLASOBJS += \
|
||||
xtbmv_thread_CLU.$(SUFFIX) xtbmv_thread_CLN.$(SUFFIX)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
BBLASOBJS += \
|
||||
bgemv_thread_n$(TSUFFIX).$(SUFFIX) \
|
||||
bgemv_thread_t$(TSUFFIX).$(SUFFIX)
|
||||
SBBLASOBJS += \
|
||||
sbgemv_thread_n$(TSUFFIX).$(SUFFIX) \
|
||||
sbgemv_thread_t$(TSUFFIX).$(SUFFIX)
|
||||
@@ -3707,6 +3738,10 @@ xtrsv_CUN.$(SUFFIX) xtrsv_CUN.$(PSUFFIX) : ztrsv_L.c ../../param.h
|
||||
$(CC) -c $(CFLAGS) -DXDOUBLE -DCOMPLEX -DTRANSA=4 -UUNIT $< -o $(@F)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemv_thread_n.$(SUFFIX) bgemv_thread_n.$(PSUFFIX) : sbgemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -DBGEMM -UCOMPLEX -UDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
bgemv_thread_t.$(SUFFIX) bgemv_thread_t.$(PSUFFIX) : sbgemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -DBGEMM -UCOMPLEX -UDOUBLE -DTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
sbgemv_thread_n.$(SUFFIX) sbgemv_thread_n.$(PSUFFIX) : sbgemv_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -UTRANSA -UCONJ -UXCONJ $< -o $(@F)
|
||||
sbgemv_thread_t.$(SUFFIX) sbgemv_thread_t.$(PSUFFIX) : sbgemv_thread.c ../../common.h
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2025 The OpenBLAS Project. */
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
@@ -41,21 +42,21 @@
|
||||
#include "common.h"
|
||||
|
||||
#ifndef TRANSA
|
||||
#define SBGEMV SBGEMV_N
|
||||
#define GEMV GEMV_N
|
||||
#else
|
||||
#define SBGEMV SBGEMV_T
|
||||
#define GEMV GEMV_T
|
||||
#endif
|
||||
|
||||
static int sbgemv_kernel(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *dummy1, FLOAT *dummy2, BLASLONG dummy3){
|
||||
|
||||
bfloat16 *a, *x;
|
||||
float *y;
|
||||
IFLOAT *a, *x;
|
||||
FLOAT *y;
|
||||
BLASLONG lda, incx, incy;
|
||||
BLASLONG m_from, m_to, n_from, n_to;
|
||||
|
||||
a = (bfloat16 *)args->a;
|
||||
x = (bfloat16 *)args->b;
|
||||
y = (float *)args->c;
|
||||
a = (IFLOAT *)args->a;
|
||||
x = (IFLOAT *)args->b;
|
||||
y = (FLOAT *)args->c;
|
||||
|
||||
lda = args->lda;
|
||||
incx = args->ldb;
|
||||
@@ -77,12 +78,12 @@ static int sbgemv_kernel(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
y += n_from * incy;
|
||||
#endif
|
||||
|
||||
SBGEMV(m_to - m_from, n_to - n_from, *((FLOAT *)(args->alpha)), a, lda, x, incx, *((FLOAT *)(args->beta)), y, incy);
|
||||
GEMV(m_to - m_from, n_to - n_from, *((FLOAT *)(args->alpha)), a, lda, x, incx, *((FLOAT *)(args->beta)), y, incy);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CNAME(BLASLONG m, BLASLONG n, float alpha, bfloat16 *a, BLASLONG lda, bfloat16 *x, BLASLONG incx, float beta, float *y, BLASLONG incy, int threads)
|
||||
int CNAME(BLASLONG m, BLASLONG n, FLOAT alpha, IFLOAT *a, BLASLONG lda, IFLOAT *x, BLASLONG incx, FLOAT beta, FLOAT *y, BLASLONG incy, int threads)
|
||||
{
|
||||
blas_arg_t args;
|
||||
blas_queue_t queue[MAX_CPU_NUMBER];
|
||||
|
||||
@@ -14,10 +14,17 @@ foreach (GEMM_DEFINE ${GEMM_DEFINES})
|
||||
endif ()
|
||||
if (BUILD_BFLOAT16)
|
||||
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE}" "gemm_${GEMM_DEFINE_LC}" 0 "" "" false "BFLOAT16")
|
||||
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE};BGEMM" "gemm_${GEMM_DEFINE_LC}" 0 "" "" false "BFLOAT16")
|
||||
if (USE_THREAD AND NOT USE_SIMPLE_THREADED_LEVEL3)
|
||||
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE};THREADED_LEVEL3" "gemm_thread_${GEMM_DEFINE_LC}" 0 "" "" false "BFLOAT16")
|
||||
endif ()
|
||||
endif ()
|
||||
if (BUILD_HFLOAT16)
|
||||
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE}" "gemm_${GEMM_DEFINE_LC}" 0 "" "" false "HFLOAT16")
|
||||
if (USE_THREAD AND NOT USE_SIMPLE_THREADED_LEVEL3)
|
||||
GenerateNamedObjects("gemm.c" "${GEMM_DEFINE};THREADED_LEVEL3" "gemm_thread_${GEMM_DEFINE_LC}" 0 "" "" false "HFLOAT16")
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
if ( BUILD_COMPLEX16 AND NOT BUILD_DOUBLE)
|
||||
@@ -171,3 +178,7 @@ endforeach ()
|
||||
#
|
||||
|
||||
add_library(driver_level3 OBJECT ${OPENBLAS_SRC})
|
||||
|
||||
if (USE_OPENMP)
|
||||
target_link_libraries(driver_level3 OpenMP::OpenMP_C)
|
||||
endif()
|
||||
|
||||
+126
-16
@@ -1,3 +1,32 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
TOPDIR = ../..
|
||||
include ../../Makefile.system
|
||||
|
||||
@@ -20,9 +49,14 @@ USE_GEMM3M = 1
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
BBLASOBJS += bgemm_nn.$(SUFFIX) bgemm_nt.$(SUFFIX) bgemm_tn.$(SUFFIX) bgemm_tt.$(SUFFIX)
|
||||
SBBLASOBJS += sbgemm_nn.$(SUFFIX) sbgemm_nt.$(SUFFIX) sbgemm_tn.$(SUFFIX) sbgemm_tt.$(SUFFIX)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
SHBLASOBJS += shgemm_nn.$(SUFFIX) shgemm_nt.$(SUFFIX) shgemm_tn.$(SUFFIX) shgemm_tt.$(SUFFIX)
|
||||
endif
|
||||
|
||||
SBLASOBJS += \
|
||||
sgemm_nn.$(SUFFIX) sgemm_nt.$(SUFFIX) sgemm_tn.$(SUFFIX) sgemm_tt.$(SUFFIX) \
|
||||
strmm_LNUU.$(SUFFIX) strmm_LNUN.$(SUFFIX) strmm_LNLU.$(SUFFIX) strmm_LNLN.$(SUFFIX) \
|
||||
@@ -208,8 +242,12 @@ COMMONOBJS += syrk_thread.$(SUFFIX)
|
||||
|
||||
ifneq ($(USE_SIMPLE_THREADED_LEVEL3), 1)
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
BBLASOBJS += bgemm_thread_nn.$(SUFFIX) bgemm_thread_nt.$(SUFFIX) bgemm_thread_tn.$(SUFFIX) bgemm_thread_tt.$(SUFFIX)
|
||||
SBBLASOBJS += sbgemm_thread_nn.$(SUFFIX) sbgemm_thread_nt.$(SUFFIX) sbgemm_thread_tn.$(SUFFIX) sbgemm_thread_tt.$(SUFFIX)
|
||||
endif
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
SHBLASOBJS += shgemm_thread_nn.$(SUFFIX) shgemm_thread_nt.$(SUFFIX) shgemm_thread_tn.$(SUFFIX) shgemm_thread_tt.$(SUFFIX)
|
||||
endif
|
||||
SBLASOBJS += sgemm_thread_nn.$(SUFFIX) sgemm_thread_nt.$(SUFFIX) sgemm_thread_tn.$(SUFFIX) sgemm_thread_tt.$(SUFFIX)
|
||||
DBLASOBJS += dgemm_thread_nn.$(SUFFIX) dgemm_thread_nt.$(SUFFIX) dgemm_thread_tn.$(SUFFIX) dgemm_thread_tt.$(SUFFIX)
|
||||
QBLASOBJS += qgemm_thread_nn.$(SUFFIX) qgemm_thread_nt.$(SUFFIX) qgemm_thread_tn.$(SUFFIX) qgemm_thread_tt.$(SUFFIX)
|
||||
@@ -343,17 +381,41 @@ endif
|
||||
|
||||
all ::
|
||||
|
||||
bgemm_nn.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
bgemm_nt.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
bgemm_tn.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
bgemm_tt.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
sbgemm_nn.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
sbgemm_nt.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
sbgemm_tn.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
sbgemm_tt.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
shgemm_nn.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
shgemm_nt.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
shgemm_tn.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
shgemm_tt.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
sgemm_nn.$(SUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
@@ -550,17 +612,41 @@ gemm_thread_variable.$(SUFFIX) : gemm_thread_variable.c ../../common.h
|
||||
beta_thread.$(SUFFIX) : beta_thread.c ../../common.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
|
||||
bgemm_thread_nn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
bgemm_thread_nt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
bgemm_thread_tn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
bgemm_thread_tt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -DBGEMM -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
sbgemm_thread_nn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
sbgemm_thread_nt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
sbgemm_thread_tn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
sbgemm_thread_tt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
shgemm_thread_nn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
shgemm_thread_nt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
shgemm_thread_tn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
shgemm_thread_tt.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
sgemm_thread_nn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
@@ -2736,16 +2822,28 @@ xtrsm_RCLN.$(SUFFIX) : trsm_R.c
|
||||
$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -DTRANSA -UUPPER -UUNIT -DCONJ $< -o $(@F)
|
||||
|
||||
sbgemm_nn.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
sbgemm_nt.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
sbgemm_tn.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
sbgemm_tt.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DHALF -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
shgemm_nn.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
shgemm_nt.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
shgemm_tn.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
shgemm_tt.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
sgemm_nn.$(PSUFFIX) : gemm.c level3.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
@@ -2959,16 +3057,28 @@ zgemm_batch_thread.$(SUFFIX) : gemm_batch_thread.c ../../common.h
|
||||
|
||||
|
||||
sbgemm_thread_nn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
sbgemm_thread_nt.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
sbgemm_thread_tn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
sbgemm_thread_tt.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHALF -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DBFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
shgemm_thread_nn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
shgemm_thread_nt.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DNT $< -o $(@F)
|
||||
|
||||
shgemm_thread_tn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTN $< -o $(@F)
|
||||
|
||||
shgemm_thread_tt.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DHFLOAT16 -UDOUBLE -UCOMPLEX -DTT $< -o $(@F)
|
||||
|
||||
sgemm_thread_nn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h
|
||||
$(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -UCOMPLEX -DNN $< -o $(@F)
|
||||
|
||||
@@ -59,6 +59,14 @@
|
||||
#define GEMM_Q 128
|
||||
#endif
|
||||
|
||||
#ifdef GEMM_DIVIDE_RATE
|
||||
#define DIVIDE_RATE GEMM_DIVIDE_RATE
|
||||
#endif
|
||||
|
||||
#ifdef GEMM_DIVIDE_LIMIT
|
||||
#define DIVIDE_LIMIT GEMM_DIVIDE_LIMIT
|
||||
#endif
|
||||
|
||||
#ifdef THREADED_LEVEL3
|
||||
#include "level3_thread.c"
|
||||
#else
|
||||
|
||||
+19
-6
@@ -1,5 +1,6 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* Copyright 2025 The OpenBLAS Project. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
@@ -169,6 +170,22 @@
|
||||
#define STOP_RPCC(COUNTER)
|
||||
#endif
|
||||
|
||||
#if defined(BUILD_BFLOAT16)
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
#if defined(BGEMM)
|
||||
#define BFLOAT16_ALIGN_K gotoblas->bgemm_align_k
|
||||
#else
|
||||
#define BFLOAT16_ALIGN_K gotoblas->sbgemm_align_k
|
||||
#endif
|
||||
#else
|
||||
#if defined(BGEMM)
|
||||
#define BFLOAT16_ALIGN_K BGEMM_ALIGN_K
|
||||
#else
|
||||
#define BFLOAT16_ALIGN_K SBGEMM_ALIGN_K
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
XFLOAT *sa, XFLOAT *sb, BLASLONG dummy){
|
||||
BLASLONG k, lda, ldb, ldc;
|
||||
@@ -305,12 +322,8 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
}
|
||||
|
||||
BLASLONG pad_min_l = min_l;
|
||||
#if defined(HALF)
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
pad_min_l = (min_l + gotoblas->sbgemm_align_k - 1) & ~(gotoblas->sbgemm_align_k-1);
|
||||
#else
|
||||
pad_min_l = (min_l + SBGEMM_ALIGN_K - 1) & ~(SBGEMM_ALIGN_K - 1);;
|
||||
#endif
|
||||
#if defined(BFLOAT16)
|
||||
pad_min_l = (min_l + BFLOAT16_ALIGN_K - 1) & ~(BFLOAT16_ALIGN_K - 1);
|
||||
#endif
|
||||
|
||||
/* First, we have to move data A to L2 cache */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* Copyright 2023 The OpenBLAS Project. */
|
||||
/* Copyright 2023, 2025 The OpenBLAS Project. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
@@ -216,6 +216,22 @@ typedef struct {
|
||||
#define STOP_RPCC(COUNTER)
|
||||
#endif
|
||||
|
||||
#if defined(BUILD_BFLOAT16)
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
#if defined(BGEMM)
|
||||
#define BFLOAT16_ALIGN_K gotoblas->bgemm_align_k
|
||||
#else
|
||||
#define BFLOAT16_ALIGN_K gotoblas->sbgemm_align_k
|
||||
#endif
|
||||
#else
|
||||
#if defined(BGEMM)
|
||||
#define BFLOAT16_ALIGN_K BGEMM_ALIGN_K
|
||||
#else
|
||||
#define BFLOAT16_ALIGN_K SBGEMM_ALIGN_K
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, IFLOAT *sa, IFLOAT *sb, BLASLONG mypos){
|
||||
|
||||
IFLOAT *buffer[DIVIDE_RATE];
|
||||
@@ -230,6 +246,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
|
||||
BLASLONG nthreads_m;
|
||||
BLASLONG mypos_m, mypos_n;
|
||||
BLASLONG divide_rate = DIVIDE_RATE;
|
||||
|
||||
BLASLONG is, js, ls, bufferside, jjs;
|
||||
BLASLONG min_i, min_l, div_n, min_jj;
|
||||
@@ -264,6 +281,11 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
alpha = (FLOAT *)args -> alpha;
|
||||
beta = (FLOAT *)args -> beta;
|
||||
|
||||
/* Disable divide_rate when N of all threads are less than to DIVIDE_LIMIT */
|
||||
#ifdef DIVIDE_LIMIT
|
||||
if (N < DIVIDE_LIMIT) divide_rate = 1;
|
||||
#endif
|
||||
|
||||
/* Initialize 2D CPU distribution */
|
||||
nthreads_m = args -> nthreads;
|
||||
if (range_m) {
|
||||
@@ -305,9 +327,9 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
) return 0;
|
||||
|
||||
/* Initialize workspace for local region of B */
|
||||
div_n = (n_to - n_from + DIVIDE_RATE - 1) / DIVIDE_RATE;
|
||||
div_n = (n_to - n_from + divide_rate - 1) / divide_rate;
|
||||
buffer[0] = sb;
|
||||
for (i = 1; i < DIVIDE_RATE; i++) {
|
||||
for (i = 1; i < divide_rate; i++) {
|
||||
buffer[i] = buffer[i - 1] + GEMM_Q * ((div_n + GEMM_UNROLL_N - 1)/GEMM_UNROLL_N) * GEMM_UNROLL_N * COMPSIZE;
|
||||
}
|
||||
|
||||
@@ -324,12 +346,8 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
|
||||
BLASLONG pad_min_l = min_l;
|
||||
|
||||
#if defined(HALF)
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
pad_min_l = (min_l + gotoblas->sbgemm_align_k - 1) & ~(gotoblas->sbgemm_align_k-1);
|
||||
#else
|
||||
pad_min_l = (min_l + SBGEMM_ALIGN_K - 1) & ~(SBGEMM_ALIGN_K - 1);;
|
||||
#endif
|
||||
#if defined(BFLOAT16)
|
||||
pad_min_l = (min_l + BFLOAT16_ALIGN_K - 1) & ~(BFLOAT16_ALIGN_K - 1);
|
||||
#endif
|
||||
|
||||
/* Determine step size in m
|
||||
@@ -353,7 +371,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
STOP_RPCC(copy_A);
|
||||
|
||||
/* Copy local region of B into workspace and apply kernel */
|
||||
div_n = (n_to - n_from + DIVIDE_RATE - 1) / DIVIDE_RATE;
|
||||
div_n = (n_to - n_from + divide_rate - 1) / divide_rate;
|
||||
for (js = n_from, bufferside = 0; js < n_to; js += div_n, bufferside ++) {
|
||||
|
||||
/* Make sure if no one is using workspace */
|
||||
@@ -422,7 +440,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
if (current >= (mypos_n + 1) * nthreads_m) current = mypos_n * nthreads_m;
|
||||
|
||||
/* Split other region of B into parts */
|
||||
div_n = (range_n[current + 1] - range_n[current] + DIVIDE_RATE - 1) / DIVIDE_RATE;
|
||||
div_n = (range_n[current + 1] - range_n[current] + divide_rate - 1) / divide_rate;
|
||||
for (js = range_n[current], bufferside = 0; js < range_n[current + 1]; js += div_n, bufferside ++) {
|
||||
if (current != mypos) {
|
||||
|
||||
@@ -473,7 +491,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
do {
|
||||
|
||||
/* Split region of B into parts and apply kernel */
|
||||
div_n = (range_n[current + 1] - range_n[current] + DIVIDE_RATE - 1) / DIVIDE_RATE;
|
||||
div_n = (range_n[current + 1] - range_n[current] + divide_rate - 1) / divide_rate;
|
||||
for (js = range_n[current], bufferside = 0; js < range_n[current + 1]; js += div_n, bufferside ++) {
|
||||
|
||||
/* Apply kernel with local region of A and part of region of B */
|
||||
@@ -508,7 +526,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
/* Wait until all other threads are done with local region of B */
|
||||
START_RPCC();
|
||||
for (i = 0; i < args -> nthreads; i++) {
|
||||
for (js = 0; js < DIVIDE_RATE; js++) {
|
||||
for (js = 0; js < divide_rate; js++) {
|
||||
while (job[mypos].working[i][CACHE_LINE_SIZE * js] ) {YIELDING;};
|
||||
}
|
||||
}
|
||||
@@ -547,7 +565,7 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
|
||||
|
||||
#ifdef USE_OPENMP
|
||||
static omp_lock_t level3_lock, critical_section_lock;
|
||||
static volatile BLASLONG init_lock = 0, omp_lock_initialized = 0,
|
||||
static volatile BLASULONG init_lock = 0, omp_lock_initialized = 0,
|
||||
parallel_section_left = MAX_PARALLEL_NUMBER;
|
||||
|
||||
// Lock initialization; Todo : Maybe this part can be moved to blas_init() in blas_server_omp.c
|
||||
@@ -591,7 +609,7 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
|
||||
|
||||
BLASLONG nthreads = args -> nthreads;
|
||||
|
||||
BLASLONG width, i, j, k, js;
|
||||
BLASLONG width, width_n, i, j, k, js;
|
||||
BLASLONG m, n, n_from, n_to;
|
||||
int mode;
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
@@ -740,18 +758,25 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
|
||||
/* Partition (a step of) n into nthreads regions */
|
||||
range_N[0] = js;
|
||||
num_parts = 0;
|
||||
while (n > 0){
|
||||
width = blas_quickdivide(n + nthreads - num_parts - 1, nthreads - num_parts);
|
||||
if (width < switch_ratio && width > 1) {
|
||||
width = switch_ratio;
|
||||
for(j = 0; j < nthreads_n; j++){
|
||||
width_n = blas_quickdivide(n + nthreads_n - j - 1, nthreads_n - j);
|
||||
n -= width_n;
|
||||
for(i = 0; i < nthreads_m; i++){
|
||||
width = blas_quickdivide(width_n + nthreads_m - i - 1, nthreads_m - i);
|
||||
if (width < switch_ratio) {
|
||||
width = switch_ratio;
|
||||
}
|
||||
width = round_up(width_n, width, GEMM_PREFERED_SIZE);
|
||||
|
||||
width_n -= width;
|
||||
if (width_n < 0) {
|
||||
width = width + width_n;
|
||||
width_n = 0;
|
||||
}
|
||||
range_N[num_parts + 1] = range_N[num_parts] + width;
|
||||
|
||||
num_parts ++;
|
||||
}
|
||||
width = round_up(n, width, GEMM_PREFERED_SIZE);
|
||||
|
||||
n -= width;
|
||||
if (n < 0) width = width + n;
|
||||
range_N[num_parts + 1] = range_N[num_parts] + width;
|
||||
|
||||
num_parts ++;
|
||||
}
|
||||
for (j = num_parts; j < MAX_CPU_NUMBER; j++) {
|
||||
range_N[j + 1] = range_N[num_parts];
|
||||
@@ -844,9 +869,20 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, IFLOAT *sa, IF
|
||||
/* Objective function come from sum of partitions in m and n. */
|
||||
/* (n / nthreads_n) + (m / nthreads_m) */
|
||||
/* = (n * nthreads_m + m * nthreads_n) / (nthreads_n * nthreads_m) */
|
||||
while (nthreads_m % 2 == 0 && n * nthreads_m + m * nthreads_n > n * (nthreads_m / 2) + m * (nthreads_n * 2)) {
|
||||
nthreads_m /= 2;
|
||||
nthreads_n *= 2;
|
||||
BLASLONG cost = 0, div = 0;
|
||||
BLASLONG i;
|
||||
for (i = 1; i <= sqrt(nthreads_m); i++) {
|
||||
if (nthreads_m % i) continue;
|
||||
BLASLONG j = nthreads_m / i;
|
||||
BLASLONG cost_i = n * j + m * nthreads_n * i;
|
||||
BLASLONG cost_j = n * i + m * nthreads_n * j;
|
||||
if (cost == 0 ||
|
||||
cost_i < cost) {cost = cost_i; div = i;}
|
||||
if (cost_j < cost) {cost = cost_j; div = j;}
|
||||
}
|
||||
if (div > 1) {
|
||||
nthreads_m /= div;
|
||||
nthreads_n *= div;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ if (DYNAMIC_ARCH)
|
||||
list(APPEND COMMON_SOURCES dynamic_arm64.c)
|
||||
elseif (POWER)
|
||||
list(APPEND COMMON_SOURCES dynamic_power.c)
|
||||
elseif (ZARCH)
|
||||
list(APPEND COMMON_SOURCES dynamic_zarch.c)
|
||||
elseif (RISCV64)
|
||||
list(APPEND COMMON_SOURCES dynamic_riscv64.c detect_riscv64.c)
|
||||
elseif (LOONGARCH64)
|
||||
@@ -88,3 +90,7 @@ endif ()
|
||||
#endif
|
||||
|
||||
add_library(driver_others OBJECT ${OPENBLAS_SRC} ${MEMORY} ${SMP_SOURCES} ${COMMON_SOURCES})
|
||||
|
||||
if (USE_OPENMP)
|
||||
target_link_libraries(driver_others OpenMP::OpenMP_C)
|
||||
endif()
|
||||
|
||||
@@ -119,11 +119,11 @@ static void * blas_thread_buffer[MAX_CPU_NUMBER];
|
||||
|
||||
/* Local Variables */
|
||||
#if defined(USE_PTHREAD_LOCK)
|
||||
static pthread_mutex_t server_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
volatile static pthread_mutex_t server_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
#elif defined(USE_PTHREAD_SPINLOCK)
|
||||
static pthread_spinlock_t server_lock = 0;
|
||||
volatile static pthread_spinlock_t server_lock = 0;
|
||||
#else
|
||||
static unsigned long server_lock = 0;
|
||||
volatile static unsigned long server_lock = 0;
|
||||
#endif
|
||||
|
||||
#define THREAD_STATUS_SLEEP 2
|
||||
@@ -146,8 +146,8 @@ typedef struct {
|
||||
} thread_status_t;
|
||||
|
||||
#ifdef HAVE_C11
|
||||
#define atomic_load_queue(p) __atomic_load_n(p, __ATOMIC_RELAXED)
|
||||
#define atomic_store_queue(p, v) __atomic_store_n(p, v, __ATOMIC_RELAXED)
|
||||
#define atomic_load_queue(p) __atomic_load_n(p, __ATOMIC_ACQUIRE)
|
||||
#define atomic_store_queue(p, v) __atomic_store_n(p, v, __ATOMIC_RELEASE)
|
||||
#else
|
||||
#define atomic_load_queue(p) (blas_queue_t*)(*(volatile blas_queue_t**)(p))
|
||||
#define atomic_store_queue(p, v) (*(volatile blas_queue_t* volatile*)(p) = (v))
|
||||
@@ -637,7 +637,9 @@ int exec_blas_async(BLASLONG pos, blas_queue_t *queue){
|
||||
|
||||
#ifdef SMP_SERVER
|
||||
// Handle lazy re-init of the thread-pool after a POSIX fork
|
||||
LOCK_COMMAND(&server_lock);
|
||||
if (unlikely(blas_server_avail == 0)) blas_thread_init();
|
||||
UNLOCK_COMMAND(&server_lock);
|
||||
#endif
|
||||
BLASLONG i = 0;
|
||||
blas_queue_t *current = queue;
|
||||
|
||||
@@ -63,12 +63,12 @@ uint64_t detect_riscv64_rvv100(void)
|
||||
* RVV 1.0 and we return 0.
|
||||
*/
|
||||
|
||||
asm volatile("vsetvli x0, x0, e8, m1, ta, ma\n\t"
|
||||
asm volatile("vsetvli t0, x0, e8, m1, ta, ma\n\t"
|
||||
"csrr %0, vtype\n\t"
|
||||
"slt %0, x0, %0\n"
|
||||
: "=r" (rvv10_supported)
|
||||
:
|
||||
:);
|
||||
:"t0", "vtype");
|
||||
|
||||
return rvv10_supported;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,14 @@
|
||||
#include <sys/auxv.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <sys/sysctl.h>
|
||||
int32_t value;
|
||||
size_t length=sizeof(value);
|
||||
int64_t value64;
|
||||
size_t length64=sizeof(value64);
|
||||
#endif
|
||||
|
||||
extern gotoblas_t gotoblas_ARMV8;
|
||||
#ifdef DYNAMIC_LIST
|
||||
#ifdef DYN_CORTEXA53
|
||||
@@ -115,7 +123,12 @@ extern gotoblas_t gotoblas_ARMV8SVE;
|
||||
#else
|
||||
#define gotoblas_ARMV8SVE gotoblas_ARMV8
|
||||
#endif
|
||||
#ifdef DYN_CORTEX_A55
|
||||
#ifdef DYN_ARMV9SME
|
||||
extern gotoblas_t gotoblas_ARMV9SME;
|
||||
#else
|
||||
#define gotoblas_ARMV9SME gotoblas_ARMV8
|
||||
#endif
|
||||
#ifdef DYN_CORTEXA55
|
||||
extern gotoblas_t gotoblas_CORTEXA55;
|
||||
#else
|
||||
#define gotoblas_CORTEXA55 gotoblas_ARMV8
|
||||
@@ -142,21 +155,28 @@ extern gotoblas_t gotoblas_NEOVERSEV1;
|
||||
extern gotoblas_t gotoblas_NEOVERSEN2;
|
||||
extern gotoblas_t gotoblas_ARMV8SVE;
|
||||
extern gotoblas_t gotoblas_A64FX;
|
||||
#ifndef NO_SME
|
||||
extern gotoblas_t gotoblas_ARMV9SME;
|
||||
#else
|
||||
#define gotoblas_ARMV9SME gotoblas_ARMV8SVE
|
||||
#endif
|
||||
#else
|
||||
#define gotoblas_NEOVERSEV1 gotoblas_ARMV8
|
||||
#define gotoblas_NEOVERSEN2 gotoblas_ARMV8
|
||||
#define gotoblas_ARMV8SVE gotoblas_ARMV8
|
||||
#define gotoblas_A64FX gotoblas_ARMV8
|
||||
#define gotoblas_ARMV9SME gotoblas_ARMV8
|
||||
#endif
|
||||
|
||||
extern gotoblas_t gotoblas_THUNDERX3T110;
|
||||
#endif
|
||||
#define gotoblas_NEOVERSEV2 gotoblas_NEOVERSEV1
|
||||
#define gotoblas_NEOVERSEV2 gotoblas_NEOVERSEN2
|
||||
|
||||
extern void openblas_warning(int verbose, const char * msg);
|
||||
#define FALLBACK_VERBOSE 1
|
||||
#define NEOVERSEN1_FALLBACK "OpenBLAS : Your OS does not support SVE instructions. OpenBLAS is using Neoverse N1 kernels as a fallback, which may give poorer performance.\n"
|
||||
|
||||
#define NUM_CORETYPES 18
|
||||
#define NUM_CORETYPES 19
|
||||
|
||||
/*
|
||||
* In case asm/hwcap.h is outdated on the build system, make sure
|
||||
@@ -168,6 +188,9 @@ extern void openblas_warning(int verbose, const char * msg);
|
||||
#ifndef HWCAP_SVE
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#endif
|
||||
#ifndef HWCAP2_SME
|
||||
#define HWCAP2_SME 1<<23
|
||||
#endif
|
||||
|
||||
#define get_cpu_ftr(id, var) ({ \
|
||||
__asm__ __volatile__ ("mrs %0, "#id : "=r" (var)); \
|
||||
@@ -192,6 +215,7 @@ static char *corename[] = {
|
||||
"cortexa55",
|
||||
"armv8sve",
|
||||
"a64fx",
|
||||
"armv9sme",
|
||||
"unknown"
|
||||
};
|
||||
|
||||
@@ -214,6 +238,7 @@ char *gotoblas_corename(void) {
|
||||
if (gotoblas == &gotoblas_CORTEXA55) return corename[15];
|
||||
if (gotoblas == &gotoblas_ARMV8SVE) return corename[16];
|
||||
if (gotoblas == &gotoblas_A64FX) return corename[17];
|
||||
if (gotoblas == &gotoblas_ARMV9SME) return corename[18];
|
||||
return corename[NUM_CORETYPES];
|
||||
}
|
||||
|
||||
@@ -251,6 +276,7 @@ static gotoblas_t *force_coretype(char *coretype) {
|
||||
case 15: return (&gotoblas_CORTEXA55);
|
||||
case 16: return (&gotoblas_ARMV8SVE);
|
||||
case 17: return (&gotoblas_A64FX);
|
||||
case 18: return (&gotoblas_ARMV9SME);
|
||||
}
|
||||
snprintf(message, 128, "Core not found: %s\n", coretype);
|
||||
openblas_warning(1, message);
|
||||
@@ -262,6 +288,11 @@ static gotoblas_t *get_coretype(void) {
|
||||
char coremsg[128];
|
||||
|
||||
#if defined (OS_DARWIN)
|
||||
//future #if !defined(NO_SME)
|
||||
// if (support_sme1()) {
|
||||
// return &gotoblas_ARMV9SME;
|
||||
// }
|
||||
// #endif
|
||||
return &gotoblas_NEOVERSEN1;
|
||||
#endif
|
||||
|
||||
@@ -409,13 +440,21 @@ static gotoblas_t *get_coretype(void) {
|
||||
return &gotoblas_TSV110;
|
||||
}
|
||||
break;
|
||||
case 0x50: // Ampere
|
||||
case 0x50: // Ampere/AppliedMicro
|
||||
switch (part)
|
||||
{
|
||||
case 0x000: // Skylark/EMAG8180
|
||||
return &gotoblas_EMAG8180;
|
||||
}
|
||||
break;
|
||||
case 0xc0: // Ampere
|
||||
switch(part)
|
||||
{
|
||||
case 0xac3:
|
||||
case 0xac4:
|
||||
return &gotoblas_NEOVERSEN1;
|
||||
}
|
||||
break;
|
||||
case 0x51: // Qualcomm
|
||||
switch (part)
|
||||
{
|
||||
@@ -424,12 +463,20 @@ static gotoblas_t *get_coretype(void) {
|
||||
}
|
||||
break;
|
||||
case 0x61: // Apple
|
||||
//future if (support_sme1()) return &gotoblas_ARMV9SME;
|
||||
return &gotoblas_NEOVERSEN1;
|
||||
break;
|
||||
default:
|
||||
snprintf(coremsg, 128, "Unknown CPU model - implementer %x part %x\n",implementer,part);
|
||||
openblas_warning(1, coremsg);
|
||||
}
|
||||
|
||||
#if !defined(NO_SME)
|
||||
if (support_sme1()) {
|
||||
return &gotoblas_ARMV9SME;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NO_SVE
|
||||
if ((getauxval(AT_HWCAP) & HWCAP_SVE)) {
|
||||
return &gotoblas_ARMV8SVE;
|
||||
@@ -480,3 +527,19 @@ void gotoblas_dynamic_init(void) {
|
||||
void gotoblas_dynamic_quit(void) {
|
||||
gotoblas = NULL;
|
||||
}
|
||||
|
||||
int support_sme1(void) {
|
||||
int ret = 0;
|
||||
|
||||
#if (defined OS_LINUX || defined OS_ANDROID)
|
||||
ret = getauxval(AT_HWCAP2) & HWCAP2_SME;
|
||||
if(getauxval(AT_HWCAP2) & HWCAP2_SME){
|
||||
ret = 1;
|
||||
}
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
sysctlbyname("hw.optional.arm.FEAT_SME",&value64,&length64,NULL,0);
|
||||
ret = value64;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,10 @@ static int cpuid(void)
|
||||
else if (arch == POWER_9) return CPU_POWER9;
|
||||
#endif
|
||||
#ifdef POWER_10
|
||||
else if (arch >= POWER_10) return CPU_POWER10;
|
||||
else if (arch == POWER_10) return CPU_POWER10;
|
||||
#endif
|
||||
#ifdef POWER_11
|
||||
else if (arch >= POWER_11) return CPU_POWER10;
|
||||
#endif
|
||||
return CPU_UNKNOWN;
|
||||
}
|
||||
@@ -173,6 +176,13 @@ static struct {
|
||||
.cpu_type = CPU_POWER10,
|
||||
},
|
||||
|
||||
{ /* Power11 */
|
||||
.pvr_mask = 0xffff0000,
|
||||
.pvr_value = 0x00820000,
|
||||
.cpu_name = "POWER11 (raw)",
|
||||
.cpu_type = CPU_POWER10,
|
||||
},
|
||||
|
||||
{ /* End of table, pvr_mask and pvr_value must be zero */
|
||||
.pvr_mask = 0x0,
|
||||
.pvr_value = 0x0,
|
||||
|
||||
@@ -97,6 +97,8 @@ struct riscv_hwprobe {
|
||||
|
||||
#define RISCV_HWPROBE_KEY_IMA_EXT_0 4
|
||||
#define RISCV_HWPROBE_IMA_V (1 << 2)
|
||||
#define RISCV_HWPROBE_EXT_ZFH (1 << 27)
|
||||
#define RISCV_HWPROBE_EXT_ZVFH (1 << 30)
|
||||
|
||||
#ifndef NR_riscv_hwprobe
|
||||
#ifndef NR_arch_specific_syscall
|
||||
@@ -147,6 +149,7 @@ char* gotoblas_corename(void) {
|
||||
}
|
||||
|
||||
static gotoblas_t* get_coretype(void) {
|
||||
uint64_t vector_mask;
|
||||
unsigned vlenb = 0;
|
||||
|
||||
#if !defined(OS_LINUX)
|
||||
@@ -165,14 +168,25 @@ static gotoblas_t* get_coretype(void) {
|
||||
};
|
||||
int ret = syscall(NR_riscv_hwprobe, pairs, 1, 0, NULL, 0);
|
||||
if (ret == 0) {
|
||||
if (!(pairs[0].value & RISCV_HWPROBE_IMA_V))
|
||||
#if defined(BUILD_HFLOAT16)
|
||||
vector_mask = (RISCV_HWPROBE_IMA_V | RISCV_HWPROBE_EXT_ZFH | RISCV_HWPROBE_EXT_ZVFH);
|
||||
#else
|
||||
vector_mask = RISCV_HWPROBE_IMA_V;
|
||||
#endif
|
||||
if ((pairs[0].value & vector_mask) != vector_mask)
|
||||
return NULL;
|
||||
} else {
|
||||
#if defined(BUILD_HFLOAT16)
|
||||
snprintf(coremsg, sizeof(coremsg), "Cpu support for Zfh+Zvfh extensions required due to BUILD_HFLOAT16=1\n");
|
||||
openblas_warning(1, coremsg);
|
||||
return NULL;
|
||||
#else
|
||||
if (!(getauxval(AT_HWCAP) & DETECT_RISCV64_HWCAP_ISA_V))
|
||||
return NULL;
|
||||
|
||||
if (!detect_riscv64_rvv100())
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -391,7 +391,15 @@ static void numa_mapping(void) {
|
||||
core = 0;
|
||||
for (cpu = 0; cpu < common -> num_procs; cpu ++) {
|
||||
bitmask_idx = CPUELT(cpu);
|
||||
/*
|
||||
* When common->avail[i] = 0x5555555555555555UL (indicating that adjacent logical cores share a physical core),
|
||||
* using it as a mask may overlap with the local_cpu_map function's role, leading to only half of the real physical cores being detected.
|
||||
*/
|
||||
#ifdef ARCH_LOONGARCH64
|
||||
if (common -> node_info[node][bitmask_idx]) {
|
||||
#else
|
||||
if (common -> node_info[node][bitmask_idx] & common -> avail[bitmask_idx] & CPUMASK(cpu)) {
|
||||
#endif
|
||||
common -> cpu_info[count] = WRITE_CORE(core) | WRITE_NODE(node) | WRITE_CPU(cpu);
|
||||
count ++;
|
||||
core ++;
|
||||
@@ -930,8 +938,12 @@ void gotoblas_affinity_init(void) {
|
||||
|
||||
if (common -> num_nodes > 1) numa_mapping();
|
||||
|
||||
#ifdef ARCH_LOONGARCH64
|
||||
common -> final_num_procs = common -> num_procs;
|
||||
#else
|
||||
common -> final_num_procs = 0;
|
||||
for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1; //Make the max cpu number.
|
||||
#endif
|
||||
|
||||
for (cpu = 0; cpu < common -> final_num_procs; cpu ++) common -> cpu_use[cpu] = 0;
|
||||
|
||||
|
||||
+11
-2
@@ -2922,6 +2922,7 @@ void *blas_memory_alloc(int procpos){
|
||||
blas_unlock(&memory[position].lock);
|
||||
#endif
|
||||
if (!memory[position].addr) {
|
||||
int failcount = 0;
|
||||
do {
|
||||
#ifdef DEBUG
|
||||
printf("Allocation Start : %lx\n", base_address);
|
||||
@@ -2973,8 +2974,16 @@ void *blas_memory_alloc(int procpos){
|
||||
#ifdef DEBUG
|
||||
printf(" Success -> %08lx\n", map_address);
|
||||
#endif
|
||||
if (((BLASLONG) map_address) == -1) base_address = 0UL;
|
||||
|
||||
if (((BLASLONG) map_address) == -1) {
|
||||
base_address = 0UL;
|
||||
failcount++;
|
||||
if (failcount >10) {
|
||||
fprintf(stderr, "OpenBLAS error: Memory allocation still failed after 10 retries, giving up.\n");
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
failcount = 0;
|
||||
}
|
||||
if (base_address) base_address += BUFFER_SIZE + FIXED_PAGESIZE;
|
||||
|
||||
} while ((BLASLONG)map_address == -1);
|
||||
|
||||
@@ -67,6 +67,16 @@ BLASLONG sbgemm_p = DEFAULT_GEMM_P;
|
||||
#else
|
||||
BLASLONG sbgemm_p = SBGEMM_P;
|
||||
#endif
|
||||
#if SHGEMM_P == shgemm_p
|
||||
BLASLONG shgemm_p = DEFAULT_GEMM_P;
|
||||
#else
|
||||
BLASLONG shgemm_p = SHGEMM_P;
|
||||
#endif
|
||||
#if BGEMM_P == bgemm_p
|
||||
BLASLONG bgemm_p = DEFAULT_GEMM_P;
|
||||
#else
|
||||
BLASLONG bgemm_p = BGEMM_P;
|
||||
#endif
|
||||
#if SGEMM_P == sgemm_p
|
||||
BLASLONG sgemm_p = DEFAULT_GEMM_P;
|
||||
#else
|
||||
@@ -93,6 +103,16 @@ BLASLONG sbgemm_q = DEFAULT_GEMM_Q;
|
||||
#else
|
||||
BLASLONG sbgemm_q = SBGEMM_Q;
|
||||
#endif
|
||||
#if SHGEMM_Q == shgemm_q
|
||||
BLASLONG shgemm_q = DEFAULT_GEMM_Q;
|
||||
#else
|
||||
BLASLONG shgemm_q = SHGEMM_Q;
|
||||
#endif
|
||||
#if BGEMM_Q == bgemm_q
|
||||
BLASLONG bgemm_q = DEFAULT_GEMM_Q;
|
||||
#else
|
||||
BLASLONG bgemm_q = BGEMM_Q;
|
||||
#endif
|
||||
#if SGEMM_Q == sgemm_q
|
||||
BLASLONG sgemm_q = DEFAULT_GEMM_Q;
|
||||
#else
|
||||
@@ -119,6 +139,16 @@ BLASLONG sbgemm_r = DEFAULT_GEMM_R;
|
||||
#else
|
||||
BLASLONG sbgemm_r = SBGEMM_R;
|
||||
#endif
|
||||
#if SHGEMM_R == shgemm_r
|
||||
BLASLONG shgemm_r = DEFAULT_GEMM_R;
|
||||
#else
|
||||
BLASLONG shgemm_r = SHGEMM_R;
|
||||
#endif
|
||||
#if BGEMM_R == bgemm_r
|
||||
BLASLONG bgemm_r = DEFAULT_GEMM_R;
|
||||
#else
|
||||
BLASLONG bgemm_r = BGEMM_R;
|
||||
#endif
|
||||
#if SGEMM_R == sgemm_r
|
||||
BLASLONG sgemm_r = DEFAULT_GEMM_R;
|
||||
#else
|
||||
@@ -526,6 +556,10 @@ void blas_set_parameter(void){
|
||||
|
||||
#ifdef BUILD_BFLOAT16
|
||||
sbgemm_r = (((BUFFER_SIZE - ((SBGEMM_P * SBGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (SBGEMM_Q * 4)) - 15) & ~15;
|
||||
bgemm_r = (((BUFFER_SIZE - ((BGEMM_P * BGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (BGEMM_Q * 4)) - 15) & ~15;
|
||||
#endif
|
||||
#ifdef BUILD_HFLOAT16
|
||||
shgemm_r = (((BUFFER_SIZE - ((SHGEMM_P * SHGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (SHGEMM_Q * 4)) - 15) & ~15;
|
||||
#endif
|
||||
sgemm_r = (((BUFFER_SIZE - ((SGEMM_P * SGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (SGEMM_Q * 4)) - 15) & ~15;
|
||||
dgemm_r = (((BUFFER_SIZE - ((DGEMM_P * DGEMM_Q * 8 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (DGEMM_Q * 8)) - 15) & ~15;
|
||||
@@ -619,6 +653,7 @@ void blas_set_parameter(void){
|
||||
size = BITMASK(cpuid3, 16, 0xff);
|
||||
|
||||
sbgemm_p = 192 * (size + 1);
|
||||
shgemm_p = 192 * (size + 1);
|
||||
sgemm_p = 192 * (size + 1);
|
||||
dgemm_p = 96 * (size + 1);
|
||||
cgemm_p = 96 * (size + 1);
|
||||
@@ -634,6 +669,10 @@ void blas_set_parameter(void){
|
||||
|
||||
#ifdef BUILD_BFLOAT16
|
||||
sbgemm_r = (((BUFFER_SIZE - ((SBGEMM_P * SBGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (SBGEMM_Q * 4)) - 15) & ~15;
|
||||
bgemm_r = (((BUFFER_SIZE - ((BGEMM_P * BGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (BGEMM_Q * 4)) - 15) & ~15;
|
||||
#endif
|
||||
#ifdef BUILD_HFLOAT16
|
||||
shgemm_r = (((BUFFER_SIZE - ((SHGEMM_P * SHGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (SHGEMM_Q * 4)) - 15) & ~15;
|
||||
#endif
|
||||
sgemm_r = (((BUFFER_SIZE - ((SGEMM_P * SGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (SGEMM_Q * 4)) - 15) & ~15;
|
||||
dgemm_r = (((BUFFER_SIZE - ((DGEMM_P * DGEMM_Q * 8 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (DGEMM_Q * 8)) - 15) & ~15;
|
||||
|
||||
+11
-8
@@ -39,6 +39,9 @@ endif
|
||||
ifndef BUILD_BFLOAT16
|
||||
BUILD_BFLOAT16 = 0
|
||||
endif
|
||||
ifndef BUILD_HFLOAT16
|
||||
BUILD_HFLOAT16 = 0
|
||||
endif
|
||||
ifndef BUILD_SINGLE
|
||||
BUILD_SINGLE = 0
|
||||
endif
|
||||
@@ -130,10 +133,10 @@ dll : ../$(LIBDLLNAME)
|
||||
-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(FEXTRALIB) $(EXTRALIB)
|
||||
|
||||
$(LIBPREFIX).def : $(GENSYM)
|
||||
./$(GENSYM) win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
./$(GENSYM) win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_HFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
|
||||
libgoto_hpl.def : $(GENSYM)
|
||||
./$(GENSYM) win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
./$(GENSYM) win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_HFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
|
||||
ifeq ($(OSNAME), Darwin)
|
||||
ifeq ($(FIXED_LIBNAME),1)
|
||||
@@ -197,7 +200,7 @@ ifeq ($(F_COMPILER), INTEL)
|
||||
-Wl,--whole-archive $< -Wl,--no-whole-archive \
|
||||
-Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
|
||||
else ifeq ($(F_COMPILER), FLANG)
|
||||
else ifeq ($(F_COMPILER), $(filter $(F_COMPILER),FLANG FLANGNEW))
|
||||
$(FC) $(FFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
|
||||
-Wl,--whole-archive $< -Wl,--no-whole-archive \
|
||||
-Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
|
||||
@@ -298,23 +301,23 @@ static : ../$(LIBNAME)
|
||||
rm -f goto.$(SUFFIX)
|
||||
|
||||
osx.def : $(GENSYM) ../Makefile.system ../getarch.c
|
||||
./$(GENSYM) osx $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
./$(GENSYM) osx $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_HFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
|
||||
aix.def : $(GENSYM) ../Makefile.system ../getarch.c
|
||||
./$(GENSYM) aix $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
./$(GENSYM) aix $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_HFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
|
||||
objcopy.def : $(GENSYM) ../Makefile.system ../getarch.c
|
||||
./$(GENSYM) objcopy $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
./$(GENSYM) objcopy $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_HFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
|
||||
objconv.def : $(GENSYM) ../Makefile.system ../getarch.c
|
||||
./$(GENSYM) objconv $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
./$(GENSYM) objconv $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_HFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
|
||||
|
||||
test : linktest.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) -lm && echo OK.
|
||||
rm -f linktest
|
||||
|
||||
linktest.c : $(GENSYM) ../Makefile.system ../getarch.c
|
||||
./$(GENSYM) linktest $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > linktest.c
|
||||
./$(GENSYM) linktest $(ARCH) "$(BU)" $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_HFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > linktest.c
|
||||
|
||||
clean ::
|
||||
@rm -f *.def *.dylib __.SYMDEF* *.renamed
|
||||
|
||||
+45
-8
@@ -1,5 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
# Changelog
|
||||
# 2017/09/03 staticfloat
|
||||
# Added zsymv and csymv into @lapackobjs2 so they are properly renamed
|
||||
@@ -51,7 +79,8 @@ blasobjsz="
|
||||
zgeadd dzsum zgemmt zgemmtr"
|
||||
|
||||
blasobjs="lsame xerbla"
|
||||
bfblasobjs="sbgemm sbgemmt sbgemmtr sbgemv sbdot sbstobf16 sbdtobf16 sbf16tos dbf16tod"
|
||||
bfblasobjs="bgemm bgemv sbgemm sbgemmt sbgemmtr sbgemv sbdot sbstobf16 sbdtobf16 sbf16tos dbf16tod"
|
||||
hfblasobjs="shgemm"
|
||||
cblasobjsc="
|
||||
cblas_caxpy cblas_ccopy cblas_cdotc cblas_cdotu cblas_cgbmv cblas_cgemm cblas_cgemv
|
||||
cblas_cgerc cblas_cgeru cblas_chbmv cblas_chemm cblas_chemv cblas_cher2 cblas_cher2k
|
||||
@@ -100,6 +129,7 @@ cblasobjsz="
|
||||
cblasobjs="cblas_xerbla"
|
||||
|
||||
bfcblasobjs="cblas_sbgemm cblas_sbgemv cblas_sbdot cblas_sbstobf16 cblas_sbdtobf16 cblas_sbf16tos cblas_dbf16tod cblas_sbgemm_batch"
|
||||
hfcblasobjs="cblas_shgemm"
|
||||
|
||||
exblasobjs="
|
||||
qamax qamin qasum qaxpy qcabs1 qcopy qdot qgbmv qgemm
|
||||
@@ -3814,6 +3844,8 @@ shift
|
||||
p16=$9
|
||||
shift
|
||||
p17=$9
|
||||
shift
|
||||
p18=$9
|
||||
|
||||
if [ $p13 -eq 1 ]; then
|
||||
blasobjs="$blasobjs $bfblasobjs"
|
||||
@@ -3821,6 +3853,11 @@ if [ $p13 -eq 1 ]; then
|
||||
fi
|
||||
|
||||
if [ $p14 -eq 1 ]; then
|
||||
blasobjs="$blasobjs $hfblasobjs"
|
||||
cblasobjs="$cblasobjs $hfcblasobjs"
|
||||
fi
|
||||
|
||||
if [ $p15 -eq 1 ]; then
|
||||
blasobjs="$blasobjs $blasobjss"
|
||||
cblasobjs="$cblasobjs $cblasobjss"
|
||||
lapackobjs="$lapackobjs $lapackobjss"
|
||||
@@ -3833,11 +3870,11 @@ if [ $p14 -eq 1 ]; then
|
||||
lapackeobjs="$lapackeobjs $lapackeobjss"
|
||||
fi
|
||||
|
||||
if [ $p15 -eq 1 ]; then
|
||||
if [ $p16 -eq 1 ]; then
|
||||
blasobjs="$blasobjs $blasobjsd"
|
||||
cblasobjs="$cblasobjs $cblasobjsd"
|
||||
lapackobjs="$lapackobjs $lapackobjsd"
|
||||
if [ $p14 -eq 0 ]; then
|
||||
if [ $p15 -eq 0 ]; then
|
||||
lapackobjs2="$lapackobjs2 $lapackobjs2ds"
|
||||
fi
|
||||
lapackobjs2="$lapackobjs2 $lapackobjs2d $lapackobjs2dz"
|
||||
@@ -3847,14 +3884,14 @@ if [ $p15 -eq 1 ]; then
|
||||
lapackeobjs="$lapackeobjs $lapackeobjsd"
|
||||
fi
|
||||
|
||||
if [ $p16 -eq 1 ]; then
|
||||
if [ $p17 -eq 1 ]; then
|
||||
blasobjs="$blasobjs $blasobjsc"
|
||||
cblasobjs="$cblasobjs $cblasobjsc"
|
||||
gemm3mobjs="$gemm3mobjs $gemm3mobjsc"
|
||||
cblasgemm3mobjs="$cblasgemm3mobjs $cblasgemm3mobjsc"
|
||||
lapackobjs="$lapackobjs $lapackobjsc"
|
||||
lapackobjs2="$lapackobjs2 $lapackobjs2c $lapackobjs2zc"
|
||||
if [ $p14 -eq 0 ]; then
|
||||
if [ $p15 -eq 0 ]; then
|
||||
lapackobjs2="$lapackobjs2 $lapackobjs2sc"
|
||||
fi
|
||||
lapack_deprecated_objs="$lapack_deprecated_objs $lapack_deprecated_objsc"
|
||||
@@ -3863,17 +3900,17 @@ if [ $p16 -eq 1 ]; then
|
||||
lapackeobjs="$lapackeobjs $lapackeobjsc"
|
||||
fi
|
||||
|
||||
if [ $p17 -eq 1 ]; then
|
||||
if [ $p18 -eq 1 ]; then
|
||||
blasobjs="$blasobjs $blasobjsz"
|
||||
cblasobjs="$cblasobjs $cblasobjsz"
|
||||
gemm3mobjs="$gemm3mobjs $gemm3mobjsz"
|
||||
cblasgemm3mobjs="$cblasgemm3mobjs $cblasgemm3mobjsz"
|
||||
lapackobjs="$lapackobjs $lapackobjsz"
|
||||
lapackobjs2="$lapackobjs2 $lapackobjs2z"
|
||||
if [ $p16 -eq 0 ]; then
|
||||
if [ $p17 -eq 0 ]; then
|
||||
lapackobjs2="$lapackobjs2 $lapackobjs2zc"
|
||||
fi
|
||||
if [ $p15 -eq 0 ]; then
|
||||
if [ $p16 -eq 0 ]; then
|
||||
lapackobjs2="$lapackobjs2 $lapackobjs2dz"
|
||||
fi
|
||||
lapack_deprecated_objs="$lapack_deprecated_objs $lapack_deprecated_objsz"
|
||||
|
||||
+195
-37
@@ -1,5 +1,33 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
# Changelog
|
||||
# 2017/09/03 staticfloat
|
||||
# Added zsymv and csymv into @lapackobjs2 so they are properly renamed
|
||||
@@ -21,7 +49,7 @@
|
||||
chbmv,chemm,chemv,cher2,cher2k,cher,cherk,scabs1,scamax,
|
||||
chpmv,chpr2,chpr,crotg,cscal,csrot,csscal,cswap,scamin,scasum,scnrm2,
|
||||
csymm,csyr2k,csyrk,ctbmv,ctbsv,ctpmv,ctpsv,ctrmm,ctrmv,ctrsm,
|
||||
ctrsv,icamax,icamin,cimatcopy,comatcopy,cgeadd,scsum,cgemmt);
|
||||
ctrsv,icamax,icamin,cimatcopy,comatcopy,cgeadd,scsum,cgemmt,cgemmtr);
|
||||
|
||||
@blasobjsd = (
|
||||
damax,damin,dasum,daxpy,daxpby,dcabs1,dcopy,ddot,dgbmv,dgemm,
|
||||
@@ -29,7 +57,7 @@
|
||||
dscal,dsdot,dspmv,dspr2,dimatcopy,domatcopy,
|
||||
dspr,dswap,dsymm,dsymv,dsyr2,dsyr2k,dsyr,dsyrk,dtbmv,dtbsv,
|
||||
dtpmv,dtpsv,dtrmm,dtrmv,dtrsm,dtrsv,
|
||||
idamax,idamin,idmax,idmin,dgeadd,dsum,dgemmt);
|
||||
idamax,idamin,idmax,idmin,dgeadd,dsum,dgemmt,dgemmtr);
|
||||
|
||||
@blasobjss = (
|
||||
isamax,isamin,ismax,ismin,
|
||||
@@ -38,7 +66,7 @@
|
||||
smax,smin,snrm2,simatcopy,somatcopy,
|
||||
srot,srotg,srotm,srotmg,ssbmv,sscal,sspmv,sspr2,sspr,sswap,
|
||||
ssymm,ssymv,ssyr2,ssyr2k,ssyr,ssyrk,stbmv,stbsv,stpmv,stpsv,
|
||||
strmm,strmv,strsm,strsv, sgeadd,ssum,sgemmt);
|
||||
strmm,strmv,strsm,strsv, sgeadd,ssum,sgemmt,sgemmtr);
|
||||
|
||||
@blasobjsz = (
|
||||
izamax,izamin,,
|
||||
@@ -48,28 +76,30 @@
|
||||
zhpr,zrotg,zscal,zswap,zsymm,zsyr2k,zsyrk,ztbmv,
|
||||
ztbsv,ztpmv,ztpsv,ztrmm,ztrmv,ztrsm,ztrsv,
|
||||
zomatcopy, zimatcopy,dzamax,dzamin,dzasum,dznrm2,
|
||||
zgeadd, dzsum, zgemmt);
|
||||
zgeadd, dzsum, zgemmt,zgemmtr);
|
||||
|
||||
@blasobjs = (lsame, xerbla);
|
||||
@bfblasobjs = (sbgemm, sbgemv, sbdot, sbstobf16, sbdtobf16, sbf16tos, dbf16tod);
|
||||
@bfblasobjs = (bgemm, bgemv, sbgemm, sbgemmt, sbgemmtr, sbgemv, sbdot, sbstobf16, sbdtobf16, sbf16tos, dbf16tod);
|
||||
@hfblasobjs = (shgemm);
|
||||
@cblasobjsc = (
|
||||
cblas_caxpy, cblas_ccopy, cblas_cdotc, cblas_cdotu, cblas_cgbmv, cblas_cgemm, cblas_cgemv,
|
||||
cblas_cgerc, cblas_cgeru, cblas_chbmv, cblas_chemm, cblas_chemv, cblas_cher2, cblas_cher2k,
|
||||
cblas_cher, cblas_cherk, cblas_chpmv, cblas_chpr2, cblas_chpr, cblas_cscal, cblas_caxpby,
|
||||
cblas_csscal, cblas_cswap, cblas_csymm, cblas_csyr2k, cblas_csyrk, cblas_ctbmv, cblas_cgeadd,
|
||||
cblas_ctbsv, cblas_ctpmv, cblas_ctpsv, cblas_ctrmm, cblas_ctrmv, cblas_ctrsm, cblas_ctrsv,
|
||||
cblas_scnrm2, cblas_scasum,
|
||||
cblas_icamax, cblas_icamin, cblas_icmin, cblas_icmax, cblas_scsum,cblas_cimatcopy,cblas_comatcopy
|
||||
cblas_cgemmt);
|
||||
cblas_scnrm2, cblas_scasum, cblas_cgemmt, cblas_cgemmtr,
|
||||
cblas_icamax, cblas_icamin, cblas_icmin, cblas_icmax, cblas_scsum,cblas_cimatcopy,cblas_comatcopy,
|
||||
cblas_caxpyc, cblas_crotg, cblas_csrot, cblas_scamax, cblas_scamin, cblas_cgemm_batch);
|
||||
|
||||
@cblasobjsd = (
|
||||
cblas_dasum, cblas_daxpy, cblas_dcopy, cblas_ddot,
|
||||
cblas_dgbmv, cblas_dgemm, cblas_dgemv, cblas_dger, cblas_dnrm2,
|
||||
cblas_drot, cblas_drotg, cblas_drotm, cblas_drotmg, cblas_dsbmv, cblas_dscal, cblas_dsdot,
|
||||
cblas_dspmv, cblas_dspr2, cblas_dspr, cblas_dswap, cblas_dsymm, cblas_dsymv, cblas_dsyr2,
|
||||
cblas_dsyr2k, cblas_dsyr, cblas_dsyrk, cblas_dtbmv, cblas_dtbsv, cblas_dtpmv, cblas_dtpsv,
|
||||
cblas_dtrmm, cblas_dtrmv, cblas_dtrsm, cblas_dtrsv, cblas_daxpby, cblas_dgeadd,
|
||||
cblas_idamax, cblas_idamin, cblas_idmin, cblas_idmax, cblas_dsum,cblas_dimatcopy,cblas_domatcopy
|
||||
cblas_dgemmt);
|
||||
cblas_dtrmm, cblas_dtrmv, cblas_dtrsm, cblas_dtrsv, cblas_daxpby, cblas_dgeadd, cblas_dgemmt, cblas_dgemmtr,
|
||||
cblas_idamax, cblas_idamin, cblas_idmin, cblas_idmax, cblas_dsum,cblas_dimatcopy,cblas_domatcopy,
|
||||
cblas_damax, cblas_damin, cblas_dgemm_batch);
|
||||
|
||||
@cblasobjss = (
|
||||
cblas_sasum, cblas_saxpy, cblas_saxpby,
|
||||
@@ -78,9 +108,10 @@
|
||||
cblas_srotm, cblas_srotmg, cblas_ssbmv, cblas_sscal, cblas_sspmv, cblas_sspr2, cblas_sspr,
|
||||
cblas_sswap, cblas_ssymm, cblas_ssymv, cblas_ssyr2, cblas_ssyr2k, cblas_ssyr, cblas_ssyrk,
|
||||
cblas_stbmv, cblas_stbsv, cblas_stpmv, cblas_stpsv, cblas_strmm, cblas_strmv, cblas_strsm,
|
||||
cblas_strsv, cblas_sgeadd,
|
||||
cblas_isamax, cblas_isamin, cblas_ismin, cblas_ismax, cblas_ssum,cblas_simatcopy,cblas_somatcopy
|
||||
cblas_sgemmt);
|
||||
cblas_strsv, cblas_sgeadd, cblas_sgemmt, cblas_sgemmtr,
|
||||
cblas_isamax, cblas_isamin, cblas_ismin, cblas_ismax, cblas_ssum,cblas_simatcopy,cblas_somatcopy,
|
||||
cblas_samax, cblas_samin, cblas_sgemm_batch);
|
||||
|
||||
@cblasobjsz = (
|
||||
cblas_dzasum, cblas_dznrm2, cblas_zaxpy, cblas_zcopy, cblas_zdotc, cblas_zdotu, cblas_zdscal,
|
||||
cblas_zgbmv, cblas_zgemm, cblas_zgemv, cblas_zgerc, cblas_zgeru, cblas_zhbmv, cblas_zhemm,
|
||||
@@ -88,14 +119,14 @@
|
||||
cblas_zhpr, cblas_zscal, cblas_zswap, cblas_zsymm, cblas_zsyr2k, cblas_zsyrk,
|
||||
cblas_ztbmv, cblas_ztbsv, cblas_ztpmv, cblas_ztpsv, cblas_ztrmm, cblas_ztrmv, cblas_ztrsm,
|
||||
cblas_ztrsv, cblas_cdotc_sub, cblas_cdotu_sub, cblas_zdotc_sub, cblas_zdotu_sub,
|
||||
cblas_zaxpby, cblas_zgeadd,
|
||||
cblas_izamax, cblas_izamin, cblas_izmin, cblas_izmax, cblas_dzsum,cblas_zimatcopy,cblas_zomatcopy
|
||||
cblas_zgemmt);
|
||||
cblas_zaxpby, cblas_zgeadd, cblas_zgemmt, cblas_zgemmtr,
|
||||
cblas_izamax, cblas_izamin, cblas_izmin, cblas_izmax, cblas_dzsum,cblas_zimatcopy,cblas_zomatcopy,
|
||||
cblas_zaxpyc, cblas_zdrot, cblas_zrotg, cblas_dzamax, cblas_dzamin, cblas_zgemm_batch);
|
||||
|
||||
@cblasobjs = ( cblas_xerbla );
|
||||
|
||||
@bfcblasobjs = (cblas_sbgemm, cblas_sbgemv, cblas_sbdot, cblas_sbstobf16, cblas_sbdtobf16, cblas_sbf16tos, cblas_dbf16tod);
|
||||
|
||||
@bfcblasobjs = (cblas_sbgemm, cblas_sbgemmt, cblas_sbgemmtr, cblas_sbgemv, cblas_sbdot, cblas_sbstobf16, cblas_sbdtobf16, cblas_sbf16tos, cblas_dbf16tod, cblas_sbgemm_batch);
|
||||
@hfcblasobjs = (cblas_shgemm);
|
||||
@exblasobjs = (
|
||||
qamax,qamin,qasum,qaxpy,qcabs1,qcopy,qdot,qgbmv,qgemm,
|
||||
qgemv,qger,qmax,qmin,
|
||||
@@ -709,6 +740,7 @@ zpotri,
|
||||
# functions added for lapack-3.7.0
|
||||
@lapackobjs2s = (@lapackobjs2s,
|
||||
slarfy,
|
||||
ssyconvf,
|
||||
strevc3,
|
||||
sgelqt,
|
||||
sgelqt3,
|
||||
@@ -832,12 +864,82 @@ zpotri,
|
||||
zungtsqr_row
|
||||
);
|
||||
|
||||
#functions added for lapack-3.11
|
||||
@lapackobjs2c = (@lapackobjs2c,
|
||||
cgedmd,
|
||||
cgedmdq
|
||||
);
|
||||
@lapackobjs2d = (@lapackobjs2d,
|
||||
dgedmd,
|
||||
dgedmdq
|
||||
);
|
||||
@lapackobjs2s = (@lapackobjs2s,
|
||||
sgedmd,
|
||||
sgedmdq
|
||||
);
|
||||
@lapackobjs2z = (@lapackobjs2z,
|
||||
zgedmd,
|
||||
zgedmdq
|
||||
);
|
||||
|
||||
#functions added post 3.11
|
||||
|
||||
@lapackobjs2c = (@lapackobjs2c,
|
||||
cgelst,
|
||||
cgeqp3rk,
|
||||
claqp2rk,
|
||||
claqp3rk,
|
||||
clatrs3,
|
||||
crscl,
|
||||
ctrsyl3
|
||||
);
|
||||
# claqz0
|
||||
# claqz1
|
||||
# claqz2
|
||||
# claqz3
|
||||
# clatrs3
|
||||
|
||||
@lapackobjs2d = (@lapackobjs2d,
|
||||
dgelst,
|
||||
dgeqp3rk,
|
||||
dlaqp2rk,
|
||||
dlaqp3rk,
|
||||
dlarmm,
|
||||
dlatrs3,
|
||||
dtrsyl3
|
||||
);
|
||||
|
||||
@lapackobjs2s = (@lapackobjs2s,
|
||||
sgelst,
|
||||
sgeqp3rk,
|
||||
slaqp2rk,
|
||||
slaqp3rk,
|
||||
slarmm,
|
||||
slatrs3,
|
||||
strsyl3
|
||||
);
|
||||
|
||||
@lapackobjs2z = (@lapackobjs2z,
|
||||
zgelst,
|
||||
zgeqp3rk,
|
||||
zlaqp2rk,
|
||||
zlaqp3rk,
|
||||
zlatrs3,
|
||||
zrscl,
|
||||
ztrsyl3
|
||||
);
|
||||
# zlaqz0
|
||||
# zlaqz1
|
||||
# zlaqz2
|
||||
# zlaqz3
|
||||
|
||||
@lapack_extendedprecision_objs = (
|
||||
zposvxx, clagge, clatms, chesvxx, cposvxx, cgesvxx, ssyrfssx, csyrfsx,
|
||||
dlagsy, dsysvxx, sporfsx, slatms, zlatms, zherfsx, csysvxx,
|
||||
);
|
||||
|
||||
@lapack_deprecated_objsc = (
|
||||
cgelqs, cgeqrs,
|
||||
cgegs, cggsvd,
|
||||
cgegv, cggsvp,
|
||||
cgelsx, clahrd,
|
||||
@@ -845,13 +947,16 @@ zpotri,
|
||||
ctzrqf,
|
||||
);
|
||||
@lapack_deprecated_objsd = (
|
||||
dgelqs, dgeqrs,
|
||||
dgegs, dgeqpf,
|
||||
dgegv, dggsvd,
|
||||
dgelsx, dggsvp,
|
||||
dlahrd,
|
||||
dlatzm, dtzrqf);
|
||||
|
||||
@lapack_deprecated_objss = (
|
||||
@lapack_deprecated_objss = (
|
||||
sgelqs,
|
||||
sgeqrs,
|
||||
sgelsx,
|
||||
sgegs,
|
||||
sgegv,
|
||||
@@ -864,6 +969,8 @@ zpotri,
|
||||
);
|
||||
|
||||
@lapack_deprecated_objsz = (
|
||||
zgelqs,
|
||||
zgeqrs,
|
||||
zgegs,
|
||||
zgegv,
|
||||
zgelsx,
|
||||
@@ -997,6 +1104,10 @@ zpotri,
|
||||
LAPACKE_cgebrd_work,
|
||||
LAPACKE_cgecon,
|
||||
LAPACKE_cgecon_work,
|
||||
LAPACKE_cgedmd,
|
||||
LAPACKE_cgedmd_work,
|
||||
LAPACKE_cgedmdq,
|
||||
LAPACKE_cgedmdq_work,
|
||||
LAPACKE_cgeequ,
|
||||
LAPACKE_cgeequ_work,
|
||||
LAPACKE_cgeequb,
|
||||
@@ -1584,8 +1695,15 @@ zpotri,
|
||||
LAPACKE_cgetsqrhrt,
|
||||
LAPACKE_cgetsqrhrt_work,
|
||||
LAPACKE_cungtsqr_row,
|
||||
LAPACKE_cungtsqr_row_work
|
||||
|
||||
LAPACKE_cungtsqr_row_work,
|
||||
LAPACKE_clangb,
|
||||
LAPACKE_clangb_work,
|
||||
LAPACKE_ctrsyl3,
|
||||
LAPACKE_ctrsyl3_work,
|
||||
LAPACKE_ctz_nancheck,
|
||||
LAPACKE_ctz_trans,
|
||||
LAPACKE_cunhr_col,
|
||||
LAPACKE_cunhr_col_work
|
||||
);
|
||||
@lapackeobjsd = (
|
||||
LAPACKE_dgb_nancheck,
|
||||
@@ -1656,6 +1774,10 @@ zpotri,
|
||||
LAPACKE_dgebrd_work,
|
||||
LAPACKE_dgecon,
|
||||
LAPACKE_dgecon_work,
|
||||
LAPACKE_dgedmd,
|
||||
LAPACKE_dgedmd_work,
|
||||
LAPACKE_dgedmdq,
|
||||
LAPACKE_dgedmdq_work,
|
||||
LAPACKE_dgeequ,
|
||||
LAPACKE_dgeequ_work,
|
||||
LAPACKE_dgeequb,
|
||||
@@ -2197,7 +2319,15 @@ zpotri,
|
||||
LAPACKE_dgetsqrhrt,
|
||||
LAPACKE_dgetsqrhrt_work,
|
||||
LAPACKE_dorgtsqr_row,
|
||||
LAPACKE_dorgtsqr_row_work
|
||||
LAPACKE_dorgtsqr_row_work,
|
||||
LAPACKE_dlangb,
|
||||
LAPACKE_dlangb_work,
|
||||
LAPACKE_dorhr_col,
|
||||
LAPACKE_dorhr_col_work,
|
||||
LAPACKE_dtrsyl3,
|
||||
LAPACKE_dtrsyl3_work,
|
||||
LAPACKE_dtz_nancheck,
|
||||
LAPACKE_dtz_trans,
|
||||
|
||||
);
|
||||
@lapackeobjss = (
|
||||
@@ -2269,6 +2399,10 @@ zpotri,
|
||||
LAPACKE_sgebrd_work,
|
||||
LAPACKE_sgecon,
|
||||
LAPACKE_sgecon_work,
|
||||
LAPACKE_sgedmd,
|
||||
LAPACKE_sgedmd_work,
|
||||
LAPACKE_sgedmdq,
|
||||
LAPACKE_sgedmdq_work,
|
||||
LAPACKE_sgeequ,
|
||||
LAPACKE_sgeequ_work,
|
||||
LAPACKE_sgeequb,
|
||||
@@ -2802,7 +2936,15 @@ zpotri,
|
||||
LAPACKE_sgetsqrhrt,
|
||||
LAPACKE_sgetsqrhrt_work,
|
||||
LAPACKE_sorgtsqr_row,
|
||||
LAPACKE_sorgtsqr_row_work
|
||||
LAPACKE_sorgtsqr_row_work,
|
||||
LAPACKE_slangb,
|
||||
LAPACKE_slangb_work,
|
||||
LAPACKE_sorhr_col,
|
||||
LAPACKE_sorhr_col_work,
|
||||
LAPACKE_strsyl3,
|
||||
LAPACKE_strsyl3_work,
|
||||
LAPACKE_stz_nancheck,
|
||||
LAPACKE_stz_trans,
|
||||
|
||||
);
|
||||
@lapackeobjsz = (
|
||||
@@ -2878,6 +3020,10 @@ zpotri,
|
||||
LAPACKE_zgebrd_work,
|
||||
LAPACKE_zgecon,
|
||||
LAPACKE_zgecon_work,
|
||||
LAPACKE_zgedmd,
|
||||
LAPACKE_zgedmd_work,
|
||||
LAPACKE_zgedmdq,
|
||||
LAPACKE_zgedmdq_work,
|
||||
LAPACKE_zgeequ,
|
||||
LAPACKE_zgeequ_work,
|
||||
LAPACKE_zgeequb,
|
||||
@@ -3345,7 +3491,15 @@ zpotri,
|
||||
LAPACKE_zgetsqrhrt,
|
||||
LAPACKE_zgetsqrhrt_work,
|
||||
LAPACKE_zungtsqr_row,
|
||||
LAPACKE_zungtsqr_row_work
|
||||
LAPACKE_zungtsqr_row_work,
|
||||
LAPACKE_zlangb,
|
||||
LAPACKE_zlangb_work,
|
||||
LAPACKE_zunhr_col,
|
||||
LAPACKE_zunhr_col_work,
|
||||
LAPACKE_ztrsyl3,
|
||||
LAPACKE_ztrsyl3_work,
|
||||
LAPACKE_ztz_nancheck,
|
||||
LAPACKE_ztz_trans,
|
||||
|
||||
## @(SRCX_OBJ) from `lapack-3.4.1/lapacke/src/Makefile`
|
||||
## Not exported: requires LAPACKE_EXTENDED to be set and depends on the
|
||||
@@ -3551,7 +3705,7 @@ zpotri,
|
||||
LAPACKE_zsytrs_aa_2stage_work,
|
||||
# new functions from 3.9.0
|
||||
LAPACKE_zgesvdq,
|
||||
LAPACKE_zgesvdq_work
|
||||
LAPACKE_zgesvdq_work,
|
||||
);
|
||||
|
||||
#These function may need 2 underscores.
|
||||
@@ -3573,7 +3727,7 @@ zpotri,
|
||||
ssygv_2stage,
|
||||
ssysv_aa_2stage, ssytrf_aa_2stage,
|
||||
ssytrs_aa_2stage,
|
||||
slaorhr_col_getrfnp, slaorhr_col_getrfnp2, sorhr_col,
|
||||
slaorhr_col_getrfnp, slaorhr_col_getrfnp2, sorhr_col, slarfb_gett
|
||||
);
|
||||
@lapack_embeded_underscore_objs_c=(
|
||||
chetf2_rook, chetrf_rook, chetri_rook,
|
||||
@@ -3598,7 +3752,7 @@ zpotri,
|
||||
chetrf_aa_2stage, chetrs_aa_2stage,
|
||||
csysv_aa_2stage, csytrf_aa_2stage,
|
||||
csytrs_aa_2stage,
|
||||
claunhr_col_getrfnp, claunhr_col_getrfnp2, cunhr_col,
|
||||
claunhr_col_getrfnp, claunhr_col_getrfnp2, cunhr_col, clarfb_gett
|
||||
);
|
||||
@lapack_embeded_underscore_objs_d=(
|
||||
dlasyf_rook,
|
||||
@@ -3615,7 +3769,7 @@ zpotri,
|
||||
dsbevd_2stage, dsygv_2stage,
|
||||
dsysv_aa_2stage,
|
||||
dsytrf_aa_2stage, dsytrs_aa_2stage,
|
||||
dlaorhr_col_getrfnp, dlaorhr_col_getrfnp2, dorhr_col,
|
||||
dlaorhr_col_getrfnp, dlaorhr_col_getrfnp2, dorhr_col, dlarfb_gett
|
||||
);
|
||||
@lapack_embeded_underscore_objs_z=(
|
||||
zhetf2_rook, zhetrf_rook, zhetri_rook,
|
||||
@@ -3639,7 +3793,7 @@ zpotri,
|
||||
zhesv_aa_2stage, zhetrf_aa_2stage,
|
||||
zhetrs_aa_2stage, zsysv_aa_2stage,
|
||||
zsytrf_aa_2stage, zsytrs_aa_2stage,
|
||||
zlaunhr_col_getrfnp, zlaunhr_col_getrfnp2, zunhr_col
|
||||
zlaunhr_col_getrfnp, zlaunhr_col_getrfnp2, zunhr_col, zlarfb_gett
|
||||
);
|
||||
|
||||
|
||||
@@ -3652,6 +3806,10 @@ if ($ARGV[12] == 1) {
|
||||
@cblasobjs = (@cblasobjs, @bfcblasobjs);
|
||||
}
|
||||
if ($ARGV[13] == 1) {
|
||||
@blasobjs = (@blasobjs, @hfblasobjs);
|
||||
@cblasobjs = (@cblasobjs, @hfcblasobjs);
|
||||
}
|
||||
if ($ARGV[14] == 1) {
|
||||
@blasobjs = (@blasobjs, @blasobjss);
|
||||
@cblasobjs = (@cblasobjs, @cblasobjss);
|
||||
@lapackobjs = (@lapackobjs, @lapackobjss);
|
||||
@@ -3663,11 +3821,11 @@ if ($ARGV[13] == 1) {
|
||||
@lapack_embeded_underscore_objs = (@lapack_embeded_underscore_objs, @lapack_embeded_underscore_objs_s);
|
||||
@lapackeobjs = (@lapackeobjs, @lapackeobjss);
|
||||
}
|
||||
if ($ARGV[14] == 1) {
|
||||
if ($ARGV[15] == 1) {
|
||||
@blasobjs = (@blasobjs, @blasobjsd);
|
||||
@cblasobjs = (@cblasobjs, @cblasobjsd);
|
||||
@lapackobjs = (@lapackobjs, @lapackobjsd);
|
||||
if ($ARGV[13] == 0) {
|
||||
if ($ARGV[14] == 0) {
|
||||
@lapackobjs2 = (@lapackobjs2, @lapackobjs2ds);
|
||||
}
|
||||
@lapackobjs2 = (@lapackobjs2, @lapackobjs2d, @lapackobjs2dz);
|
||||
@@ -3676,14 +3834,14 @@ if ($ARGV[14] == 1) {
|
||||
@lapack_embeded_underscore_objs = (@lapack_embeded_underscore_objs, @lapack_embeded_underscore_objs_d);
|
||||
@lapackeobjs = (@lapackeobjs, @lapackeobjsd);
|
||||
}
|
||||
if ($ARGV[15] == 1) {
|
||||
if ($ARGV[16] == 1) {
|
||||
@blasobjs = (@blasobjs, @blasobjsc);
|
||||
@cblasobjs = (@cblasobjs, @cblasobjsc);
|
||||
@gemm3mobjs = (@gemm3mobjs, @gemm3mobjsc);
|
||||
@cblasgemm3mobjs = (@cblasgemm3mobjs, @cblasgemm3mobjsc);
|
||||
@lapackobjs = (@lapackobjs, @lapackobjsc);
|
||||
@lapackobjs2 = (@lapackobjs2, @lapackobjs2c, @lapackobjs2zc);
|
||||
if ($ARGV[13] == 0) {
|
||||
if ($ARGV[14] == 0) {
|
||||
@lapackobjs2 = (@lapackobjs2, @lapackobjs2sc);
|
||||
}
|
||||
@lapack_deprecated_objs = (@lapack_deprecated_objs, @lapack_deprecated_objsc);
|
||||
@@ -3691,17 +3849,17 @@ if ($ARGV[15] == 1) {
|
||||
@lapack_embeded_underscore_objs = (@lapack_embeded_underscore_objs, @lapack_embeded_underscore_objs_c);
|
||||
@lapackeobjs = (@lapackeobjs, @lapackeobjsc);
|
||||
}
|
||||
if ($ARGV[16] == 1) {
|
||||
if ($ARGV[17] == 1) {
|
||||
@blasobjs = (@blasobjs, @blasobjsz);
|
||||
@cblasobjs = (@cblasobjs, @cblasobjsz);
|
||||
@gemm3mobjs = (@gemm3mobjs, @gemm3mobjsz);
|
||||
@cblasgemm3mobjs = (@cblasgemm3mobjs, @cblasgemm3mobjsz);
|
||||
@lapackobjs = (@lapackobjs, @lapackobjsz);
|
||||
@lapackobjs2 = (@lapackobjs2, @lapackobjs2z);
|
||||
if ($ARGV[15] == 0) {
|
||||
if ($ARGV[16] == 0) {
|
||||
@lapackobjs2 = (@lapackobjs2, @lapackobjs2zc);
|
||||
}
|
||||
if ($ARGV[14] == 0) {
|
||||
if ($ARGV[15] == 0) {
|
||||
@lapackobjs2 = (@lapackobjs2, @lapackobjs2dz);
|
||||
}
|
||||
@lapack_deprecated_objs = (@lapack_deprecated_objs, @lapack_deprecated_objsz);
|
||||
|
||||
@@ -245,6 +245,13 @@ else
|
||||
;;
|
||||
*flang*)
|
||||
vendor=FLANG
|
||||
data=`$compiler -v 2>&1 > /dev/null`
|
||||
v="${data#*version *}"
|
||||
v="${v%%*.}"
|
||||
major="${v%%.*}"
|
||||
if [ "$major" -ge 17 ]; then
|
||||
vendor=FLANGNEW
|
||||
fi
|
||||
bu=_
|
||||
openmp='-fopenmp'
|
||||
;;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
Copyright (c) 2011-2014, The OpenBLAS Project
|
||||
Copyright (c) 2011-2014, 2025 The OpenBLAS Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -158,6 +158,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
/* #define FORCE_CSKY */
|
||||
/* #define FORCE_CK860FV */
|
||||
/* #define FORCE_GENERIC */
|
||||
/* #define FORCE_AMPERE1 */
|
||||
|
||||
#ifdef FORCE_P2
|
||||
#define FORCE
|
||||
@@ -835,7 +836,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define CORENAME "POWER9"
|
||||
#endif
|
||||
|
||||
#if defined(FORCE_POWER10)
|
||||
#if defined(FORCE_POWER10) || (FORCE_POWER11)
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "POWER"
|
||||
#define SUBARCHITECTURE "POWER10"
|
||||
@@ -1289,6 +1290,19 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define CORENAME "ARMV8SVE"
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_ARMV9SME
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "ARM64"
|
||||
#define SUBARCHITECTURE "ARMV9SME"
|
||||
#define SUBDIRNAME "arm64"
|
||||
#define ARCHCONFIG "-DARMV9SME " \
|
||||
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
|
||||
"-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
|
||||
"-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DHAVE_SME -DARMV8 -DARMV9"
|
||||
#define LIBNAME "armv9sme"
|
||||
#define CORENAME "ARMV9SME"
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_ARMV8
|
||||
#define FORCE
|
||||
@@ -1462,7 +1476,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
"-DL2_SIZE=1048576 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
|
||||
"-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8 " \
|
||||
"-march=armv8.4-a+sve -mtune=neoverse-v1"
|
||||
"-march=armv8.4-a+sve+bf16 -mtune=neoverse-v1"
|
||||
#define LIBNAME "neoversev1"
|
||||
#define CORENAME "NEOVERSEV1"
|
||||
#endif
|
||||
@@ -1484,6 +1498,22 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define CORENAME "NEOVERSEN2"
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_NEOVERSEV2
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "ARM64"
|
||||
#define SUBARCHITECTURE "NEOVERSEV2"
|
||||
#define SUBDIRNAME "arm64"
|
||||
#define ARCHCONFIG "-DNEOVERSEV2 " \
|
||||
"-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
|
||||
"-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
|
||||
"-DL2_SIZE=1048576 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
|
||||
"-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8 " \
|
||||
"-mcpu=neoverse-v2"
|
||||
#define LIBNAME "neoversev2"
|
||||
#define CORENAME "NEOVERSEV2"
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_CORTEXA55
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "ARM64"
|
||||
@@ -1577,6 +1607,22 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define CORENAME "EMAG8180"
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_AMPERE1
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "ARM64"
|
||||
#define SUBARCHITECTURE "AMPERE1"
|
||||
#define SUBDIRNAME "arm64"
|
||||
#define ARCHCONFIG "-DAMPERE1 " \
|
||||
"-DL1_CODE_SIZE=16384 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
|
||||
"-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
|
||||
"-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
|
||||
"-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8 " \
|
||||
"-march=armv8.6-a+crypto+crc+fp16+sha3+rng"
|
||||
#define LIBNAME "ampere1"
|
||||
#define CORENAME "AMPERE1"
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_THUNDERX3T110
|
||||
#define ARMV8
|
||||
#define FORCE
|
||||
@@ -1807,7 +1853,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define CORENAME "CK860FV"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef FORCE
|
||||
|
||||
#ifdef USER_TARGET
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2025, The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef BUILD_KERNEL
|
||||
#include "config.h"
|
||||
@@ -17,8 +45,14 @@ typedef unsigned long BLASULONG;
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
if ( (argc <= 1) || ((argc >= 2) && (*argv[1] == '0'))) {
|
||||
printf("BGEMM_UNROLL_M=%d\n", BGEMM_DEFAULT_UNROLL_M);
|
||||
printf("BGEMM_UNROLL_N=%d\n", BGEMM_DEFAULT_UNROLL_N);
|
||||
printf("BGEMM_UNROLL_M=%d\n", BGEMM_DEFAULT_UNROLL_M);
|
||||
printf("BGEMM_UNROLL_N=%d\n", BGEMM_DEFAULT_UNROLL_N);
|
||||
printf("SBGEMM_UNROLL_M=%d\n", SBGEMM_DEFAULT_UNROLL_M);
|
||||
printf("SBGEMM_UNROLL_N=%d\n", SBGEMM_DEFAULT_UNROLL_N);
|
||||
printf("SHGEMM_UNROLL_M=%d\n", SHGEMM_DEFAULT_UNROLL_M);
|
||||
printf("SHGEMM_UNROLL_N=%d\n", SHGEMM_DEFAULT_UNROLL_N);
|
||||
printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
|
||||
printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
|
||||
printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
|
||||
|
||||
+55
-20
@@ -1,3 +1,30 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR})
|
||||
include_directories(${PROJECT_BINARY_DIR})
|
||||
@@ -30,17 +57,17 @@ set(BLAS2_SOURCES
|
||||
gemv.c ger.c
|
||||
trsv.c trmv.c
|
||||
syr2.c gbmv.c
|
||||
sbmv.c
|
||||
sbmv.c spmv.c
|
||||
spr2.c
|
||||
tbsv.c tbmv.c
|
||||
tpsv.c tpmv.c
|
||||
)
|
||||
|
||||
set(BLAS2_REAL_ONLY_SOURCES
|
||||
symv.c syr.c spmv.c spr.c
|
||||
symv.c syr.c spr.c
|
||||
)
|
||||
set(BLAS2_COMPLEX_LAPACK_SOURCES
|
||||
symv.c syr.c spmv.c spr.c
|
||||
symv.c syr.c spr.c
|
||||
)
|
||||
|
||||
set(BLAS2_COMPLEX_ONLY_MANGLED_SOURCES
|
||||
@@ -97,10 +124,8 @@ foreach (CBLAS_FLAG ${CBLAS_FLAGS})
|
||||
#sdsdot, dsdot
|
||||
if (BUILD_SINGLE OR BUILD_DOUBLE)
|
||||
GenerateNamedObjects("sdsdot.c" "" "sdsdot" ${CBLAS_FLAG} "" "" true "SINGLE")
|
||||
if(CBLAS_FLAG EQUAL 1)
|
||||
GenerateNamedObjects("gemm_batch.c" "" "gemm_batch" ${CBLAS_FLAG} "" "" false)
|
||||
endif ()
|
||||
endif ()
|
||||
GenerateNamedObjects("gemm_batch.c" "" "gemm_batch" ${CBLAS_FLAG} "" "" false)
|
||||
endif ()
|
||||
if (BUILD_DOUBLE)
|
||||
GenerateNamedObjects("dsdot.c" "" "dsdot" ${CBLAS_FLAG} "" "" true "SINGLE")
|
||||
endif ()
|
||||
@@ -109,7 +134,7 @@ endif ()
|
||||
GenerateNamedObjects("trsm.c" "TRMM" "trmm" ${CBLAS_FLAG})
|
||||
|
||||
# gemmtr is gemmt under the name adopted by the Reference BLAS
|
||||
GenerateNamedObjects("gemm.c" "" "gemmtr" ${CBLAS_FLAG})
|
||||
GenerateNamedObjects("gemm.c" "RNAME" "gemmtr" ${CBLAS_FLAG})
|
||||
|
||||
# max and imax are compiled 4 times
|
||||
GenerateNamedObjects("max.c" "" "" ${CBLAS_FLAG})
|
||||
@@ -123,18 +148,22 @@ endif ()
|
||||
GenerateNamedObjects("imax.c" "USE_MIN" "i*min" ${CBLAS_FLAG})
|
||||
|
||||
if (BUILD_BFLOAT16)
|
||||
GenerateNamedObjects("scal.c" "BGEMM" "bscal" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("bf16dot.c" "" "sbdot" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("gemm.c" "BGEMM" "bgemm" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("gemm.c" "" "sbgemm" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("gemmt.c" "" "sbgemmt" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("gemmt.c" "" "sbgemmtr" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("sbgemmt.c" "" "sbgemmt" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("sbgemmt.c" "RNAME" "sbgemmtr" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("sbgemv.c" "BGEMM" "bgemv" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("sbgemv.c" "" "sbgemv" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("tobf16.c" "SINGLE_PREC" "sbstobf16" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("tobf16.c" "DOUBLE_PREC" "sbdtobf16" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("bf16to.c" "SINGLE_PREC" "sbf16tos" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("bf16to.c" "DOUBLE_PREC" "dbf16tod" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
if(CBLAS_FLAG EQUAL 1)
|
||||
GenerateNamedObjects("gemm_batch.c" "" "sbgemm_batch" ${CBLAS_FLAG} "" "" true "BFLOAT16")
|
||||
endif ()
|
||||
if (BUILD_HFLOAT16)
|
||||
GenerateNamedObjects("gemm.c" "" "shgemm" ${CBLAS_FLAG} "" "" true "HFLOAT16")
|
||||
endif ()
|
||||
|
||||
# complex-specific sources
|
||||
@@ -164,9 +193,7 @@ foreach (float_type ${FLOAT_TYPES})
|
||||
GenerateNamedObjects("max.c" "USE_ABS" "scamax" ${CBLAS_FLAG} "" "" true "COMPLEX")
|
||||
GenerateNamedObjects("asum.c" "" "scasum" ${CBLAS_FLAG} "" "" true "COMPLEX")
|
||||
GenerateNamedObjects("sum.c" "" "scsum" ${CBLAS_FLAG} "" "" true "COMPLEX")
|
||||
if(CBLAS_FLAG EQUAL 1)
|
||||
GenerateNamedObjects("gemm_batch.c" "" "cgemm_batch" ${CBLAS_FLAG} "" "" true "COMPLEX")
|
||||
endif ()
|
||||
GenerateNamedObjects("gemm_batch.c" "" "cgemm_batch" ${CBLAS_FLAG} "" "" true "COMPLEX")
|
||||
endif ()
|
||||
if (${float_type} STREQUAL "ZCOMPLEX")
|
||||
GenerateNamedObjects("zscal.c" "SSCAL" "dscal" ${CBLAS_FLAG} "" "" false "ZCOMPLEX")
|
||||
@@ -176,9 +203,7 @@ foreach (float_type ${FLOAT_TYPES})
|
||||
GenerateNamedObjects("max.c" "USE_ABS" "dzamax" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
|
||||
GenerateNamedObjects("asum.c" "" "dzasum" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
|
||||
GenerateNamedObjects("sum.c" "" "dzsum" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
|
||||
if(CBLAS_FLAG EQUAL 1)
|
||||
GenerateNamedObjects("gemm_batch.c" "" "zgemm_batch" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
|
||||
endif ()
|
||||
GenerateNamedObjects("gemm_batch.c" "" "zgemm_batch" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
@@ -195,7 +220,7 @@ if (NOT DEFINED NO_CBLAS)
|
||||
endforeach ()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED NO_LAPACK)
|
||||
if (NOT NO_LAPACK)
|
||||
set(LAPACK_SOURCES
|
||||
lapack/gesv.c
|
||||
)
|
||||
@@ -218,6 +243,7 @@ if (NOT DEFINED NO_LAPACK)
|
||||
GenerateNamedObjects("lapack/lauu2.c" "" "" 0 "" "" 0 3)
|
||||
GenerateNamedObjects("lapack/trti2.c" "" "" 0 "" "" 0 3)
|
||||
endif()
|
||||
GenerateNamedObjects("lapack/laed3.c" "" "" 0 "" "" 0 1)
|
||||
endif ()
|
||||
|
||||
if ( BUILD_COMPLEX AND NOT BUILD_SINGLE)
|
||||
@@ -228,7 +254,7 @@ if ( BUILD_COMPLEX AND NOT BUILD_SINGLE)
|
||||
GenerateNamedObjects("nrm2.c" "" "nrm2" 0 "" "" false "SINGLE")
|
||||
GenerateNamedObjects("gemv.c" "" "gemv" 0 "" "" false "SINGLE")
|
||||
GenerateNamedObjects("gemm.c" "" "gemm" 0 "" "" false "SINGLE")
|
||||
GenerateNamedObjects("gemm_batch.c" "" "gemm_batch" 1 "" "" false "SINGLE")
|
||||
GenerateNamedObjects("gemm_batch.c" "" "gemm_batch" 0 "" "" false "SINGLE")
|
||||
GenerateNamedObjects("asum.c" "" "asum" 0 "" "" false "SINGLE")
|
||||
GenerateNamedObjects("swap.c" "" "swap" 0 "" "" false "SINGLE")
|
||||
GenerateNamedObjects("axpy.c" "" "axpy" 0 "" "" false "SINGLE")
|
||||
@@ -242,11 +268,20 @@ if ( BUILD_COMPLEX16 AND NOT BUILD_DOUBLE)
|
||||
GenerateNamedObjects("nrm2.c" "" "nrm2" 0 "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("gemv.c" "" "gemv" 0 "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("gemm.c" "" "gemm" 0 "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("gemm_batch.c" "" "gemm_batch" 1 "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("gemm_batch.c" "" "gemm_batch" 0 "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("asum.c" "" "asum" 0 "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("swap.c" "" "swap" 0 "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("axpy.c" "" "axpy" 0 "" "" false "DOUBLE")
|
||||
GenerateNamedObjects("imax.c" "USE_ABS" "i*amax" 0 "" "" false "DOUBLE")
|
||||
endif ()
|
||||
|
||||
if ( BUILD_BFLOAT16 AND NO_FBLAS )
|
||||
GenerateNamedObjects("tobf16.c" "SINGLE_PREC" "sbstobf16" 0 "" "" true "BFLOAT16")
|
||||
GenerateNamedObjects("bf16to.c" "SINGLE_PREC" "sbf16tos" 0 "" "" true "BFLOAT16")
|
||||
endif()
|
||||
|
||||
add_library(interface OBJECT ${OPENBLAS_SRC})
|
||||
|
||||
if (USE_OPENMP)
|
||||
target_link_libraries(interface OpenMP::OpenMP_C)
|
||||
endif()
|
||||
|
||||
+121
-23
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
TOPDIR = ..
|
||||
include $(TOPDIR)/Makefile.system
|
||||
|
||||
@@ -44,15 +72,23 @@ SBLAS3OBJS = \
|
||||
sgemm.$(SUFFIX) ssymm.$(SUFFIX) strmm.$(SUFFIX) \
|
||||
strsm.$(SUFFIX) ssyrk.$(SUFFIX) ssyr2k.$(SUFFIX) \
|
||||
somatcopy.$(SUFFIX) simatcopy.$(SUFFIX)\
|
||||
sgeadd.$(SUFFIX) sgemmt.$(SUFFIX) sgemmtr.$(SUFFIX)
|
||||
sgeadd.$(SUFFIX) sgemmt.$(SUFFIX) sgemmtr.$(SUFFIX) \
|
||||
sgemm_batch.$(SUFFIX)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
BBLAS3OBJS = bgemm.$(SUFFIX)
|
||||
BBLAS2OBJS = bgemv.$(SUFFIX)
|
||||
BBLAS1OBJS = bscal.$(SUFFIX)
|
||||
SBBLAS1OBJS = sbdot.$(SUFFIX)
|
||||
SBBLAS2OBJS = sbgemv.$(SUFFIX)
|
||||
SBBLAS3OBJS = sbgemm.$(SUFFIX) sbgemmt.$(SUFFIX) sbgemmtr.$(SUFFIX)
|
||||
SBBLAS3OBJS = sbgemm.$(SUFFIX) sbgemmt.$(SUFFIX) sbgemmtr.$(SUFFIX) sbgemm_batch.$(SUFFIX)
|
||||
SBEXTOBJS = sbstobf16.$(SUFFIX) sbdtobf16.$(SUFFIX) sbf16tos.$(SUFFIX) dbf16tod.$(SUFFIX)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
SHBLAS3OBJS = shgemm.$(SUFFIX)
|
||||
endif
|
||||
|
||||
DBLAS1OBJS = \
|
||||
daxpy.$(SUFFIX) dswap.$(SUFFIX) \
|
||||
dcopy.$(SUFFIX) dscal.$(SUFFIX) \
|
||||
@@ -76,7 +112,8 @@ DBLAS3OBJS = \
|
||||
dgemm.$(SUFFIX) dsymm.$(SUFFIX) dtrmm.$(SUFFIX) \
|
||||
dtrsm.$(SUFFIX) dsyrk.$(SUFFIX) dsyr2k.$(SUFFIX) \
|
||||
domatcopy.$(SUFFIX) dimatcopy.$(SUFFIX)\
|
||||
dgeadd.$(SUFFIX) dgemmt.$(SUFFIX) dgemmtr.$(SUFFIX)
|
||||
dgeadd.$(SUFFIX) dgemmt.$(SUFFIX) dgemmtr.$(SUFFIX) \
|
||||
dgemm_batch.$(SUFFIX)
|
||||
|
||||
CBLAS1OBJS = \
|
||||
caxpy.$(SUFFIX) caxpyc.$(SUFFIX) cswap.$(SUFFIX) \
|
||||
@@ -105,7 +142,8 @@ CBLAS3OBJS = \
|
||||
ctrsm.$(SUFFIX) csyrk.$(SUFFIX) csyr2k.$(SUFFIX) \
|
||||
chemm.$(SUFFIX) cherk.$(SUFFIX) cher2k.$(SUFFIX) \
|
||||
comatcopy.$(SUFFIX) cimatcopy.$(SUFFIX)\
|
||||
cgeadd.$(SUFFIX) cgemmt.$(SUFFIX) cgemmtr.$(SUFFIX)
|
||||
cgeadd.$(SUFFIX) cgemmt.$(SUFFIX) cgemmtr.$(SUFFIX) \
|
||||
cgemm_batch.$(SUFFIX)
|
||||
|
||||
ZBLAS1OBJS = \
|
||||
zaxpy.$(SUFFIX) zaxpyc.$(SUFFIX) zswap.$(SUFFIX) \
|
||||
@@ -134,7 +172,8 @@ ZBLAS3OBJS = \
|
||||
ztrsm.$(SUFFIX) zsyrk.$(SUFFIX) zsyr2k.$(SUFFIX) \
|
||||
zhemm.$(SUFFIX) zherk.$(SUFFIX) zher2k.$(SUFFIX) \
|
||||
zomatcopy.$(SUFFIX) zimatcopy.$(SUFFIX)\
|
||||
zgeadd.$(SUFFIX) zgemmt.$(SUFFIX) zgemmtr.$(SUFFIX)
|
||||
zgeadd.$(SUFFIX) zgemmt.$(SUFFIX) zgemmtr.$(SUFFIX) \
|
||||
zgemm_batch.$(SUFFIX)
|
||||
|
||||
ifeq ($(SUPPORT_GEMM3M), 1)
|
||||
|
||||
@@ -285,10 +324,20 @@ CSBLAS3OBJS = \
|
||||
cblas_sgeadd.$(SUFFIX) cblas_sgemmt.$(SUFFIX) cblas_sgemmtr.$(SUFFIX) cblas_sgemm_batch.$(SUFFIX)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
CBBLAS3OBJS = cblas_bgemm.$(SUFFIX)
|
||||
CBBLAS2OBJS = cblas_bgemv.$(SUFFIX)
|
||||
CBBLAS1OBJS = cblas_bscal.$(SUFFIX)
|
||||
CSBBLAS1OBJS = cblas_sbdot.$(SUFFIX)
|
||||
CSBBLAS2OBJS = cblas_sbgemv.$(SUFFIX)
|
||||
CSBBLAS3OBJS = cblas_sbgemm.$(SUFFIX) cblas_sbgemmt.$(SUFFIX) cblas_sbgemmtr.$(SUFFIX) cblas_sbgemm_batch.$(SUFFIX)
|
||||
CSBEXTOBJS = cblas_sbstobf16.$(SUFFIX) cblas_sbdtobf16.$(SUFFIX) cblas_sbf16tos.$(SUFFIX) cblas_dbf16tod.$(SUFFIX)
|
||||
ifeq ($(ONLY_CBLAS),1)
|
||||
CSBEXTOBJS += sbstobf16.$(SUFFIX) sbdtobf16.$(SUFFIX) sbf16tos.$(SUFFIX) dbf16tod.$(SUFFIX)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
CSHBLAS3OBJS = cblas_shgemm.$(SUFFIX)
|
||||
endif
|
||||
|
||||
CDBLAS1OBJS = \
|
||||
@@ -385,9 +434,13 @@ override CFLAGS += -I.
|
||||
SBLAS1OBJS += $(CSBLAS1OBJS)
|
||||
SBLAS2OBJS += $(CSBLAS2OBJS)
|
||||
SBLAS3OBJS += $(CSBLAS3OBJS)
|
||||
BBLAS3OBJS += $(CBBLAS3OBJS)
|
||||
BBLAS2OBJS += $(CBBLAS2OBJS)
|
||||
BBLAS1OBJS += $(CBBLAS1OBJS)
|
||||
SBBLAS1OBJS += $(CSBBLAS1OBJS)
|
||||
SBBLAS2OBJS += $(CSBBLAS2OBJS)
|
||||
SBBLAS3OBJS += $(CSBBLAS3OBJS)
|
||||
SHBLAS3OBJS += $(CSHBLAS3OBJS)
|
||||
DBLAS1OBJS += $(CDBLAS1OBJS)
|
||||
DBLAS2OBJS += $(CDBLAS2OBJS)
|
||||
DBLAS3OBJS += $(CDBLAS3OBJS)
|
||||
@@ -403,8 +456,10 @@ SBEXTOBJS += $(CSBEXTOBJS)
|
||||
CBAUXOBJS += $(CXERBLAOBJ)
|
||||
endif
|
||||
|
||||
BBLASOBJS = $(BBLAS3OBJS) $(BBLAS2OBJS) $(BBLAS1OBJS)
|
||||
SBLASOBJS = $(SBLAS1OBJS) $(SBLAS2OBJS) $(SBLAS3OBJS)
|
||||
SBBLASOBJS = $(SBBLAS1OBJS) $(SBBLAS2OBJS) $(SBBLAS3OBJS)
|
||||
SHBLASOBJS = $(SHBLAS3OBJS)
|
||||
DBLASOBJS = $(DBLAS1OBJS) $(DBLAS2OBJS) $(DBLAS3OBJS)
|
||||
QBLASOBJS = $(QBLAS1OBJS) $(QBLAS2OBJS) $(QBLAS3OBJS)
|
||||
CBLASOBJS = $(CBLAS1OBJS) $(CBLAS2OBJS) $(CBLAS3OBJS)
|
||||
@@ -419,8 +474,8 @@ XBLASOBJS = $(XBLAS1OBJS) $(XBLAS2OBJS) $(XBLAS3OBJS)
|
||||
SLAPACKOBJS = \
|
||||
sgetrf.$(SUFFIX) sgetrs.$(SUFFIX) spotrf.$(SUFFIX) sgetf2.$(SUFFIX) \
|
||||
spotf2.$(SUFFIX) slaswp.$(SUFFIX) sgesv.$(SUFFIX) slauu2.$(SUFFIX) \
|
||||
slauum.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) strtrs.$(SUFFIX)
|
||||
|
||||
slauum.$(SUFFIX) strti2.$(SUFFIX) strtri.$(SUFFIX) strtrs.$(SUFFIX) \
|
||||
slaed3.$(SUFFIX)
|
||||
|
||||
#DLAPACKOBJS = \
|
||||
# dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \
|
||||
@@ -430,8 +485,8 @@ SLAPACKOBJS = \
|
||||
DLAPACKOBJS = \
|
||||
dgetrf.$(SUFFIX) dgetrs.$(SUFFIX) dpotrf.$(SUFFIX) dgetf2.$(SUFFIX) \
|
||||
dpotf2.$(SUFFIX) dlaswp.$(SUFFIX) dgesv.$(SUFFIX) dlauu2.$(SUFFIX) \
|
||||
dlauum.$(SUFFIX) dtrti2.$(SUFFIX) dtrtri.$(SUFFIX) dtrtrs.$(SUFFIX)
|
||||
|
||||
dlauum.$(SUFFIX) dtrti2.$(SUFFIX) dtrtri.$(SUFFIX) dtrtrs.$(SUFFIX) \
|
||||
dlaed3.$(SUFFIX)
|
||||
|
||||
QLAPACKOBJS = \
|
||||
qgetf2.$(SUFFIX) qgetrf.$(SUFFIX) qlauu2.$(SUFFIX) qlauum.$(SUFFIX) \
|
||||
@@ -512,7 +567,7 @@ ifneq ($(BUILD_COMPLEX16),1)
|
||||
ZBLASOBJS=
|
||||
endif
|
||||
|
||||
FUNCOBJS = $(SBEXTOBJS) $(CXERBLAOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS)
|
||||
FUNCOBJS = $(SBEXTOBJS) $(CXERBLAOBJS) $(BBLASOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(SHBLASOBJS)
|
||||
|
||||
ifeq ($(EXPRECISION), 1)
|
||||
FUNCOBJS += $(QBLASOBJS) $(XBLASOBJS)
|
||||
@@ -547,10 +602,10 @@ clean ::
|
||||
level1 : $(SBEXTOBJS) $(SBBLAS1OBJS) $(SBLAS1OBJS) $(DBLAS1OBJS) $(QBLAS1OBJS) $(CBLAS1OBJS) $(ZBLAS1OBJS) $(XBLAS1OBJS)
|
||||
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^
|
||||
|
||||
level2 : $(SBBLAS2OBJS) $(SBLAS2OBJS) $(DBLAS2OBJS) $(QBLAS2OBJS) $(CBLAS2OBJS) $(ZBLAS2OBJS) $(XBLAS2OBJS)
|
||||
level2 : $(SBBLAS2OBJS) $(BBLAS2OBJS) $(SBLAS2OBJS) $(DBLAS2OBJS) $(QBLAS2OBJS) $(CBLAS2OBJS) $(ZBLAS2OBJS) $(XBLAS2OBJS)
|
||||
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^
|
||||
|
||||
level3 : $(SBBLAS3OBJS) $(SBLAS3OBJS) $(DBLAS3OBJS) $(QBLAS3OBJS) $(CBLAS3OBJS) $(ZBLAS3OBJS) $(XBLAS3OBJS)
|
||||
level3 : $(SBBLAS3OBJS) $(BBLAS3OBJ) $(SBLAS3OBJS) $(DBLAS3OBJS) $(QBLAS3OBJS) $(CBLAS3OBJS) $(ZBLAS3OBJS) $(XBLAS3OBJS) $(SHBLAS3OBJS)
|
||||
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^
|
||||
|
||||
aux : $(CBAUXOBJS)
|
||||
@@ -782,6 +837,8 @@ dsdot.$(SUFFIX) dsdot.$(PSUFFIX) : dsdot.c
|
||||
$(CC) $(CFLAGS) -c $< -o $(@F)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bscal.$(SUFFIX) bscal.$(PSUFFIX) : scal.c
|
||||
$(CC) $(CFLAGS) -DBGEMM -c $< -o $(@F)
|
||||
sbdot.$(SUFFIX) sbdot.$(PSUFFIX) : bf16dot.c
|
||||
$(CC) $(CFLAGS) -c $< -o $(@F)
|
||||
sbstobf16.$(SUFFIX) sbstobf16.$(PSUFFIX) : tobf16.c
|
||||
@@ -939,6 +996,8 @@ xgerc.$(SUFFIX) xgerc.$(PSUFFIX) : zger.c
|
||||
$(CC) -c $(CFLAGS) -DCONJ $< -o $(@F)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemv.$(SUFFIX) bgemv.$(PSUFFIX) : sbgemv.c
|
||||
$(CC) $(CFLAGS) -DBGEMM -c $< -o $(@F)
|
||||
sbgemv.$(SUFFIX) sbgemv.$(PSUFFIX) : sbgemv.c
|
||||
$(CC) $(CFLAGS) -c $< -o $(@F)
|
||||
endif
|
||||
@@ -1301,11 +1360,18 @@ xhpr2.$(SUFFIX) xhpr2.$(PSUFFIX) : zhpr2.c
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemm.$(SUFFIX) bgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
sbgemm.$(SUFFIX) sbgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
sbgemmt.$(SUFFIX) sbgemmt.$(PSUFFIX) : sbgemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -URNAME $< -o $(@F)
|
||||
sbgemmtr.$(SUFFIX) sbgemmtr.$(PSUFFIX) : sbgemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) -DRNAME $< -o $(@F)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
shgemm.$(SUFFIX) shgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
endif
|
||||
|
||||
@@ -1328,34 +1394,34 @@ xgemm.$(SUFFIX) xgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
|
||||
sgemmt.$(SUFFIX) sgemmt.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -URNAME $< -o $(@F)
|
||||
|
||||
dgemmt.$(SUFFIX) dgemmt.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -URNAME $< -o $(@F)
|
||||
|
||||
qgemmt.$(SUFFIX) qgemmt.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -URNAME $< -o $(@F)
|
||||
|
||||
cgemmt.$(SUFFIX) cgemmt.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -URNAME $< -o $(@F)
|
||||
|
||||
zgemmt.$(SUFFIX) zgemmt.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -URNAME $< -o $(@F)
|
||||
|
||||
sgemmtr.$(SUFFIX) sgemmtr.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -DRNAME $< -o $(@F)
|
||||
|
||||
dgemmtr.$(SUFFIX) dgemmtr.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -DRNAME $< -o $(@F)
|
||||
|
||||
qgemmtr.$(SUFFIX) qgemmtr.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -DRNAME $< -o $(@F)
|
||||
|
||||
cgemmtr.$(SUFFIX) cgemmtr.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -DRNAME $< -o $(@F)
|
||||
|
||||
zgemmtr.$(SUFFIX) zgemmtr.$(PSUFFIX) : gemmt.c ../param.h
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
$(CC) -c $(CFLAGS) -DRNAME $< -o $(@F)
|
||||
|
||||
ssymm.$(SUFFIX) ssymm.$(PSUFFIX) : symm.c
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
@@ -1604,6 +1670,8 @@ cblas_dsdot.$(SUFFIX) cblas_dsdot.$(PSUFFIX) : dsdot.c
|
||||
$(CC) $(CFLAGS) -DCBLAS -c $< -o $(@F)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
cblas_bscal.$(SUFFIX) cblas_bscal.$(PSUFFIX) : scal.c
|
||||
$(CC) $(CFLAGS) -DCBLAS -c $< -o $(@F)
|
||||
cblas_sbdot.$(SUFFIX) cblas_sbdot.$(PSUFFIX) : bf16dot.c
|
||||
$(CC) $(CFLAGS) -DCBLAS -c $< -o $(@F)
|
||||
cblas_sbstobf16.$(SUFFIX) cblas_sbstobf16.$(PSUFFIX) : tobf16.c
|
||||
@@ -1758,6 +1826,8 @@ cblas_zdrot.$(SUFFIX) cblas_zdrot.$(PSUFFIX) : zrot.c
|
||||
$(CC) $(CFLAGS) -DCBLAS -c $< -o $(@F)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
cblas_bgemv.$(SUFFIX) cblas_bgemv.$(PSUFFIX) : sbgemv.c
|
||||
$(CC) -DCBLAS -DBGEMM -c $(CFLAGS) $< -o $(@F)
|
||||
cblas_sbgemv.$(SUFFIX) cblas_sbgemv.$(PSUFFIX) : sbgemv.c
|
||||
$(CC) -DCBLAS -c $(CFLAGS) $< -o $(@F)
|
||||
endif
|
||||
@@ -1964,10 +2034,17 @@ cblas_sgemm.$(SUFFIX) cblas_sgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -DCBLAS -c $(CFLAGS) $< -o $(@F)
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
cblas_bgemm.$(SUFFIX) cblas_bgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -DCBLAS -DBGEMM -c $(CFLAGS) $< -o $(@F)
|
||||
cblas_sbgemm.$(SUFFIX) cblas_sbgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -DCBLAS -c $(CFLAGS) $< -o $(@F)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
cblas_shgemm.$(SUFFIX) cblas_shgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -DCBLAS -c $(CFLAGS) $< -o $(@F)
|
||||
endif
|
||||
|
||||
cblas_dgemm.$(SUFFIX) cblas_dgemm.$(PSUFFIX) : gemm.c ../param.h
|
||||
$(CC) -DCBLAS -c $(CFLAGS) $< -o $(@F)
|
||||
|
||||
@@ -2345,6 +2422,11 @@ zlarf.$(SUFFIX) zlarf.$(PSUFFIX) : larf.c
|
||||
xlarf.$(SUFFIX) xlarf.$(PSUFFIX) : larf.c
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
|
||||
slaed3.$(SUFFIX) slaed3.$(PSUFFIX) : lapack/laed3.c
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
|
||||
dlaed3.$(SUFFIX) dlaed3.$(PSUFFIX) : lapack/laed3.c
|
||||
$(CC) -c $(CFLAGS) $< -o $(@F)
|
||||
|
||||
############# BLAS EXTENSIONS #####################################
|
||||
|
||||
@@ -2461,3 +2543,19 @@ cblas_cgemm_batch.$(SUFFIX) cblas_cgemm_batch.$(PSUFFIX) : gemm_batch.c ../param
|
||||
|
||||
cblas_zgemm_batch.$(SUFFIX) cblas_zgemm_batch.$(PSUFFIX) : gemm_batch.c ../param.h
|
||||
$(CC) -c $(CFLAGS) -DCBLAS $< -o $(@F)
|
||||
|
||||
sbgemm_batch.$(SUFFIX) sbgemm_batch.$(PSUFFIX) : gemm_batch.c ../param.h
|
||||
$(CC) -c $(CFLAGS) -UCBLAS $< -o $(@F)
|
||||
|
||||
sgemm_batch.$(SUFFIX) sgemm_batch.$(PSUFFIX) : gemm_batch.c ../param.h
|
||||
$(CC) -c $(CFLAGS) -UCBLAS $< -o $(@F)
|
||||
|
||||
dgemm_batch.$(SUFFIX) dgemm_batch.$(PSUFFIX) : gemm_batch.c ../param.h
|
||||
$(CC) -c $(CFLAGS) -UCBLAS $< -o $(@F)
|
||||
|
||||
cgemm_batch.$(SUFFIX) cgemm_batch.$(PSUFFIX) : gemm_batch.c ../param.h
|
||||
$(CC) -c $(CFLAGS) -UCBLAS $< -o $(@F)
|
||||
|
||||
zgemm_batch.$(SUFFIX) zgemm_batch.$(PSUFFIX) : gemm_batch.c ../param.h
|
||||
$(CC) -c $(CFLAGS) -UCBLAS $< -o $(@F)
|
||||
|
||||
|
||||
+98
-16
@@ -1,5 +1,5 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2024 The OpenBLAS Project */
|
||||
/* Copyright 2024, 2025 The OpenBLAS Project */
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
@@ -54,8 +54,15 @@
|
||||
#define ERROR_NAME "DGEMM "
|
||||
#define GEMV BLASFUNC(dgemv)
|
||||
#elif defined(BFLOAT16)
|
||||
#ifdef BGEMM
|
||||
#define ERROR_NAME "BGEMM "
|
||||
#define GEMV BLASFUNC(bgemv)
|
||||
#else
|
||||
#define ERROR_NAME "SBGEMM "
|
||||
#define GEMV BLASFUNC(sbgemv)
|
||||
#endif
|
||||
#elif defined(HFLOAT16)
|
||||
#define ERROR_NAME "SHGEMM "
|
||||
#else
|
||||
#define ERROR_NAME "SGEMM "
|
||||
#define GEMV BLASFUNC(sgemv)
|
||||
@@ -111,7 +118,7 @@ static int (*gemm[])(blas_arg_t *, BLASLONG *, BLASLONG *, IFLOAT *, IFLOAT *, B
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(SMALL_MATRIX_OPT) && !defined(GEMM3M) && !defined(XDOUBLE)
|
||||
#if defined(SMALL_MATRIX_OPT) && !defined(GEMM3M) && !defined(XDOUBLE) && !defined(HFLOAT16) && !defined(BGEMM)
|
||||
#define USE_SMALL_MATRIX_OPT 1
|
||||
#else
|
||||
#define USE_SMALL_MATRIX_OPT 0
|
||||
@@ -177,6 +184,74 @@ static int init_amxtile_permission() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SMP
|
||||
#ifdef DYNAMIC_ARCH
|
||||
extern char* gotoblas_corename(void);
|
||||
#endif
|
||||
|
||||
#if defined(DYNAMIC_ARCH) || defined(NEOVERSEV1)
|
||||
static inline int get_gemm_optimal_nthreads_neoversev1(double MNK, int ncpu) {
|
||||
return
|
||||
MNK < 262144L ? 1
|
||||
: MNK < 1124864L ? MIN(ncpu, 6)
|
||||
: MNK < 7880599L ? MIN(ncpu, 12)
|
||||
: MNK < 17173512L ? MIN(ncpu, 16)
|
||||
: MNK < 33386248L ? MIN(ncpu, 20)
|
||||
: MNK < 57066625L ? MIN(ncpu, 24)
|
||||
: MNK < 91733851L ? MIN(ncpu, 32)
|
||||
: MNK < 265847707L ? MIN(ncpu, 40)
|
||||
: MNK < 458314011L ? MIN(ncpu, 48)
|
||||
: MNK < 729000000L ? MIN(ncpu, 56)
|
||||
: ncpu;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(DYNAMIC_ARCH) || defined(NEOVERSEV2)
|
||||
static inline int get_gemm_optimal_nthreads_neoversev2(double MNK, int ncpu) {
|
||||
return
|
||||
MNK < 125000L ? 1
|
||||
: MNK < 1092727L ? MIN(ncpu, 6)
|
||||
: MNK < 2628072L ? MIN(ncpu, 8)
|
||||
: MNK < 8000000L ? MIN(ncpu, 12)
|
||||
: MNK < 20346417L ? MIN(ncpu, 16)
|
||||
: MNK < 57066625L ? MIN(ncpu, 24)
|
||||
: MNK < 91125000L ? MIN(ncpu, 28)
|
||||
: MNK < 238328000L ? MIN(ncpu, 40)
|
||||
: MNK < 454756609L ? MIN(ncpu, 48)
|
||||
: MNK < 857375000L ? MIN(ncpu, 56)
|
||||
: MNK < 1073741824L ? MIN(ncpu, 64)
|
||||
: ncpu;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int get_gemm_optimal_nthreads(double MNK) {
|
||||
int ncpu = num_cpu_avail(3);
|
||||
#if defined(NEOVERSEV1) && !defined(COMPLEX) && !defined(DOUBLE) && !defined(BFLOAT16) && !defined(HFLOAT16)
|
||||
return get_gemm_optimal_nthreads_neoversev1(MNK, ncpu);
|
||||
#elif defined(NEOVERSEV2) && !defined(COMPLEX) && !defined(DOUBLE) && !defined(BFLOAT16) && !defined(HFLOAT16)
|
||||
return get_gemm_optimal_nthreads_neoversev2(MNK, ncpu);
|
||||
#elif defined(DYNAMIC_ARCH) && !defined(COMPLEX) && !defined(DOUBLE) && !defined(BFLOAT16) && !defined(HFLOAT16)
|
||||
if (strcmp(gotoblas_corename(), "neoversev1") == 0) {
|
||||
return get_gemm_optimal_nthreads_neoversev1(MNK, ncpu);
|
||||
}
|
||||
if (strcmp(gotoblas_corename(), "neoversev2") == 0) {
|
||||
return get_gemm_optimal_nthreads_neoversev2(MNK, ncpu);
|
||||
}
|
||||
#endif
|
||||
if ( MNK <= (SMP_THRESHOLD_MIN * (double) GEMM_MULTITHREAD_THRESHOLD) ) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
if (MNK/ncpu < SMP_THRESHOLD_MIN*(double)GEMM_MULTITHREAD_THRESHOLD) {
|
||||
return MNK/(SMP_THRESHOLD_MIN*(double)GEMM_MULTITHREAD_THRESHOLD);
|
||||
}
|
||||
else {
|
||||
return ncpu;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CBLAS
|
||||
|
||||
void NAME(char *TRANSA, char *TRANSB,
|
||||
@@ -310,7 +385,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS
|
||||
FLOAT *beta = (FLOAT*) vbeta;
|
||||
FLOAT *a = (FLOAT*) va;
|
||||
FLOAT *b = (FLOAT*) vb;
|
||||
FLOAT *c = (FLOAT*) vc;
|
||||
FLOAT *c = (FLOAT*) vc;
|
||||
#endif
|
||||
|
||||
blas_arg_t args;
|
||||
@@ -349,15 +424,28 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS
|
||||
|
||||
PRINT_DEBUG_CNAME;
|
||||
|
||||
#if !defined(COMPLEX) && !defined(DOUBLE) && !defined(BFLOAT16) && defined(USE_SGEMM_KERNEL_DIRECT)
|
||||
#ifdef DYNAMIC_ARCH
|
||||
if (support_avx512() )
|
||||
#endif
|
||||
#if !defined(COMPLEX) && !defined(DOUBLE) && !defined(BFLOAT16) && !defined(HFLOAT16)
|
||||
#if defined(ARCH_x86) && (defined(USE_SGEMM_KERNEL_DIRECT)||defined(DYNAMIC_ARCH))
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
if (support_avx512() )
|
||||
#endif
|
||||
if (beta == 0 && alpha == 1.0 && order == CblasRowMajor && TransA == CblasNoTrans && TransB == CblasNoTrans && SGEMM_DIRECT_PERFORMANT(m,n,k)) {
|
||||
SGEMM_DIRECT(m, n, k, a, lda, b, ldb, c, ldc);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
#if defined(ARCH_ARM64) && (defined(USE_SGEMM_KERNEL_DIRECT)||defined(DYNAMIC_ARCH))
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
if (support_sme1())
|
||||
#endif
|
||||
if (beta == 0 && alpha == 1.0 && order == CblasRowMajor && TransA == CblasNoTrans && TransB == CblasNoTrans) {
|
||||
SGEMM_DIRECT(m, n, k, a, lda, b, ldb, c, ldc);
|
||||
return;
|
||||
}else if (order == CblasRowMajor && TransA == CblasNoTrans && TransB == CblasNoTrans) {
|
||||
SGEMM_DIRECT_ALPHA_BETA(m, n, k, alpha, a, lda, b, ldb, beta, c, ldc);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef COMPLEX
|
||||
@@ -499,7 +587,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS
|
||||
args.m, args.n, args.k, args.lda, args.ldb, args.ldc);
|
||||
#endif
|
||||
|
||||
#if defined(GEMM_GEMV_FORWARD) && !defined(GEMM3M) && !defined(COMPLEX) && (!defined(BFLOAT16) || defined(GEMM_GEMV_FORWARD_BF16))
|
||||
#if defined(GEMM_GEMV_FORWARD) && !defined(GEMM3M) && !defined(COMPLEX) && !defined(HFLOAT16) && (!defined(BFLOAT16) || (!defined(BGEMM) && defined(SBGEMM_GEMV_FORWARD)) || (defined(BGEMM) && defined(BGEMM_GEMV_FORWARD)))
|
||||
#if defined(ARCH_ARM64)
|
||||
// The gemv kernels in arm64/{gemv_n.S,gemv_n_sve.c,gemv_t.S,gemv_t_sve.c}
|
||||
// perform poorly in certain circumstances. We use the following boolean
|
||||
@@ -604,13 +692,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS
|
||||
#endif
|
||||
|
||||
MNK = (double) args.m * (double) args.n * (double) args.k;
|
||||
if ( MNK <= (SMP_THRESHOLD_MIN * (double) GEMM_MULTITHREAD_THRESHOLD) )
|
||||
args.nthreads = 1;
|
||||
else {
|
||||
args.nthreads = num_cpu_avail(3);
|
||||
if (MNK/args.nthreads < SMP_THRESHOLD_MIN*(double)GEMM_MULTITHREAD_THRESHOLD)
|
||||
args.nthreads = MNK/(SMP_THRESHOLD_MIN*(double)GEMM_MULTITHREAD_THRESHOLD);
|
||||
}
|
||||
args.nthreads = get_gemm_optimal_nthreads(MNK);
|
||||
|
||||
args.common = NULL;
|
||||
|
||||
|
||||
+50
-5
@@ -114,6 +114,17 @@ static size_t zgemm_small_kernel_b0[] = {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CBLAS
|
||||
void NAME(char *transa_array, char *transb_array,
|
||||
blasint * m_array, blasint * n_array, blasint * k_array,
|
||||
FLOAT * alpha_array,
|
||||
IFLOAT ** a_array, blasint * lda_array,
|
||||
IFLOAT ** b_array, blasint * ldb_array,
|
||||
FLOAT * beta_array,
|
||||
FLOAT ** c_array, blasint * ldc_array, blasint * gcount, blasint * group_size) {
|
||||
blasint group_count = *gcount;
|
||||
#else
|
||||
|
||||
void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CBLAS_TRANSPOSE * transb_array,
|
||||
blasint * m_array, blasint * n_array, blasint * k_array,
|
||||
#ifndef COMPLEX
|
||||
@@ -134,8 +145,11 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CB
|
||||
FLOAT ** a_array=(FLOAT**)va_array;
|
||||
FLOAT ** b_array=(FLOAT**)vb_array;
|
||||
FLOAT ** c_array=(FLOAT**)vc_array;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
BLASLONG group_m, group_n, group_k;
|
||||
BLASLONG group_lda, group_ldb, group_ldc;
|
||||
|
||||
blas_arg_t * args_array=NULL;
|
||||
|
||||
int mode=0, group_mode=0;
|
||||
@@ -148,8 +162,6 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CB
|
||||
blasint info;
|
||||
|
||||
void * group_alpha, * group_beta;
|
||||
BLASLONG group_m, group_n, group_k;
|
||||
BLASLONG group_lda, group_ldb, group_ldc;
|
||||
void * group_routine=NULL;
|
||||
#ifdef SMALL_MATRIX_OPT
|
||||
void * group_small_matrix_opt_routine=NULL;
|
||||
@@ -201,7 +213,8 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CB
|
||||
group_transa = -1;
|
||||
group_transb = -1;
|
||||
info = 0;
|
||||
|
||||
|
||||
#if defined(CBLAS)
|
||||
if (order == CblasColMajor) {
|
||||
group_m = m_array[i];
|
||||
group_n = n_array[i];
|
||||
@@ -254,7 +267,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CB
|
||||
group_lda = ldb_array[i];
|
||||
group_ldb = lda_array[i];
|
||||
group_ldc = ldc_array[i];
|
||||
|
||||
|
||||
if (transb_array[i] == CblasNoTrans) group_transa = 0;
|
||||
if (transb_array[i] == CblasTrans) group_transa = 1;
|
||||
#ifndef COMPLEX
|
||||
@@ -273,6 +286,32 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CB
|
||||
if (transa_array[i] == CblasConjNoTrans) group_transb = 2;
|
||||
if (transa_array[i] == CblasConjTrans) group_transb = 3;
|
||||
#endif
|
||||
|
||||
#else
|
||||
group_m = m_array[i];
|
||||
group_n = n_array[i];
|
||||
group_k = k_array[i];
|
||||
|
||||
group_lda = lda_array[i];
|
||||
group_ldb = ldb_array[i];
|
||||
group_ldc = ldc_array[i];
|
||||
|
||||
if (transb_array[i] == 'N') group_transa = 0;
|
||||
if (transb_array[i] == 'T') group_transa = 1;
|
||||
#ifndef COMPLEX
|
||||
if (transb_array[i] == 'C') group_transa = 1;
|
||||
#else
|
||||
if (transb_array[i] == 'C') group_transa = 3;
|
||||
#endif
|
||||
if (transa_array[i] == 'N') group_transb = 0;
|
||||
if (transa_array[i] == 'T') group_transb = 1;
|
||||
#ifndef COMPLEX
|
||||
if (transa_array[i] == 'C') group_transb = 1;
|
||||
#else
|
||||
if (transa_array[i] == 'C') group_transb = 3;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
group_nrowa = group_m;
|
||||
if (group_transa & 1) group_nrowa = group_k;
|
||||
group_nrowb = group_k;
|
||||
@@ -288,7 +327,9 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CB
|
||||
if (group_m < 0) info = 3;
|
||||
if (group_transb < 0) info = 2;
|
||||
if (group_transa < 0) info = 1;
|
||||
#if defined(CBLAS)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (info >= 0) {
|
||||
BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME));
|
||||
@@ -344,13 +385,17 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CB
|
||||
args_array[count].alpha=group_alpha;
|
||||
args_array[count].beta=group_beta;
|
||||
|
||||
#if defined(CBLAS)
|
||||
if (order == CblasColMajor) {
|
||||
args_array[count].a=(a_array[matrix_idx+j]);
|
||||
args_array[count].b=(b_array[matrix_idx+j]);
|
||||
}else if(order == CblasRowMajor){
|
||||
#endif
|
||||
args_array[count].a=(b_array[matrix_idx+j]);
|
||||
args_array[count].b=(a_array[matrix_idx+j]);
|
||||
#if defined(CBLAS)
|
||||
}
|
||||
#endif
|
||||
|
||||
args_array[count].c=(c_array[matrix_idx+j]);
|
||||
|
||||
|
||||
@@ -38,6 +38,17 @@
|
||||
|
||||
#ifndef COMPLEX
|
||||
#define SMP_THRESHOLD_MIN 65536.0
|
||||
#ifdef RNAME
|
||||
#ifdef XDOUBLE
|
||||
#define ERROR_NAME "QGEMMTR"
|
||||
#elif defined(DOUBLE)
|
||||
#define ERROR_NAME "DGEMMTR"
|
||||
#elif defined(BFLOAT16)
|
||||
#define ERROR_NAME "SBGEMMTR"
|
||||
#else
|
||||
#define ERROR_NAME "SGEMMTR"
|
||||
#endif
|
||||
#else
|
||||
#ifdef XDOUBLE
|
||||
#define ERROR_NAME "QGEMMT "
|
||||
#elif defined(DOUBLE)
|
||||
@@ -47,8 +58,18 @@
|
||||
#else
|
||||
#define ERROR_NAME "SGEMMT "
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define SMP_THRESHOLD_MIN 8192.0
|
||||
#ifdef RNAME
|
||||
#ifdef XDOUBLE
|
||||
#define ERROR_NAME "XGEMMTR"
|
||||
#elif defined(DOUBLE)
|
||||
#define ERROR_NAME "ZGEMMTR"
|
||||
#else
|
||||
#define ERROR_NAME "CGEMMTR"
|
||||
#endif
|
||||
#else
|
||||
#ifdef XDOUBLE
|
||||
#define ERROR_NAME "XGEMMT "
|
||||
#elif defined(DOUBLE)
|
||||
@@ -57,6 +78,7 @@
|
||||
#define ERROR_NAME "CGEMMT "
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GEMM_MULTITHREAD_THRESHOLD
|
||||
#define GEMM_MULTITHREAD_THRESHOLD 4
|
||||
@@ -666,5 +688,19 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,
|
||||
|
||||
IDEBUG_END;
|
||||
|
||||
/* transform B back if necessary */
|
||||
#if defined(COMPLEX)
|
||||
if (transb > 1){
|
||||
#ifndef CBLAS
|
||||
IMATCOPY_K_CNC(nrowb, ncolb, (FLOAT)(1.0), (FLOAT)(0.0), b, ldb);
|
||||
#else
|
||||
if (order == CblasColMajor)
|
||||
IMATCOPY_K_CNC(nrowb, ncolb, (FLOAT)(1.0), (FLOAT)(0.0), b, ldb);
|
||||
if (order == CblasRowMajor)
|
||||
IMATCOPY_K_RNC(nrowb, ncolb, (FLOAT)(1.0), (FLOAT)(0.0), b, ldb);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+65
-12
@@ -63,6 +63,70 @@ static int (*gemv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SMP
|
||||
#ifdef DYNAMIC_ARCH
|
||||
extern char* gotoblas_corename(void);
|
||||
#endif
|
||||
|
||||
#if defined(DYNAMIC_ARCH) || defined(NEOVERSEV1)
|
||||
static inline int get_gemv_optimal_nthreads_neoversev1(BLASLONG MN, int ncpu) {
|
||||
#ifdef DOUBLE
|
||||
return (MN < 8100L) ? 1
|
||||
: (MN < 12100L) ? MIN(ncpu, 2)
|
||||
: (MN < 36100L) ? MIN(ncpu, 4)
|
||||
: (MN < 84100L) ? MIN(ncpu, 8)
|
||||
: (MN < 348100L) ? MIN(ncpu, 16)
|
||||
: (MN < 435600L) ? MIN(ncpu, 24)
|
||||
: (MN < 810000L) ? MIN(ncpu, 32)
|
||||
: (MN < 1050625L) ? MIN(ncpu, 40)
|
||||
: ncpu;
|
||||
#else
|
||||
return (MN < 25600L) ? 1
|
||||
: (MN < 63001L) ? MIN(ncpu, 4)
|
||||
: (MN < 459684L) ? MIN(ncpu, 16)
|
||||
: ncpu;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(DYNAMIC_ARCH) || defined(NEOVERSEV2)
|
||||
static inline int get_gemv_optimal_nthreads_neoversev2(BLASLONG MN, int ncpu) {
|
||||
return
|
||||
MN < 24964L ? 1
|
||||
: MN < 65536L ? MIN(ncpu, 8)
|
||||
: MN < 262144L ? MIN(ncpu, 32)
|
||||
: MN < 1638400L ? MIN(ncpu, 64)
|
||||
: ncpu;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int get_gemv_optimal_nthreads(BLASLONG MN) {
|
||||
int ncpu = num_cpu_avail(3);
|
||||
#if defined(_WIN64) && defined(_M_ARM64)
|
||||
if (MN > 100000000L)
|
||||
return num_cpu_avail(4);
|
||||
return 1;
|
||||
#endif
|
||||
#if defined(NEOVERSEV1) && !defined(COMPLEX) && !defined(BFLOAT16)
|
||||
return get_gemv_optimal_nthreads_neoversev1(MN, ncpu);
|
||||
#elif defined(NEOVERSEV2) && !defined(COMPLEX) && !defined(DOUBLE) && !defined(BFLOAT16)
|
||||
return get_gemv_optimal_nthreads_neoversev2(MN, ncpu);
|
||||
#elif defined(DYNAMIC_ARCH) && !defined(COMPLEX) && !defined(BFLOAT16)
|
||||
if (strcmp(gotoblas_corename(), "neoversev1") == 0) {
|
||||
return get_gemv_optimal_nthreads_neoversev1(MN, ncpu);
|
||||
}
|
||||
if (strcmp(gotoblas_corename(), "neoversev2") == 0) {
|
||||
return get_gemv_optimal_nthreads_neoversev2(MN, ncpu);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( MN < 115200L * GEMM_MULTITHREAD_THRESHOLD )
|
||||
return 1;
|
||||
else
|
||||
return num_cpu_avail(2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CBLAS
|
||||
|
||||
void NAME(char *TRANS, blasint *M, blasint *N,
|
||||
@@ -202,13 +266,6 @@ void CNAME(enum CBLAS_ORDER order,
|
||||
|
||||
if (alpha == ZERO) return;
|
||||
|
||||
#if 0
|
||||
/* this optimization causes stack corruption on x86_64 under OSX, Windows and FreeBSD */
|
||||
if (trans == 0 && incx == 1 && incy == 1 && m*n < 2304 *GEMM_MULTITHREAD_THRESHOLD) {
|
||||
GEMV_N(m, n, 0, alpha, a, lda, x, incx, y, incy, NULL);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
IDEBUG_START;
|
||||
|
||||
FUNCTION_PROFILE_START();
|
||||
@@ -225,11 +282,7 @@ void CNAME(enum CBLAS_ORDER order,
|
||||
STACK_ALLOC(buffer_size, FLOAT, buffer);
|
||||
|
||||
#ifdef SMP
|
||||
|
||||
if ( 1L * m * n < 115200L * GEMM_MULTITHREAD_THRESHOLD )
|
||||
nthreads = 1;
|
||||
else
|
||||
nthreads = num_cpu_avail(2);
|
||||
nthreads = get_gemv_optimal_nthreads(1L * m * n);
|
||||
|
||||
if (nthreads == 1) {
|
||||
#endif
|
||||
|
||||
+3
-1
@@ -180,8 +180,10 @@ void CNAME(enum CBLAS_ORDER order,
|
||||
|
||||
#ifdef SMPTEST
|
||||
// Threshold chosen so that speed-up is > 1 on a Xeon E5-2630
|
||||
if(1L * m * n > 2048L * GEMM_MULTITHREAD_THRESHOLD)
|
||||
if(1L * m * n > 20480L * GEMM_MULTITHREAD_THRESHOLD)
|
||||
nthreads = num_cpu_avail(2);
|
||||
else if(1L * m * n > 2048L * GEMM_MULTITHREAD_THRESHOLD)
|
||||
nthreads = MIN(3,num_cpu_avail(2));
|
||||
else
|
||||
nthreads = 1;
|
||||
|
||||
|
||||
+22
-8
@@ -107,21 +107,35 @@ int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv,
|
||||
|
||||
#ifndef PPC440
|
||||
buffer = (FLOAT *)blas_memory_alloc(1);
|
||||
|
||||
|
||||
sa = (FLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A);
|
||||
sb = (FLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
|
||||
#endif
|
||||
|
||||
#ifdef SMP
|
||||
args.common = NULL;
|
||||
#ifndef DOUBLE
|
||||
if (args.m*args.n < 40000)
|
||||
#else
|
||||
if (args.m*args.n < 10000)
|
||||
#endif
|
||||
args.nthreads=1;
|
||||
|
||||
#if defined(_WIN64) && defined(_M_ARM64)
|
||||
#ifdef COMPLEX
|
||||
if (args.m * args.n <= 300)
|
||||
#else
|
||||
if (args.m * args.n <= 500)
|
||||
#endif
|
||||
args.nthreads = 1;
|
||||
else if (args.m * args.n <= 1000)
|
||||
args.nthreads = 4;
|
||||
else
|
||||
args.nthreads = num_cpu_avail(4);
|
||||
args.nthreads = num_cpu_avail(4);
|
||||
#else
|
||||
#ifndef DOUBLE
|
||||
if (args.m * args.n < 40000)
|
||||
#else
|
||||
if (args.m * args.n < 10000)
|
||||
#endif
|
||||
args.nthreads = 1;
|
||||
else
|
||||
args.nthreads = num_cpu_avail(4);
|
||||
#endif
|
||||
|
||||
if (args.nthreads == 1) {
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/***************************************************************************
|
||||
Copyright (c) 2025, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "common.h"
|
||||
|
||||
#if defined(DOUBLE)
|
||||
#define ERROR_NAME "DLAED3"
|
||||
#else
|
||||
#define ERROR_NAME "SLAED3"
|
||||
#endif
|
||||
|
||||
/* ===================================================================== */
|
||||
int NAME(blasint *k, blasint *n, blasint *n1, FLOAT *d,
|
||||
FLOAT *q, blasint *ldq, FLOAT *rho, FLOAT *dlamda,
|
||||
FLOAT *q2, blasint *indx, blasint *ctot, FLOAT *w,
|
||||
FLOAT *s, blasint *Info)
|
||||
{
|
||||
blasint kval, nval, qdim, info;
|
||||
|
||||
qdim = *ldq;
|
||||
kval = *k;
|
||||
nval = *n;
|
||||
|
||||
/* Test the input parameters. */
|
||||
info = 0;
|
||||
if (kval < 0) {
|
||||
info = 1;
|
||||
} else if (nval < kval) {
|
||||
info = 2;
|
||||
} else if (qdim < nval || qdim < 1) {
|
||||
info = 6;
|
||||
}
|
||||
if (info) {
|
||||
BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME) - 1);
|
||||
*Info = - info;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Quick return if possible */
|
||||
|
||||
*Info = 0;
|
||||
if (kval == 0) return 0;
|
||||
|
||||
#ifdef SMP
|
||||
int nthreads = num_cpu_avail(4);
|
||||
|
||||
if (nthreads == 1) {
|
||||
#endif
|
||||
LAED3_SINGLE(k, n, n1, d, q, ldq, rho, dlamda, q2, indx, ctot, w, s, Info);
|
||||
#ifdef SMP
|
||||
} else {
|
||||
LAED3_PARALLEL(k, n, n1, d, q, ldq, rho, dlamda, q2, indx, ctot, w, s, Info);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -127,10 +127,10 @@ int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *In
|
||||
#endif
|
||||
|
||||
#ifdef SMP
|
||||
if (args.n <= 150)
|
||||
args.nthreads = 1;
|
||||
else
|
||||
args.nthreads = num_cpu_avail(4);
|
||||
if (args.n <= 150)
|
||||
args.nthreads = 1;
|
||||
else
|
||||
args.nthreads = num_cpu_avail(4);
|
||||
|
||||
if (args.nthreads == 1) {
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user