Compare commits
938
Commits
v0.3.28
...
gemm_batch
| 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 | ||
|
|
8795fc7985 | ||
|
|
e0c134e1f6 | ||
|
|
9207052d85 | ||
|
|
7f5b703a80 | ||
|
|
20f6114e98 | ||
|
|
f422845b6d | ||
|
|
ce66ffe7bb | ||
|
|
d035e80d33 | ||
|
|
459fa8102b | ||
|
|
0c4b4cd78c | ||
|
|
ed516994d6 | ||
|
|
5527eda561 | ||
|
|
4c1a23673a | ||
|
|
d74eb02954 | ||
|
|
30f7a4120b | ||
|
|
0b9de3ef7d | ||
|
|
c31f148c76 | ||
|
|
20a8e48f25 | ||
|
|
e0748588b8 | ||
|
|
d91d4fa6e9 | ||
|
|
8cc32f5461 | ||
|
|
a588ea90fd | ||
|
|
21013fdb66 | ||
|
|
b67a963412 | ||
|
|
a9eec233d3 | ||
|
|
09e75f1588 | ||
|
|
2891fd8d6d | ||
|
|
0a5dbf13d3 | ||
|
|
69d3541488 | ||
|
|
d0350a08b7 | ||
|
|
05dce05c24 | ||
|
|
8385e02ae1 | ||
|
|
74be676936 | ||
|
|
91d861a0d4 | ||
|
|
f697cfe0d0 | ||
|
|
eda80f436a | ||
|
|
1833e68bee | ||
|
|
c0bf48fbf3 | ||
|
|
f764d76a4a | ||
|
|
5aa1845a43 | ||
|
|
ed114150d1 | ||
|
|
c526b10b68 | ||
|
|
d4addc0688 | ||
|
|
970e48e9e5 | ||
|
|
0be97edd7e | ||
|
|
229efa42ff | ||
|
|
81e1be8d90 | ||
|
|
b6c906f805 | ||
|
|
33b9e5b143 | ||
|
|
6f9b9e2da8 | ||
|
|
afd572511f | ||
|
|
a71041e402 | ||
|
|
9b9c0aa5c9 | ||
|
|
52c7695be1 | ||
|
|
14e68355d2 | ||
|
|
593427c8a1 | ||
|
|
67bbde71e5 | ||
|
|
108bf599ae | ||
|
|
e4f83d4485 | ||
|
|
7fd73a40dc | ||
|
|
14c72d616a | ||
|
|
a182251284 | ||
|
|
ed95791618 | ||
|
|
3c3d1c4849 | ||
|
|
be807c98a6 | ||
|
|
a63282a688 | ||
|
|
2f86913209 | ||
|
|
e9ff70b394 | ||
|
|
85a33326a1 | ||
|
|
6ad793d65e | ||
|
|
0a2d9aaf32 | ||
|
|
9297c46dfb | ||
|
|
c37509c213 | ||
|
|
a1075477c3 | ||
|
|
fff2e214ca | ||
|
|
718fb73bd8 | ||
|
|
73527aab3c | ||
|
|
c1258662db | ||
|
|
36b0fb3aff | ||
|
|
d863dcf83c | ||
|
|
d5e255519e | ||
|
|
df42f79c4c | ||
|
|
17803e7901 | ||
|
|
762fa1afa9 | ||
|
|
6af4e76f31 | ||
|
|
fbf594b62f | ||
|
|
c4c3d9e68a | ||
|
|
0bea1cfd9d | ||
|
|
e6fd629770 | ||
|
|
05fe49ddaf | ||
|
|
64c6c79201 | ||
|
|
5c9417d306 | ||
|
|
5d81e514e4 | ||
|
|
d78fbe425c | ||
|
|
30188a55d1 | ||
|
|
32319a33ac | ||
|
|
37a4ca7e46 | ||
|
|
1c4401ebf1 | ||
|
|
f2be482d43 | ||
|
|
70dddacb9f | ||
|
|
a93d3db34a | ||
|
|
e460512685 | ||
|
|
d3cc8c65ed | ||
|
|
765ad8bcd2 | ||
|
|
48caf2303d | ||
|
|
d00cc400b1 | ||
|
|
229d8a025e | ||
|
|
3368a4e697 | ||
|
|
dd71e4234a | ||
|
|
06ffd411a5 | ||
|
|
41912f9c22 | ||
|
|
765850194e | ||
|
|
c17c19fbcf | ||
|
|
f6416c0e37 | ||
|
|
3b7b74664c | ||
|
|
95a97012e8 | ||
|
|
5540f2121e | ||
|
|
f62519cc87 | ||
|
|
10857c9df4 | ||
|
|
b9f51a5cf7 | ||
|
|
89f02ed394 | ||
|
|
61d5aec7c1 | ||
|
|
5aea097df0 | ||
|
|
72f7b7011c | ||
|
|
0f8ff82592 | ||
|
|
81666de4ef | ||
|
|
230e665bca | ||
|
|
3345007d8f | ||
|
|
5fe983db29 | ||
|
|
5dc4d7dd7e | ||
|
|
4ba471dd5a | ||
|
|
a791912cbb | ||
|
|
1a6ecda398 | ||
|
|
c4e8bac5a5 | ||
|
|
d3b2036d49 | ||
|
|
35334ed2ea | ||
|
|
be19966d3b | ||
|
|
9c5d20187b | ||
|
|
2eaf285de5 | ||
|
|
a8b1705dbd | ||
|
|
5f65846691 | ||
|
|
93eb42fdc8 | ||
|
|
dc905636d1 | ||
|
|
4918beecbe | ||
|
|
0c440f8a27 | ||
|
|
0578a89afd | ||
|
|
57a51d74c9 | ||
|
|
35f2e6afe6 | ||
|
|
f5e6b5b5c9 | ||
|
|
8e8003a2d1 | ||
|
|
71963a7bc4 | ||
|
|
7452af4471 | ||
|
|
82088cb266 | ||
|
|
8481301f1a | ||
|
|
009c1e0387 | ||
|
|
760a5371f3 | ||
|
|
3a63bbabd1 | ||
|
|
c520ed1916 | ||
|
|
0b3db03d4b | ||
|
|
a0131e56e0 | ||
|
|
bfaf5b9ea4 | ||
|
|
18014b04c8 | ||
|
|
9db51f790a | ||
|
|
e334b79b47 | ||
|
|
4060dd43e3 | ||
|
|
d04686acd8 | ||
|
|
2a290dfc2c | ||
|
|
926e56e389 | ||
|
|
2e2f952bfb | ||
|
|
cea9df3643 | ||
|
|
3e7e312d7d | ||
|
|
10cf06dce1 | ||
|
|
760bf7aa37 | ||
|
|
2057cd75fd | ||
|
|
50da5c2b34 | ||
|
|
24c5152fbd | ||
|
|
2332ea7e7a | ||
|
|
794f75a8f7 | ||
|
|
87a18154ce | ||
|
|
453b9e4886 | ||
|
|
d3272e51eb | ||
|
|
c634114c8a | ||
|
|
598bd21991 | ||
|
|
c9d1a3b912 | ||
|
|
c3e7d08fb4 | ||
|
|
0cf656fd3e | ||
|
|
24b5ccaf4b | ||
|
|
3b2421cba0 | ||
|
|
012fe4da36 | ||
|
|
d90ee00f85 | ||
|
|
668e28adc4 | ||
|
|
fa880ab1cf | ||
|
|
7822ae9617 | ||
|
|
b8bc2a752e | ||
|
|
0667cf6c92 | ||
|
|
2718b37fed | ||
|
|
73c6a28073 | ||
|
|
f66e6d32c2 | ||
|
|
a8bb105ed6 | ||
|
|
0e6a2cc93c | ||
|
|
815cb24944 | ||
|
|
ac736820d7 | ||
|
|
8f595382c4 | ||
|
|
cb48505251 | ||
|
|
79f4bbd4cd | ||
|
|
72461f1c8c | ||
|
|
020cce1068 | ||
|
|
b6ec73e77c | ||
|
|
8a0cd5fcef | ||
|
|
4dba6ce6ea | ||
|
|
a93ec74e95 | ||
|
|
c4bb4e74fc | ||
|
|
86720778ef | ||
|
|
016bdb9b0b | ||
|
|
ffaa5765a4 | ||
|
|
a93897276b | ||
|
|
3fc1225dd6 | ||
|
|
33078d11e4 | ||
|
|
15a57598f5 | ||
|
|
ab71a1edf2 | ||
|
|
bb31bbef52 | ||
|
|
b37129341b | ||
|
|
acf6cab304 | ||
|
|
15edb441bf | ||
|
|
457d1c6972 | ||
|
|
6a60eb1a02 | ||
|
|
8483a71169 | ||
|
|
22628f1a69 | ||
|
|
27ed6da331 | ||
|
|
7018c1b001 | ||
|
|
a659f40fe1 | ||
|
|
c979c1d948 | ||
|
|
a47b3c8867 | ||
|
|
2391dc1c0f | ||
|
|
36bd3eeddf | ||
|
|
f8e113f27b | ||
|
|
a53a197934 | ||
|
|
3184b7f209 | ||
|
|
0082240044 | ||
|
|
1d51ca5798 | ||
|
|
c8f53b85ce | ||
|
|
18a23c23f7 | ||
|
|
5a79446bdb | ||
|
|
7ba6591ff2 | ||
|
|
550bc77832 | ||
|
|
e0ad20f72b | ||
|
|
e4bc5e4718 | ||
|
|
b89fb9632f | ||
|
|
e52d9b4cf1 | ||
|
|
dbd83762f9 | ||
|
|
9762464718 | ||
|
|
0b7fb5c791 | ||
|
|
bee123e8e3 | ||
|
|
7ac5b9011f | ||
|
|
3ab8b1408e | ||
|
|
2c3b87a082 | ||
|
|
73c1882129 | ||
|
|
bc0691a556 | ||
|
|
b0346e72f4 | ||
|
|
9c707dc6b9 | ||
|
|
9783dd07ab | ||
|
|
0dfe42d62a | ||
|
|
d6bb8dcfd1 | ||
|
|
8a1710dd0d | ||
|
|
c9e92348a6 | ||
|
|
d9f368dfe6 | ||
|
|
722e4ae07a | ||
|
|
a6b7751881 | ||
|
|
9ac0fb0111 | ||
|
|
624e9d110e | ||
|
|
d714013ab9 | ||
|
|
7c4f3638fd | ||
|
|
915a6d6e44 | ||
|
|
7ec3c16d82 | ||
|
|
54afc24e4d | ||
|
|
b4495a8fb8 | ||
|
|
68eefe60b9 | ||
|
|
4f00f02567 | ||
|
|
f817f26062 | ||
|
|
a492181665 | ||
|
|
de421b7764 | ||
|
|
edaf5933c4 | ||
|
|
71131406ae | ||
|
|
7cc00f68c9 | ||
|
|
e238a68c03 | ||
|
|
f10d47c4bb | ||
|
|
32095b0cbb | ||
|
|
a1073f5eed | ||
|
|
fa77561396 | ||
|
|
176107d23a | ||
|
|
0228d36211 | ||
|
|
7087b0a7d0 | ||
|
|
30af9278dc | ||
|
|
48698b2b1d | ||
|
|
c8788208c8 | ||
|
|
d7c0d87cd1 | ||
|
|
eb6f3a05ef | ||
|
|
fb287d17fc | ||
|
|
8ab6245771 | ||
|
|
df19375560 | ||
|
|
05aa63e738 | ||
|
|
c9ce37d527 | ||
|
|
89a12fa083 | ||
|
|
92f7a2dc3e | ||
|
|
969bb949b1 | ||
|
|
fca86e359c | ||
|
|
7947970f9d | ||
|
|
60c1519e01 | ||
|
|
c8313d9d80 | ||
|
|
b588e922a1 | ||
|
|
4178905fa7 | ||
|
|
5f70e245a2 | ||
|
|
383e0b133e | ||
|
|
869a169c57 | ||
|
|
72216d28c2 | ||
|
|
2f142ee857 | ||
|
|
39fd29f1de | ||
|
|
8541b25e1d | ||
|
|
76227e2948 | ||
|
|
4894c54055 | ||
|
|
485027563e | ||
|
|
89702e1f4a | ||
|
|
77f85c7c00 | ||
|
|
868aa857bc | ||
|
|
b1802f4dc8 | ||
|
|
f61930eb11 | ||
|
|
dfba3f8841 | ||
|
|
7129a64d87 | ||
|
|
49080b631e | ||
|
|
e05d98d00a | ||
|
|
3ee9e9d8d0 | ||
|
|
dd71df8fab | ||
|
|
a8d6b0219a | ||
|
|
d24b3cf393 | ||
|
|
a0aeba631d | ||
|
|
eba8615c11 | ||
|
|
bc80e7f02d | ||
|
|
94c9e0b7ad | ||
|
|
ed0321563a | ||
|
|
fd033467ac | ||
|
|
1b8e40874e | ||
|
|
4944148e66 | ||
|
|
a388c4b834 | ||
|
|
f24b521709 | ||
|
|
2d84ed7e76 | ||
|
|
083faf7556 | ||
|
|
c23897f585 | ||
|
|
0d8ee96f1e | ||
|
|
b80671d896 | ||
|
|
6452f7b46d | ||
|
|
75472b830a | ||
|
|
ca7777de18 | ||
|
|
f6469e21bc | ||
|
|
31226740d6 | ||
|
|
ef94b96530 | ||
|
|
23b5d66a86 | ||
|
|
20bdb65882 | ||
|
|
b1737698db | ||
|
|
e5525036e7 | ||
|
|
fd52d09490 | ||
|
|
35dd625adf | ||
|
|
d8f740791a | ||
|
|
73e13b0273 | ||
|
|
824306baab | ||
|
|
7ca835a82c | ||
|
|
a87c4d26dd | ||
|
|
1265eee85c | ||
|
|
cd3945b998 | ||
|
|
cbd321aecb | ||
|
|
cb38d666da | ||
|
|
fe0a69e308 | ||
|
|
f49371c1ba | ||
|
|
1ef9f24b39 | ||
|
|
5b07ec643c | ||
|
|
1a7b8c650d | ||
|
|
e2334d0218 | ||
|
|
66622de36d | ||
|
|
ba47c7f4f3 | ||
|
|
c92104a605 |
+13
-20
@@ -58,8 +58,8 @@ task:
|
||||
- export VALID_ARCHS="i386 x86_64"
|
||||
- xcrun --sdk macosx --show-sdk-path
|
||||
- xcodebuild -version
|
||||
- export CC=/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -arch x86_64"
|
||||
- export CC=/Applications/Xcode_16.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_16.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -arch x86_64"
|
||||
- make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
|
||||
always:
|
||||
config_artifacts:
|
||||
@@ -78,8 +78,8 @@ task:
|
||||
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
|
||||
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
- export CC=/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk -arch arm64 -miphoneos-version-min=10.0"
|
||||
- export CC=/Applications/Xcode_16.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_16.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.4.sdk -arch arm64 -miphoneos-version-min=10.0"
|
||||
- xcrun --sdk iphoneos --show-sdk-path
|
||||
- ls -l /Applications
|
||||
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
|
||||
@@ -89,20 +89,13 @@ task:
|
||||
type: text/plain
|
||||
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
|
||||
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
task:
|
||||
name: AppleM1/LLVM armv7-androidndk xbuild
|
||||
compile_script:
|
||||
- brew install android-ndk
|
||||
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
|
||||
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
- ls /System/Volumes/Data/opt/homebrew
|
||||
- ls -l /System/Volumes/Data/opt/homebrew/Caskroom/android-ndk
|
||||
- find /System/Volumes/Data/opt/homebrew -name "armv7a-linux-androideabi*-ranlib"
|
||||
- #export CC=/Applications/Xcode-13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- #export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk -arch arm64 -miphoneos-version-min=10.0"
|
||||
- export CC=/System/Volumes/Data/opt/homebrew/Caskroom/android-ndk/26d/AndroidNDK*.app/Contents/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
|
||||
- brew install --cask android-ndk
|
||||
- export ANDROID_NDK_HOME="/opt/homebrew/share/android-ndk"
|
||||
- export CC=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
|
||||
- make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
|
||||
always:
|
||||
config_artifacts:
|
||||
@@ -132,9 +125,9 @@ task:
|
||||
- make USE_OPENMP=1
|
||||
|
||||
FreeBSD_task:
|
||||
name: FreeBSD-gcc12
|
||||
name: FreeBSD-gcc
|
||||
freebsd_instance:
|
||||
image_family: freebsd-13-3
|
||||
image_family: freebsd-14-2
|
||||
install_script:
|
||||
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
|
||||
compile_script:
|
||||
@@ -143,9 +136,9 @@ FreeBSD_task:
|
||||
|
||||
|
||||
FreeBSD_task:
|
||||
name: freebsd-gcc12-ilp64
|
||||
name: freebsd-gcc-ilp64
|
||||
freebsd_instance:
|
||||
image_family: freebsd-13-3
|
||||
image_family: freebsd-14-2
|
||||
install_script:
|
||||
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
|
||||
compile_script:
|
||||
@@ -155,7 +148,7 @@ FreeBSD_task:
|
||||
FreeBSD_task:
|
||||
name: FreeBSD-clang-openmp
|
||||
freebsd_instance:
|
||||
image_family: freebsd-13-3
|
||||
image_family: freebsd-14-2
|
||||
install_script:
|
||||
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
|
||||
- ln -s /usr/local/lib/gcc13/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
|
||||
|
||||
@@ -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: |
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install MkDocs and doc theme packages
|
||||
run: pip install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin
|
||||
run: pip install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-mermaid2-plugin
|
||||
|
||||
- name: Build docs site
|
||||
run: mkdocs build
|
||||
|
||||
@@ -43,11 +43,13 @@ jobs:
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gfortran cmake ccache libtinfo5
|
||||
sudo apt-get install -y gfortran cmake ccache
|
||||
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
|
||||
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
|
||||
brew reinstall gcc
|
||||
brew install coreutils cmake ccache
|
||||
brew install coreutils ccache
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
exit 1
|
||||
@@ -87,6 +89,14 @@ jobs:
|
||||
echo "max_size = 300M" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
|
||||
- name: Add gfortran runtime to link path
|
||||
if: matrix.build == 'make' && runner.os == 'macOS'
|
||||
run: |
|
||||
GFORTRAN_LIBDIR=$(gfortran -print-file-name=libgfortran.dylib | xargs dirname)
|
||||
echo "Using gfortran runtime in $GFORTRAN_LIBDIR"
|
||||
# Preserve whatever LDFLAGS may already contain
|
||||
echo "LDFLAGS=${LDFLAGS:+$LDFLAGS }-L$GFORTRAN_LIBDIR" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
@@ -158,7 +168,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
msystem: [UCRT64, MINGW32, CLANG64, CLANG32]
|
||||
msystem: [UCRT64, MINGW32, CLANG64]
|
||||
idx: [int32, int64]
|
||||
build-type: [Release]
|
||||
include:
|
||||
@@ -174,14 +184,6 @@ jobs:
|
||||
idx: int32
|
||||
target-prefix: mingw-w64-clang-x86_64
|
||||
fc-pkg: fc
|
||||
# Compiling with Flang 16 seems to cause test errors on machines
|
||||
# with AVX512 instructions. Revisit after MSYS2 distributes Flang 17.
|
||||
no-avx512-flags: -DNO_AVX512=1
|
||||
- msystem: CLANG32
|
||||
idx: int32
|
||||
target-prefix: mingw-w64-clang-i686
|
||||
fc-pkg: cc
|
||||
c-lapack-flags: -DC_LAPACK=ON
|
||||
- msystem: UCRT64
|
||||
idx: int64
|
||||
idx64-flags: -DBINARY=64 -DINTERFACE64=1
|
||||
@@ -192,9 +194,6 @@ jobs:
|
||||
idx64-flags: -DBINARY=64 -DINTERFACE64=1
|
||||
target-prefix: mingw-w64-clang-x86_64
|
||||
fc-pkg: fc
|
||||
# Compiling with Flang 16 seems to cause test errors on machines
|
||||
# with AVX512 instructions. Revisit after MSYS2 distributes Flang 17.
|
||||
no-avx512-flags: -DNO_AVX512=1
|
||||
- msystem: UCRT64
|
||||
idx: int32
|
||||
target-prefix: mingw-w64-ucrt-x86_64
|
||||
@@ -203,8 +202,6 @@ jobs:
|
||||
exclude:
|
||||
- msystem: MINGW32
|
||||
idx: int64
|
||||
- msystem: CLANG32
|
||||
idx: int64
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -280,8 +277,6 @@ jobs:
|
||||
-DNUM_THREADS=64 \
|
||||
-DTARGET=CORE2 \
|
||||
${{ matrix.idx64-flags }} \
|
||||
${{ matrix.c-lapack-flags }} \
|
||||
${{ matrix.no-avx512-flags }} \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_Fortran_COMPILER_LAUNCHER=ccache \
|
||||
..
|
||||
@@ -369,3 +364,23 @@ jobs:
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
make -j$(nproc) HOSTCC="ccache gcc" CC="ccache ${{ matrix.triple }}-gcc" FC="ccache ${{ matrix.triple }}-gfortran" ARCH=${{ matrix.target }} ${{ matrix.opts }}
|
||||
|
||||
neoverse_build:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc gfortran make
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
make -j${nproc}
|
||||
make -j${nproc} lapack-test
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: harmonyos
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
OHOS_NDK_CMAKE: $GITHUB_WORKSPACE/ohos-sdk/linux/native/build-tools/cmake/bin/cmake
|
||||
COMMON_CMAKE_OPTIONS: |
|
||||
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/ohos-sdk/linux/native/build/cmake/ohos.toolchain.cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=install \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: ndk-install
|
||||
run: |
|
||||
wget https://repo.huaweicloud.com/harmonyos/os/4.1.1-Release/ohos-sdk-windows_linux-public.tar.gz
|
||||
tar -xf ohos-sdk-windows_linux-public.tar.gz
|
||||
cd ohos-sdk/linux
|
||||
unzip -q native-linux-x64-4.1.7.8-Release.zip
|
||||
cd -
|
||||
- name: build-armv8
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
${{ env.OHOS_NDK_CMAKE }} ${{ env.COMMON_CMAKE_OPTIONS }} -DOHOS_ARCH="arm64-v8a" \
|
||||
-DTARGET=ARMV8 -DNOFORTRAN=1 ..
|
||||
${{ env.OHOS_NDK_CMAKE }} --build . -j $(nproc)
|
||||
|
||||
@@ -9,22 +9,31 @@ concurrency:
|
||||
jobs:
|
||||
TEST:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: LOONGSONGENERIC
|
||||
triple: loongarch64-unknown-linux-gnu
|
||||
triple: loongarch64-linux-gnu
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC
|
||||
- target: LOONGSON3R5
|
||||
triple: loongarch64-unknown-linux-gnu
|
||||
triple: loongarch64-linux-gnu
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5
|
||||
- target: LOONGSON2K1000
|
||||
triple: loongarch64-unknown-linux-gnu
|
||||
triple: loongarch64-linux-gnu
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000
|
||||
- target: LA64_GENERIC
|
||||
triple: loongarch64-linux-gnu
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC
|
||||
- target: LA464
|
||||
triple: loongarch64-linux-gnu
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464
|
||||
- target: LA264
|
||||
triple: loongarch64-linux-gnu
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264
|
||||
- target: DYNAMIC_ARCH
|
||||
triple: loongarch64-unknown-linux-gnu
|
||||
triple: loongarch64-linux-gnu
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC
|
||||
|
||||
steps:
|
||||
@@ -33,33 +42,9 @@ jobs:
|
||||
|
||||
- name: Install APT deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache
|
||||
|
||||
- name: Download and install loongarch64-toolchain
|
||||
run: |
|
||||
wget https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/download/8.1/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz
|
||||
#wget https://github.com/loongson/build-tools/releases/download/2023.08.08/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz
|
||||
tar -xf CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz -C /opt
|
||||
|
||||
- name: Checkout qemu
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: qemu/qemu
|
||||
path: qemu
|
||||
ref: master
|
||||
|
||||
- name: Install qemu
|
||||
run: |
|
||||
cd qemu
|
||||
./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=loongarch64-linux-user --disable-system --static
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
- name: Set env
|
||||
run: |
|
||||
echo "LD_LIBRARY_PATH=/opt/cross-tools/target/usr/lib64:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
|
||||
echo "PATH=$GITHUB_WORKSPACE:/opt/cross-tools/bin:$PATH" >> $GITHUB_ENV
|
||||
sudo apt-get update && \
|
||||
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache qemu-user-static \
|
||||
gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu gfortran-14-loongarch64-linux-gnu
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
@@ -80,54 +65,55 @@ jobs:
|
||||
- name: Disable utest dsdot:dsdot_n_1
|
||||
run: |
|
||||
echo -n > utest/test_dsdot.c
|
||||
echo "Due to the qemu versions 7.2 causing utest cases to fail,"
|
||||
echo "Due to the current version of qemu causing utest cases to fail,"
|
||||
echo "the utest dsdot:dsdot_n_1 have been temporarily disabled."
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: make CC='ccache ${{ matrix.triple }}-gcc -static' FC='ccache ${{ matrix.triple }}-gfortran -static' ${{ matrix.opts }} HOSTCC='ccache gcc' -j$(nproc)
|
||||
run: |
|
||||
make CC='ccache ${{ matrix.triple }}-gcc-14 -static' FC='ccache ${{ matrix.triple }}-gfortran-14 -static' \
|
||||
RANLIB='ccache ${{ matrix.triple }}-gcc-ranlib-14' ${{ matrix.opts }} HOSTCC='ccache gcc' -j$(nproc)
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
|
||||
qemu-loongarch64 ./utest/openblas_utest
|
||||
qemu-loongarch64 ./utest/openblas_utest_ext
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat2 < ./ctest/sin2
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat2 < ./ctest/din2
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat2 < ./ctest/cin2
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat2 < ./ctest/zin2
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xscblat3 < ./ctest/sin3
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xdcblat3 < ./ctest/din3
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xccblat3 < ./ctest/cin3
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./ctest/xzcblat3 < ./ctest/zin3
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat1
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat1
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat1
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat1
|
||||
qemu-loongarch64-static ./utest/openblas_utest
|
||||
qemu-loongarch64-static ./utest/openblas_utest_ext
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat2 < ./ctest/sin2
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat2 < ./ctest/din2
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat2 < ./ctest/cin2
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat2 < ./ctest/zin2
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat3 < ./ctest/sin3
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat3 < ./ctest/din3
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat3 < ./ctest/cin3
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xzcblat3 < ./ctest/zin3
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat1
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat1
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat1
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat1
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat1
|
||||
rm -f ./test/?BLAT2.SUMM
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat2 < ./test/sblat2.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat2 < ./test/dblat2.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat2 < ./test/cblat2.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat2 < ./test/zblat2.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat2 < ./test/sblat2.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat2 < ./test/dblat2.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat2 < ./test/cblat2.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat2 < ./test/zblat2.dat
|
||||
rm -f ./test/?BLAT2.SUMM
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat2 < ./test/sblat2.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat2 < ./test/dblat2.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat2 < ./test/cblat2.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat2 < ./test/zblat2.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat2 < ./test/sblat2.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat2 < ./test/dblat2.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat2 < ./test/cblat2.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat2 < ./test/zblat2.dat
|
||||
rm -f ./test/?BLAT3.SUMM
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/sblat3 < ./test/sblat3.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/dblat3 < ./test/dblat3.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/cblat3 < ./test/cblat3.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64 ./test/zblat3 < ./test/zblat3.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/sblat3 < ./test/sblat3.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/dblat3 < ./test/dblat3.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/cblat3 < ./test/cblat3.dat
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 qemu-loongarch64-static ./test/zblat3 < ./test/zblat3.dat
|
||||
rm -f ./test/?BLAT3.SUMM
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/sblat3 < ./test/sblat3.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/dblat3 < ./test/dblat3.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/cblat3 < ./test/cblat3.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64 ./test/zblat3 < ./test/zblat3.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/sblat3 < ./test/sblat3.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/dblat3 < ./test/dblat3.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/cblat3 < ./test/cblat3.dat
|
||||
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./test/zblat3 < ./test/zblat3.dat
|
||||
|
||||
@@ -20,6 +20,12 @@ jobs:
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5
|
||||
- target: LOONGSON2K1000
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000
|
||||
- target: LA64_GENERIC
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC
|
||||
- target: LA464
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464
|
||||
- target: LA264
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264
|
||||
- target: DYNAMIC_ARCH
|
||||
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC
|
||||
|
||||
@@ -29,13 +35,13 @@ jobs:
|
||||
|
||||
- name: Install libffi6
|
||||
run: |
|
||||
wget http://ftp.ca.debian.org/debian/pool/main/libf/libffi/libffi6_3.2.1-9_amd64.deb
|
||||
wget https://download.nvidia.com/cumulus/apt.cumulusnetworks.com/pool/upstream/libf/libffi/libffi6_3.2.1-9_amd64.deb
|
||||
sudo dpkg -i libffi6_3.2.1-9_amd64.deb
|
||||
|
||||
- name: Install APT deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache
|
||||
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache libglib2.0-dev
|
||||
|
||||
- name: Download and install loongarch64-toolchain
|
||||
run: |
|
||||
|
||||
@@ -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: |
|
||||
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
mv *.bottle.tar.gz bottles
|
||||
|
||||
- name: Upload bottle
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openblas--HEAD.catalina.bottle.tar.gz
|
||||
path: bottles
|
||||
|
||||
@@ -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
|
||||
|
||||
+118
-26
@@ -2,13 +2,14 @@
|
||||
## Author: Hank Anderson <hank@statease.com>
|
||||
##
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.5)
|
||||
cmake_minimum_required(VERSION 3.16.0)
|
||||
|
||||
set (CMAKE_ASM_SOURCE_FILE_EXTENSIONS "S")
|
||||
project(OpenBLAS C ASM)
|
||||
|
||||
set(OpenBLAS_MAJOR_VERSION 0)
|
||||
set(OpenBLAS_MINOR_VERSION 3)
|
||||
set(OpenBLAS_PATCH_VERSION 28)
|
||||
set(OpenBLAS_PATCH_VERSION 30.dev)
|
||||
|
||||
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
|
||||
|
||||
@@ -20,6 +21,8 @@ include(CMakePackageConfigHelpers)
|
||||
#######
|
||||
option(BUILD_WITHOUT_LAPACK "Do not build LAPACK and LAPACKE (Only BLAS or CBLAS)" OFF)
|
||||
|
||||
option(BUILD_WITHOUT_LAPACKE "Do not build the C interface to LAPACK)" OFF)
|
||||
|
||||
option(BUILD_LAPACK_DEPRECATED "When building LAPACK, include also some older, deprecated routines" ON)
|
||||
|
||||
set(LAPACK_STRLEN "" CACHE STRING "When building LAPACK, use this type (e.g. \"int\") for character lengths (defaults to size_t)")
|
||||
@@ -59,6 +62,7 @@ option(CPP_THREAD_SAFETY_TEST "Run a massively parallel DGEMM test to confirm th
|
||||
|
||||
option(CPP_THREAD_SAFETY_GEMV "Run a massively parallel DGEMV test to confirm thread safety of the library (requires OpenMP)" OFF)
|
||||
option(BUILD_STATIC_LIBS "Build static library" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||
if(NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
|
||||
set(BUILD_STATIC_LIBS ON CACHE BOOL "Build static library" FORCE)
|
||||
endif()
|
||||
@@ -74,12 +78,27 @@ set(SYMBOLPREFIX "" CACHE STRING "Add a prefix to all exported symbol names in
|
||||
|
||||
set(SYMBOLSUFFIX "" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" )
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows" AND BUILD_SHARED_LIBS AND NOT ("${SYMBOLPREFIX}${SYMBOLSUFFIX}" STREQUAL ""))
|
||||
set (DELETE_STATIC_LIBS "")
|
||||
if (NOT BUILD_STATIC_LIBS)
|
||||
message (STATUS "forcing build of a temporary static library for symbol renaming")
|
||||
set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared library" FORCE)
|
||||
set (BUILD_STATIC_LIBS ON CACHE BOOL "Build static library" FORCE)
|
||||
set (DELETE_STATIC_LIBS file (REMOVE $<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.lib))
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
|
||||
#######
|
||||
if(BUILD_WITHOUT_LAPACK)
|
||||
set(NO_LAPACK 1)
|
||||
set(NO_LAPACKE 1)
|
||||
endif()
|
||||
|
||||
if (BUILD_WITHOUT_LAPACKE)
|
||||
set(NO_LAPACKE 1)
|
||||
endif()
|
||||
|
||||
if(BUILD_WITHOUT_CBLAS)
|
||||
set(NO_CBLAS 1)
|
||||
endif()
|
||||
@@ -105,7 +124,12 @@ message(WARNING "CMake support is experimental. It does not yet support all buil
|
||||
include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
|
||||
include("${PROJECT_SOURCE_DIR}/cmake/system.cmake")
|
||||
|
||||
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE})
|
||||
string(FIND "${LIBNAMESUFFIX}" "${SUFFIX64_UNDERSCORE}" HAVE64)
|
||||
if (${HAVE64} GREATER -1)
|
||||
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX})
|
||||
else ()
|
||||
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE})
|
||||
endif ()
|
||||
|
||||
set(BLASDIRS interface driver/level2 driver/level3 driver/others)
|
||||
|
||||
@@ -128,6 +152,9 @@ endif ()
|
||||
if (NOT DEFINED BUILD_BFLOAT16)
|
||||
set (BUILD_BFLOAT16 false)
|
||||
endif ()
|
||||
if (NOT DEFINED BUILD_HFLOAT16)
|
||||
set (BUILD_HFLOAT16 false)
|
||||
endif ()
|
||||
# set which float types we want to build for
|
||||
if (NOT DEFINED BUILD_SINGLE AND NOT DEFINED BUILD_DOUBLE AND NOT DEFINED BUILD_COMPLEX AND NOT DEFINED BUILD_COMPLEX16)
|
||||
# if none are defined, build for all
|
||||
@@ -219,6 +246,12 @@ endif ()
|
||||
# add objects to the openblas lib
|
||||
if(NOT NO_LAPACK)
|
||||
add_library(LAPACK_OVERRIDES OBJECT ${LA_SOURCES})
|
||||
if (USE_OPENMP AND (NOT NOFORTRAN))
|
||||
# Disable OpenMP for LAPACK Fortran codes on Windows.
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(LAPACK_OVERRIDES OpenMP::OpenMP_Fortran)
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND TARGET_OBJS "$<TARGET_OBJECTS:LAPACK_OVERRIDES>")
|
||||
endif()
|
||||
if(NOT NO_LAPACKE)
|
||||
@@ -258,27 +291,61 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "AIX|Android|Linux|FreeBSD|OpenBSD|NetBSD|Drago
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (APPLE AND BUILD_SHARED_LIBS)
|
||||
set(CMAKE_MACOSX_RPATH ON)
|
||||
if (USE_OPENMP)
|
||||
if(BUILD_STATIC_LIBS)
|
||||
if(NOFORTRAN)
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_static OpenMP::OpenMP_C)
|
||||
else()
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_static OpenMP::OpenMP_C OpenMP::OpenMP_Fortran)
|
||||
endif()
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
if(NOFORTRAN)
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_shared OpenMP::OpenMP_C)
|
||||
else()
|
||||
target_link_libraries(${OpenBLAS_LIBNAME}_shared OpenMP::OpenMP_C OpenMP::OpenMP_Fortran)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Seems that this hack doesn't required since macOS 11 Big Sur
|
||||
if (APPLE AND BUILD_SHARED_LIBS AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 20)
|
||||
set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
if (NOT NOFORTRAN)
|
||||
set (CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
set (CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' "
|
||||
"sh -c 'echo \"\" | ${CMAKE_Fortran_COMPILER} -o dummy.o -c -x f95-cpp-input - '"
|
||||
"sh -c '${CMAKE_Fortran_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,libopenblas.a -Wl,-noall_load dummy.o -o ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib'"
|
||||
"sh -c 'ls -l ${CMAKE_BINARY_DIR}/lib'")
|
||||
else ()
|
||||
set (CMAKE_C_CREATE_SHARED_LIBRARY
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' "
|
||||
"sh -c '${CMAKE_C_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,libopenblas.a -Wl,-noall_load -o ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib'")
|
||||
endif ()
|
||||
# Fix "Argument list too long" for macOS with POWERPC or Intel CPUs
|
||||
if(APPLE AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64"))
|
||||
# Use response files
|
||||
set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
# Always build static library first
|
||||
if(BUILD_STATIC_LIBS)
|
||||
set(STATIC_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${OpenBLAS_LIBNAME}.a")
|
||||
else()
|
||||
add_library(${OpenBLAS_LIBNAME}_static STATIC ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
|
||||
set(STATIC_PATH "lib${OpenBLAS_LIBNAME}.a")
|
||||
endif()
|
||||
set(CREATE_STATIC_LIBRARY_COMMAND
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/${OpenBLAS_LIBNAME}_static.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru ${STATIC_PATH} && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs ${STATIC_PATH} ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' ")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_dependencies(${OpenBLAS_LIBNAME}_shared ${OpenBLAS_LIBNAME}_static)
|
||||
set(SHARED_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib")
|
||||
endif()
|
||||
if(USE_OPENMP)
|
||||
get_target_property(OMP_LIB OpenMP::OpenMP_C INTERFACE_LINK_LIBRARIES)
|
||||
else()
|
||||
set(OMP_LIB "")
|
||||
endif()
|
||||
if(NOT NOFORTRAN)
|
||||
set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
set(CMAKE_Fortran_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
||||
"sh -c 'echo \"\" | ${CMAKE_Fortran_COMPILER} -o dummy.o -c -x f95-cpp-input - '"
|
||||
"sh -c '${CMAKE_Fortran_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,${STATIC_PATH} dummy.o -o ${SHARED_PATH} ${OMP_LIB}'")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_C_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_C_CREATE_SHARED_LIBRARY
|
||||
"sh -c '${CMAKE_C_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,${STATIC_PATH} -o ${SHARED_PATH} ${OMP_LIB}'")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Handle MSVC exports
|
||||
@@ -363,7 +430,7 @@ if (BUILD_SHARED_LIBS AND BUILD_RELAPACK)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
|
||||
if (BUILD_SHARED_LIBS OR DELETE_STATIC_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
|
||||
if (NOT DEFINED ARCH)
|
||||
set(ARCH_IN "x86_64")
|
||||
else()
|
||||
@@ -451,20 +518,44 @@ if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
|
||||
else ()
|
||||
set (BZ 0)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||
if (CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
set (CRTLIB msvcrtd)
|
||||
set (PDBOPT -debug -pdb:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.pdb)
|
||||
set (PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||
else ()
|
||||
set (CRTLIB msvcrt)
|
||||
set (PDBOPT "")
|
||||
endif()
|
||||
#if (USE_PERL)
|
||||
message(STATUS "adding postbuild instruction to rename syms")
|
||||
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_static POST_BUILD
|
||||
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol.pl "win2k" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" "${SYMBOLPREFIX}" "${SYMBOLSUFFIX}" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/renamesyms.def
|
||||
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR} -I${PROJECT_BINARY_DIR} -c -o ${PROJECT_BINARY_DIR}/dllinit.o ${PROJECT_SOURCE_DIR}/exports/dllinit.c
|
||||
COMMAND lld-link -nodefaultlib:libcmt -defaultlib:${CRTLIB} ${CMAKE_LINKER_FLAGS} -errorlimit:0 -def:${PROJECT_BINARY_DIR}/renamesyms.def ${PROJECT_BINARY_DIR}/dllinit.o $<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -wholearchive:$<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -dll -out:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll -implib:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll.a ${PDBOPT}
|
||||
#COMMAND lld-link -nodefaultlib:libcmt -defaultlib:msvcrt ${CMAKE_LINKER_FLAGS} -errorlimit:0 -def:${PROJECT_BINARY_DIR}/renamesyms.def ${PROJECT_BINARY_DIR}/dllinit.o $<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -wholearchive:$<TARGET_FILE:${OpenBLAS_LIBNAME}_static> -dll -out:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll -implib:$<TARGET_FILE_DIR:${OpenBLAS_LIBNAME}_static>/${OpenBLAS_LIBNAME}.dll.a
|
||||
${REMOVE_STATIC_LIB} VERBATIM
|
||||
)
|
||||
#endif ()
|
||||
else ()
|
||||
if (NOT USE_PERL)
|
||||
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_shared POST_BUILD
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
|
||||
COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
|
||||
COMMAND sh ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
|
||||
COMMAND objcopy --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/${OpenBLAS_LIBNAME}.so
|
||||
COMMENT "renaming symbols"
|
||||
)
|
||||
else()
|
||||
add_custom_command(TARGET ${OpenBLAS_LIBNAME}_shared POST_BUILD
|
||||
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol.pl "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BLD}" "${BBF16}" "${BS}" "${BD}" "${BC}" "${BZ}" > ${PROJECT_BINARY_DIR}/objcopy.def
|
||||
COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
|
||||
COMMAND objcopy --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
|
||||
COMMENT "renaming symbols"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_BENCHMARKS)
|
||||
#find_package(OpenMP REQUIRED)
|
||||
@@ -635,3 +726,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
|
||||
install(EXPORT "${PN}${SUFFIX64}Targets"
|
||||
NAMESPACE "${PN}${SUFFIX64}::"
|
||||
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
* Chris Sidebottom <chris.sidebottom@arm.com>
|
||||
* Optimizations and other improvements targeting AArch64
|
||||
|
||||
* Annop Wongwathanarat <annop.wongwathanarat@arm.com>
|
||||
* Optimizations and other improvements targeting AArch64
|
||||
|
||||
## Previous Developers
|
||||
|
||||
* Zaheer Chothia <zaheer.chothia@gmail.com>
|
||||
@@ -226,3 +229,41 @@ In chronological order:
|
||||
|
||||
* Dirreke <https://github.com/mseminatore>
|
||||
* [2024-01-16] Add basic support for the CSKY architecture
|
||||
|
||||
* Christopher Daley <https://github.com/cdaley>
|
||||
* [2024-01-24] Optimize GEMV forwarding on ARM64 systems
|
||||
|
||||
* Aniket P. Garade <https://github.com/garadeaniket> Sushil Pratap Singh <https://github.com/SushilPratap04> Juliya James <https://github.com/Juliya32>
|
||||
* [2024-12-13] Optimized swap and rot Level-1 BLAS routines with ARM SVE
|
||||
|
||||
* Annop Wongwathanarat <annop.wongwathanarat@arm.com>
|
||||
* [2025-01-10] Add thread throttling profile for SGEMM on NEOVERSEV1
|
||||
* [2025-01-21] Optimize gemv_t_sve_v1x3 kernel
|
||||
* [2025-02-26] Add sbgemv_t_bfdot kernel
|
||||
* [2025-03-12] Fix aarch64 sbgemv_t compilation error for GCC < 13
|
||||
* [2025-03-12] Optimize aarch64 sgemm_ncopy
|
||||
|
||||
* Marek Michalowski <marek.michalowski@arm.com>
|
||||
* [2025-01-21] Add thread throttling profile for SGEMV on `NEOVERSEV1`
|
||||
* [2025-02-18] Add thread throttling profile for SGEMM on `NEOVERSEV2`
|
||||
* [2025-02-19] Add thread throttling profile for SGEMV on `NEOVERSEV2`
|
||||
|
||||
* Ye Tao <ye.tao@arm.com>
|
||||
* [2025-02-03] Optimize SBGEMM kernel on NEOVERSEV1
|
||||
* [2025-02-27] Add sbgemv_n_neon kernel
|
||||
* [2025-05-17] Impl prototype of BGEMM inferface
|
||||
|
||||
* Abhishek Kumar <https://github.com/abhishek-iitmadras>
|
||||
* [2025-04-22] Optimise dot kernel for NEOVERSE V1
|
||||
* [2025-07-23] ARM64-Enable bfloat16 kernels by default
|
||||
|
||||
* Sharif Inamdar <sharif.inamdar@arm.com>
|
||||
* [2025-06-05] Optimize gemv_n_sve_v1x3 kernel
|
||||
|
||||
* Guoyuan Li <https://github.com/guoyuanplct>
|
||||
* [2025-04-11] Optimise gemv kernel for RISCV64_ZVL256B
|
||||
* [2025-05-01] Optimise zgemv kernel for RISCV64_ZVL256B
|
||||
* [2025-05-17] Optimise omatcopy/zomatcopy kernel for RISCV64_ZVL256B
|
||||
* [2025-05-29] Optimise axpby kernel for RISCV64_ZVL256B
|
||||
* [2025-06-05] Optimise hbmv kernel for RISCV64_ZVL256B
|
||||
|
||||
|
||||
+229
@@ -1,4 +1,233 @@
|
||||
OpenBLAS ChangeLog
|
||||
====================================================================
|
||||
Version 0.3.30
|
||||
19-Jun-2025
|
||||
|
||||
general:
|
||||
- fixed an installation problem with the thread safety test in gmake builds
|
||||
- fixed spurious overwriting of an input array in complex GEMMT/GEMMTR
|
||||
- fixed naming of GEMMTR in error messages from XERBLA
|
||||
- fixed compilation of SBGEMMT/SBGEMMTR in CMake builds
|
||||
- fixed the implementation of ?NRM2 to handle INCX=0 correctly
|
||||
- removed tests for CSROT and ZDROT that relied on unspecified behavior
|
||||
- fixed a performance regression in multithreaded GEMM that was particularly
|
||||
serious on POWER targets
|
||||
- fixed linking issues when using LLVM's flang-new with gmake
|
||||
- fixed a potential thread safety problem with C11 atomic operations
|
||||
- further improved the workload partitioning in parallel GEMM
|
||||
- fixed omission of LAPACKE interfaces for CGESVDQ,CTRSYL3 and ?GEQPF in
|
||||
CMake builds
|
||||
- fixed mishandling of setting NO_LAPACK to FALSE, and incorrect dependencies
|
||||
for LAPACK function SPMV in CMake builds
|
||||
- added explicit CMake options for building LAPACKE and shared libraries
|
||||
- simplified and improved handling of OpenMP options in CMake builds
|
||||
- reworked Windows DLL generation in CMake builds to ensure correct symbol
|
||||
renaming (pre/postfixing) and optional generation of PDB files for debugging
|
||||
- updated the Perl script version of the gensymbol utility for use with
|
||||
Windows-on-Arm
|
||||
- Fixed building with (Mingw) gmake on Windows to ensure completeness of the
|
||||
LAPACK included in the static library (potential race condition due to the
|
||||
Windows version of the "ln" utility creating snapshot copies rather than links)
|
||||
- fixed unwanted deletion of the lapacke_mangling.h file by "make clean"
|
||||
- fixed potential duplication of a _64 suffix on library names in CMake builds
|
||||
- fixed compilation of the C fallback copies of the LAPACK code with GCC 15
|
||||
- included fixed from the Reference-LAPACK project:
|
||||
- fixed a truncated error message in the EIG part of the testsuite
|
||||
(Reference-LAPACK PR 1119)
|
||||
- fixed too strict check in LAPACKE_?gesdd_work (PR #1126)
|
||||
- fixed memory corruption when calling ?GEEV with non-finite data (PR #1128)
|
||||
- fixed missing initialization of a variable in C/GEQP3RK (PR #1131)
|
||||
- fixed 2nd dimension chosen in C/ZUNMLQ transposition operation (PR #1135)
|
||||
|
||||
x86_64:
|
||||
- fixed an error in the SBGEMV kernel for Cooper Lake/Sapphire Rapids
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- improved the compiler identification code for flang-new
|
||||
- fixed a potential build issue in the ZSUM kernel
|
||||
- fixed "argument list too long" errors when building on MacOS
|
||||
- added cpu autodetection support for several new Arrow Lake models
|
||||
- fixed conditional inclusion of the fast path SGEMM kernel in DYNAMIC_ARCH
|
||||
- fixed compilation with the MinGW build of GCC 15
|
||||
|
||||
arm64:
|
||||
- fixed cpu type detection of A64FX and some ThunderX models (broken in 0.3.29)
|
||||
- added support for the AmpereOne/1A cpus in DYNAMIC_ ARCH builds
|
||||
- added an optimized SBGEMM kernel for NEOVERSEV1
|
||||
- improved 1xN SBGEMM performance by forwarding to SBGEMV
|
||||
- introduced a stepwise increase of the thread count used for
|
||||
SGEMM and SGEMV on NEOVERSEV1/V2 in relation to problem size
|
||||
- introduced a stepwise increase of the thread count used for
|
||||
DGEMV on NEOVERSEV1 in relation to problem size
|
||||
- introduced a stepwise increase of the thread count used for
|
||||
SDOT and DDOT on NEOVERSEV1 in relation to problem size
|
||||
- worked around assembler limitations in LLVM for Windows-on-Arm
|
||||
- enabled cpu type autodetection from the registry on Windows-on-Arm
|
||||
- improved multithreading threshold for GEMV and GESV on Windows-on-Arm
|
||||
- fixed overoptimization issues with LLVM's flang in Windows-on-Arm
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- added a fast path SGEMM kernel for small workloads on SME capable targets
|
||||
- improved performance of SGEMM and DGEMM kernels for small workloads
|
||||
- improved performance of SGEMV and DGEMV on SVE-capable targets
|
||||
- improved performance of SGEMV on NEOVERSEN1 and Apple M
|
||||
- added optimized SSYMV and DSYMV kernels for NEOVERSEN1, Apple M and all
|
||||
SVE capable targets
|
||||
- added optimized SBGEMV kernels for NEOVERSEV1/V2/N2
|
||||
- improved performance of SGEMM through faster NCOPY kernels
|
||||
- added compiler options for the NVIDIA HPC Compiler Suite
|
||||
- fixed compilation on OSX with XCode 16.3 and later
|
||||
- fixed cpu core type and cache size detection on Apple M4
|
||||
- updated GEMM parameter settings for Neoverse cpus in cross-builds with CMake
|
||||
- fixed default compiler options for NEOVERSEN1 and CORTEXX2 in CMake builds
|
||||
- fixed conditional inclusion of the fast path SGEMM kernel in DYNAMIC_ARCH
|
||||
- fixed potential miscompilation of the non-SVE SDOT kernel
|
||||
|
||||
riscv64:
|
||||
- added optimized SROTM and DROTM kernels for x280
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- improved performance of GEMM_TCOPY on RVV1.0 targets with
|
||||
VLEN of 128 or 256
|
||||
- improved performance of OMATCOPY on targets with VLEN 256
|
||||
- greatly improved performance of SGEMV/DGEMV
|
||||
- improved performance of CGEMV and ZGEMV on C910V and all RVV targets
|
||||
with VLEN 256
|
||||
- improved performance of SAXPBY and DAXPBY on C910V and all RVV targets
|
||||
with VLEN 256
|
||||
- improved performance of AXPY and DOT on C910V and ZVL256B targets by
|
||||
falling back to non-vectorized code for very small N. (Thereby fixing
|
||||
poor performance of CHBMV/ZHBMV for very small K)
|
||||
- fixed CMake build failures of the TRMM kernels
|
||||
|
||||
loongarch64:
|
||||
- improved performance of the LSX versions of SSYMV/DSYMV
|
||||
- made the LASX versions of the DSYMV and SSYMV kernels
|
||||
compatible with hardware changes in LA664 and future targets
|
||||
- fixed inaccuracies in several LASX kernels
|
||||
- improved compatibility of LSX kernels with LA264 targets
|
||||
- fixed handling of deprecated target names in CMake builds
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
|
||||
power:
|
||||
- fixed building for PPCG4 with CMake
|
||||
- fixed SSCAL/DSCAL on PPC970 running FreeBSD
|
||||
- fixed a potential alignment issue in the POWER8 SGEMV kernel
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
|
||||
zarch:
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- fixed unwanted generation of object files with a writable stack
|
||||
|
||||
x86:
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- worked around potential miscompilation of CDOT with very old binutils
|
||||
|
||||
arm:
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
- fixed unwanted generation of object files with a writable stack
|
||||
|
||||
sparc:
|
||||
- fixed corner cases of NAN and INF input handling in CSCAL and ZSCAL
|
||||
|
||||
alpha:
|
||||
- fixed build failure caused by spurious Windows-only typecasts
|
||||
|
||||
cell:
|
||||
- fixed probable build issue caused by spurious Windows-only typecasts
|
||||
|
||||
====================================================================
|
||||
Version 0.3.29
|
||||
12-Jan-2025
|
||||
|
||||
general:
|
||||
- fixed a potential NULL pointer dereference in multithreaded builds
|
||||
- added function aliases for GEMMT using its new name GEMMTR adopted by Reference-BLAS
|
||||
- fixed a build failure when building without LAPACK_DEPRECATED functions
|
||||
- the minimum required CMake version for CMake-based builds was raised to 3.16.0 in order
|
||||
to remove many compatibility and deprecation warnings
|
||||
- added more detailed CMake rules for OpenMP builds (mainly to support recent LLVM)
|
||||
- fixed the behavior of the recently added CBLAS_?GEMMT functions with row-major data
|
||||
- improved thread scaling of multithreaded SBGEMV
|
||||
- improved thread scaling of multithreaded TRTRI
|
||||
- fixed compilation of the CBLAS testsuite with gcc14 (and no Fortran compiler)
|
||||
- added support for option handling changes in flang-new from LLVM18 onwards
|
||||
- added support for recent calling conventions changes in Cray and NVIDIA compilers
|
||||
- added support for compilation with the NAG Fortran compiler
|
||||
- fixed placement of the -fopenmp flag and libsuffix in the generated pkgconfig file
|
||||
- improved the CMakeConfig file generated by the Makefile build
|
||||
- fixed const-correctness of cblas_?geadd in cblas.h
|
||||
- fixed a potential inaccuracy in multithreaded BLAS3 calls
|
||||
- fixed empty implementations of get/set_affinity that print a warning in OpenMP builds
|
||||
- fixed function signatures for TRTRS in the converted C version of LAPACK
|
||||
- fixed omission of several single-precision LAPACK symbols in the shared library
|
||||
- improved build instructions for the provided "pybench" benchmarks
|
||||
- improved documentation, including added build instructions for WoA and HarmonyOS
|
||||
as well as descriptions of environment variables that affect build and runtime behavior
|
||||
- added a separate "make install_tests" target for use with cross-compilations
|
||||
- integrated improvements and corrections from Reference-LAPACK:
|
||||
- removed a comparison in LAPACKE ?tpmqrt that is always false (LAPACK PR 1062)
|
||||
- fixed the leading dimension for B in tests for GGEV (LAPACK PR 1064)
|
||||
- replaced the ?LARFT functions with a recursive implementation (LAPACK PR 1080)
|
||||
|
||||
arm:
|
||||
- fixed build with recent versions of the NDK (missing .type declaration of symbols)
|
||||
|
||||
arm64:
|
||||
- fixed a long-standing bug in the (generic) c/zgemm_beta kernel that could lead to
|
||||
reads and writes outside the array bounds in some circumstances
|
||||
- rewrote cpu autodetection to scan all cores and return the highest performing type
|
||||
- improved the DGEMM performance for SVE targets and small matrix sizes
|
||||
- improved dimension criteria for forwarding from GEMM to GEMV kernels
|
||||
- added SVE kernels for ROT and SWAP
|
||||
- improved SVE kernels for SGEMV and DGEMV on A64FX and NEOVERSEV1
|
||||
- added support for using the "small matrix" kernels with CMake as well
|
||||
- fixed compilation on Windows on Arm
|
||||
- improved compile-time detection of SVE capability
|
||||
- added cpu autodetection and initial support for Apple M4
|
||||
- added support for compilation on systems running IOS
|
||||
- added support for compilation on NetBSD ("evbarm" architecture)
|
||||
- fixed NRM2 implementations for generic SVE targets and the Neoverse N2
|
||||
- fixed compilation for SVE-capable targets with the NVIDIA compiler
|
||||
|
||||
x86_64:
|
||||
- fixed a wrong storage size in the SBGEMV kernel for Cooper Lake
|
||||
- added cpu autodetection for Intel Granite Rapids
|
||||
- added cpu autodetection for AMD Ryzen 5 series
|
||||
- added optimized SOMATCOPY_CT for AVX-capable targets
|
||||
- fixed the fallback implementation of GEMM3M in GENERIC builds
|
||||
- tentatively re-enabled builds with the EXPRECISION option
|
||||
- worked around a miscompilation of tests with mingw32-gfortran14
|
||||
- added support for compilation with the Intel oneAPI 2025.0 compiler on Windows
|
||||
|
||||
power:
|
||||
- fixed multithreaded SBGEMM
|
||||
- fixed a CMake build problem on POWER10
|
||||
- improved the performance of SGEMV
|
||||
- added vectorized implementations of SBGEMV and support for forwarding 1xN SBGEMM to them
|
||||
- fixed illegal instructions and potential memory overflow in SGEMM on PPCG4
|
||||
- fixed handling of NaN and Inf arguments in SSCAL and DSCAL on PPC440,G4 and 970
|
||||
- added improved CGEMM and ZGEMM kernels for POWER10
|
||||
- added Makefile logic to remove all optimization flags in DEBUG builds
|
||||
|
||||
mips64:
|
||||
- fixed compilation with gcc14
|
||||
- fixed GEMM parameter selection for the MIPS64_GENERIC target
|
||||
- fixed a potential build failure when compiling with OpenMP
|
||||
|
||||
loongarch64:
|
||||
- fixed compilation for Loongson3 with recent versions of gmake
|
||||
- fixed a potential loss of precision in Loongson3A GEMM
|
||||
- fixed a potential build failure when compiling with OpenMP
|
||||
- added optimized SOMATCOPY for LASX-capable targets
|
||||
- introduced a new cpu naming scheme while retaining compatibility
|
||||
- added support for cross-compiling Loongarch64 targets with CMake
|
||||
- added support for compilation with LLVM
|
||||
|
||||
riscv64:
|
||||
- removed thread yielding overhead caused by sched_yield
|
||||
- replaced some non-standard intrinsics with their official names
|
||||
- fixed and sped up the implementations of CGEMM/ZGEMM TCOPY for vector lenghts 128 and 256
|
||||
- improved the performance of SNRM2/DNRM2 for RVV1.0 targets
|
||||
- added optimized ?OMATCOPY_CN kernels for RVV1.0 targets
|
||||
|
||||
====================================================================
|
||||
Version 0.3.28
|
||||
8-Aug-2024
|
||||
|
||||
Vendored
+5
@@ -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
|
||||
@@ -426,6 +431,9 @@ dummy :
|
||||
install :
|
||||
$(MAKE) -f Makefile.install install
|
||||
|
||||
install_tests :
|
||||
$(MAKE) -f Makefile.install install_tests
|
||||
|
||||
clean ::
|
||||
@for d in $(SUBDIRS_ALL) ; \
|
||||
do if test -d $$d; then \
|
||||
@@ -444,7 +452,7 @@ endif
|
||||
@rm -f cblas.tmp cblas.tmp2
|
||||
@touch $(NETLIB_LAPACK_DIR)/make.inc
|
||||
@$(MAKE) -C $(NETLIB_LAPACK_DIR) clean
|
||||
@rm -f $(NETLIB_LAPACK_DIR)/make.inc $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_mangling.h
|
||||
@rm -f $(NETLIB_LAPACK_DIR)/make.inc
|
||||
@$(MAKE) -C relapack clean
|
||||
@rm -f *.grd Makefile.conf_last config_last.h
|
||||
@(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt)
|
||||
|
||||
+80
-5
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
@@ -30,6 +58,11 @@ FCOMMON_OPT += -march=armv8-a+sve
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), ARMV9SME)
|
||||
CCOMMON_OPT += -march=armv9-a+sve2+sme
|
||||
FCOMMON_OPT += -march=armv9-a+sve2
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), CORTEXA53)
|
||||
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
@@ -101,7 +134,7 @@ ifeq ($(CORE), NEOVERSEV1)
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG)))
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG)))
|
||||
ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG)))
|
||||
CCOMMON_OPT += -march=armv8.4-a+sve
|
||||
CCOMMON_OPT += -march=armv8.4-a+sve+bf16
|
||||
ifeq (1, $(ISCLANG))
|
||||
CCOMMON_OPT += -mtune=cortex-x1
|
||||
else
|
||||
@@ -111,7 +144,7 @@ ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv8.4-a -mtune=neoverse-v1
|
||||
endif
|
||||
else
|
||||
CCOMMON_OPT += -march=armv8.4-a+sve
|
||||
CCOMMON_OPT += -march=armv8.4-a+sve+bf16
|
||||
ifneq ($(CROSS), 1)
|
||||
CCOMMON_OPT += -mtune=native
|
||||
endif
|
||||
@@ -178,10 +211,25 @@ endif
|
||||
|
||||
# Detect ARM Neoverse V2.
|
||||
ifeq ($(CORE), NEOVERSEV2)
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
|
||||
CCOMMON_OPT += -march=armv9-a -mtune=neoverse-v2
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ13) $(ISCLANG)))
|
||||
CCOMMON_OPT += -mcpu=neoverse-v2
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv9-a -mtune=neoverse-v2
|
||||
FCOMMON_OPT += -mcpu=neoverse-v2
|
||||
endif
|
||||
else
|
||||
CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n1
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv8.2-a -mtune=neoverse-n1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Detect Ampere AmpereOne(ampere1,ampere1a) processors.
|
||||
ifeq ($(CORE), AMPERE1)
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
|
||||
CCOMMON_OPT += -march=armv8.6-a+crypto+crc+fp16+sha3+rng
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv8.6-a+crypto+crc+fp16+sha3+rng
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -351,4 +399,31 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
else
|
||||
# NVIDIA HPC options necessary to enable SVE in the compiler
|
||||
ifeq ($(CORE), THUNDERX2T99)
|
||||
CCOMMON_OPT += -tp=thunderx2t99
|
||||
FCOMMON_OPT += -tp=thunderx2t99
|
||||
endif
|
||||
ifeq ($(CORE), NEOVERSEN1)
|
||||
CCOMMON_OPT += -tp=neoverse-n1
|
||||
FCOMMON_OPT += -tp=neoverse-n1
|
||||
endif
|
||||
ifeq ($(CORE), NEOVERSEV1)
|
||||
CCOMMON_OPT += -tp=neoverse-v1
|
||||
FCOMMON_OPT += -tp=neoverse-v1
|
||||
endif
|
||||
ifeq ($(CORE), NEOVERSEV2)
|
||||
CCOMMON_OPT += -tp=neoverse-v2
|
||||
FCOMMON_OPT += -tp=neoverse-v2
|
||||
endif
|
||||
ifeq ($(CORE), ARMV8SVE)
|
||||
CCOMMON_OPT += -tp=neoverse-v2
|
||||
FCOMMON_OPT += -tp=neoverse-v2
|
||||
endif
|
||||
ifeq ($(CORE), ARMV9SVE)
|
||||
CCOMMON_OPT += -tp=neoverse-v2
|
||||
FCOMMON_OPT += -tp=neoverse-v2
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
+131
-4
@@ -14,6 +14,9 @@ endif
|
||||
ifeq ($(INTERFACE64),1)
|
||||
USE_64BITINT=1
|
||||
endif
|
||||
ifeq ($(USE_OPENMP),1)
|
||||
FOMP_OPT:= -fopenmp
|
||||
endif
|
||||
|
||||
PREFIX ?= /opt/OpenBLAS
|
||||
|
||||
@@ -68,7 +71,7 @@ install : lib.grd
|
||||
@cat common_interface.h >> "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/f77blas.h"
|
||||
@echo \#endif >> "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/f77blas.h"
|
||||
|
||||
ifndef NO_CBLAS
|
||||
ifneq ($(NO_CBLAS),1)
|
||||
@echo Generating cblas.h in $(DESTDIR)$(OPENBLAS_INCLUDE_DIR)
|
||||
@cp cblas.h cblas.tmp
|
||||
ifdef SYMBOLPREFIX
|
||||
@@ -178,6 +181,7 @@ endif
|
||||
@echo 'libnamesuffix='$(LIBNAMESUFFIX) >> "$(PKGFILE)"
|
||||
@echo 'libsuffix='$(SYMBOLSUFFIX) >> "$(PKGFILE)"
|
||||
@echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(PKGFILE)"
|
||||
@echo 'omp_opt='$(FOMP_OPT) >> "$(PKGFILE)"
|
||||
@echo 'openblas_config= USE_64BITINT='$(INTERFACE64) 'DYNAMIC_ARCH='$(DYNAMIC_ARCH) 'DYNAMIC_OLDER='$(DYNAMIC_OLDER) 'NO_CBLAS='$(NO_CBLAS) 'NO_LAPACK='$(NO_LAPACK) 'NO_LAPACKE='$(NO_LAPACKE) 'NO_AFFINITY='$(NO_AFFINITY) 'USE_OPENMP='$(USE_OPENMP) $(TARGET) 'MAX_THREADS='$(NUM_THREADS)>> "$(PKGFILE)"
|
||||
@echo 'version='$(VERSION) >> "$(PKGFILE)"
|
||||
@echo 'extralib='$(PKG_EXTRALIB) >> "$(PKGFILE)"
|
||||
@@ -185,25 +189,55 @@ endif
|
||||
|
||||
|
||||
#Generating OpenBLASConfig.cmake
|
||||
ifneq ($(origin _OpenBLAS_ROOT_DIR),"undefined")
|
||||
|
||||
@echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
|
||||
@echo "SET(OpenBLAS_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@echo "SET(OpenBLAS_INCLUDE_DIRS ${OPENBLAS_INCLUDE_DIR})" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@echo "file(REAL_PATH \"../../..\" _OpenBLAS_ROOT_DIR BASE_DIRECTORY \$${CMAKE_CURRENT_LIST_DIR} )" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@echo "SET(OpenBLAS_INCLUDE_DIRS \$${_OpenBLAS_ROOT_DIR}/include)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
|
||||
ifneq ($(NO_SHARED),1)
|
||||
#ifeq logical or
|
||||
ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD OpenBSD DragonFly))
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX)$(SYMBOLSUFFIX).so)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/lib/$(LIBPREFIX).so)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
ifeq ($(OSNAME), $(filter $(OSNAME),WINNT CYGWIN_NT))
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_BINARY_DIR}/$(LIBDLLNAME))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/bin/$(LIBDLLNAME))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
ifeq ($(OSNAME), Darwin)
|
||||
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/lib/$(LIBPREFIX).dylib)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
@echo "add_library(OpenBLAS::OpenBLAS SHARED IMPORTED)"
|
||||
@echo "target_include_directories(OpenBLAS::OpenBLAS INTERFACE \$${OpenBLAS_INCLUDE_DIRS})"
|
||||
ifeq ($(OSNAME), $(filter $(OSNAME),WINNT CYGWIN_NT))
|
||||
@echo "set_property(TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_LOCATION \$${OpenBLAS_LIBRARIES})"
|
||||
@echo "set_property(TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB \$${_OpenBLAS_ROOT_DIR}/lib/libopenblas.lib)"
|
||||
endif
|
||||
else
|
||||
#only static
|
||||
@echo "SET(OpenBLAS_LIBRARIES \$${_OpenBLAS_ROOT_DIR}/lib/$(LIBPREFIX).$(LIBSUFFIX))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
else
|
||||
echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
|
||||
@echo "SET(OpenBLAS_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
@echo "SET(OpenBLAS_INCLUDE_DIRS ${OPENBLAS_INCLUDE_DIR})" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
ifneq ($(NO_SHARED),1)
|
||||
#ifeq logical or
|
||||
ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD OpenBSD DragonFly))
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX)$(SYMBOLSUFFIX).so)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
ifeq ($(OSNAME), $(filter $(OSNAME),WINNT CYGWIN_NT))
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_BINARY_DIR}/$(LIBDLLNAME))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
ifeq ($(OSNAME), Darwin)
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX).dylib)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
else
|
||||
#only static
|
||||
@echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX).$(LIBSUFFIX))" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#Generating OpenBLASConfigVersion.cmake
|
||||
@echo Generating $(OPENBLAS_CMAKE_CONFIG_VERSION) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
|
||||
@echo "set (PACKAGE_VERSION \"${VERSION}\")" > "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG_VERSION)"
|
||||
@@ -216,3 +250,96 @@ endif
|
||||
@echo " endif ()" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG_VERSION)"
|
||||
@echo "endif ()" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG_VERSION)"
|
||||
@echo Install OK!
|
||||
|
||||
install_tests : lib.grd
|
||||
ifneq ($(ONLY_CBLAS), 1)
|
||||
@install -m 666 utest/openblas_utest $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 utest/openblas_utest_ext $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
|
||||
ifndef NO_FBLAS
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
@install -m 666 test/test_sbgemm $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
@install -m 666 test/sblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/sblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/sblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/sblat2.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/sblat3.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
@install -m 666 test/dblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/dblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/dblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/dblat2.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/dblat3.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
@install -m 666 test/cblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/cblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/cblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/cblat2.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/cblat3.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
ifeq ($(ARCH), filter($(ARCH), x86 x86_64 ia64 MIPS))
|
||||
@install -m 666 test/cblat3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/cblat3_3m.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
@install -m 666 test/zblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/zblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/zblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/zblat2.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/zblat3.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
ifeq ($(ARCH), filter($(ARCH), x86 x86_64 ia64 MIPS))
|
||||
@install -m 666 test/zblat3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 test/zblat3_3m.dat $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(ONLY_CBLAS), 1)
|
||||
ifeq ($(BUILD_SINGLE),1)
|
||||
@install -m 666 ctest/xscblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/xscblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/xscblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/sin2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/sin3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
ifeq ($(BUILD_DOUBLE),1)
|
||||
@install -m 666 ctest/xdcblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/xdcblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/xdcblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/din2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/din3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX),1)
|
||||
@install -m 666 ctest/xccblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/xccblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/xccblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/cin2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/cin3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
ifeq ($(ARCH), filter($(ARCH), x86 x86_64 ia64 MIPS))
|
||||
@install -m 666 ctest/xccblat3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/cin3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(BUILD_COMPLEX16),1)
|
||||
@install -m 666 ctest/xzcblat1 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/xzcblat2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/xzcblat3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/zin2 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/zin3 $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
ifeq ($(ARCH), filter($(ARCH), x86 x86_64 ia64 MIPS))
|
||||
@install -m 666 ctest/xzcblat3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 ctest/zin3_3m $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
ifeq ($(CPP_THREAD_SAFETY_TEST), 1)
|
||||
@install -m 666 cpp_thread_test/dgemm_tester $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
@install -m 666 cpp_thread_test/dgemv_tester $(DESTDIR)$(OPENBLAS_BINARY_DIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
+6
-6
@@ -13,16 +13,16 @@ ifeq ($(CORE), POWER10)
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
ifeq ($(GCCVERSIONGTEQ10), 1)
|
||||
CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
else ifneq ($(GCCVERSIONGT4), 1)
|
||||
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
|
||||
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
|
||||
else
|
||||
$(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended)
|
||||
CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math
|
||||
endif
|
||||
else
|
||||
CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
|
||||
endif
|
||||
ifeq ($(F_COMPILER), IBM)
|
||||
FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize
|
||||
@@ -34,7 +34,7 @@ endif
|
||||
|
||||
ifeq ($(CORE), POWER9)
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
CCOMMON_OPT += -Ofast -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mvsx -fno-fast-math
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
ifneq ($(GCCVERSIONGT4), 1)
|
||||
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
|
||||
@@ -70,7 +70,7 @@ endif
|
||||
|
||||
ifeq ($(CORE), POWER8)
|
||||
ifneq ($(C_COMPILER), PGI)
|
||||
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
|
||||
CCOMMON_OPT += -O3 -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
|
||||
else
|
||||
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
|
||||
endif
|
||||
|
||||
+12
-2
@@ -3,17 +3,27 @@ CCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920
|
||||
FCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -static
|
||||
endif
|
||||
ifeq ($(CORE), x280)
|
||||
CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d -ffast-math
|
||||
CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d -static
|
||||
endif
|
||||
ifeq ($(CORE), RISCV64_ZVL256B)
|
||||
ifeq ($(BUILD_HFLOAT16), 1)
|
||||
CCOMMON_OPT += -march=rv64imafdcv_zvl256b_zvfh_zfh -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
|
||||
else
|
||||
CCOMMON_OPT += -march=rv64imafdcv_zvl256b -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CORE), RISCV64_ZVL128B)
|
||||
CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
|
||||
ifeq ($(BUILD_HFLOAT16), 1)
|
||||
CCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv_zvfh_zfh -mabi=lp64d
|
||||
else
|
||||
CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CORE), RISCV64_GENERIC)
|
||||
CCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
|
||||
FCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
|
||||
|
||||
+3
-1
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# This library's version
|
||||
VERSION = 0.3.28
|
||||
VERSION = 0.3.30.dev
|
||||
|
||||
# If you set this prefix, the library name will be lib$(LIBNAMESUFFIX)openblas.a
|
||||
# and lib$(LIBNAMESUFFIX)openblas.so, with a matching soname in the shared library
|
||||
@@ -308,6 +308,8 @@ COMMON_PROF = -pg
|
||||
# If you want to enable the experimental BFLOAT16 support
|
||||
# BUILD_BFLOAT16 = 1
|
||||
|
||||
# If you want to enable the experimental HFLOAT16 support
|
||||
# BUILD_HFLOAT16 = 1
|
||||
|
||||
# Set the thread number threshold beyond which the job array for the threaded level3 BLAS
|
||||
# will be allocated on the heap rather than the stack. (This array alone requires
|
||||
|
||||
+54
-14
@@ -270,27 +270,37 @@ SMALL_MATRIX_OPT = 1
|
||||
BUILD_BFLOAT16 = 1
|
||||
else ifeq ($(ARCH), arm64)
|
||||
SMALL_MATRIX_OPT = 1
|
||||
BUILD_BFLOAT16 = 1
|
||||
endif
|
||||
ifeq ($(ARCH), loongarch64)
|
||||
SMALL_MATRIX_OPT = 1
|
||||
endif
|
||||
ifeq ($(ARCH), arm64)
|
||||
GEMM_GEMV_FORWARD = 1
|
||||
SBGEMM_GEMV_FORWARD = 1
|
||||
BGEMM_GEMV_FORWARD = 1
|
||||
endif
|
||||
ifeq ($(ARCH), riscv)
|
||||
GEMM_GEMV_FORWARD = 1
|
||||
endif
|
||||
ifeq ($(ARCH), power)
|
||||
GEMM_GEMV_FORWARD = 1
|
||||
SBGEMM_GEMV_FORWARD = 1
|
||||
endif
|
||||
|
||||
ifeq ($(SMALL_MATRIX_OPT), 1)
|
||||
CCOMMON_OPT += -DSMALL_MATRIX_OPT
|
||||
endif
|
||||
ifeq ($(GEMM_GEMV_FORWARD), 1)
|
||||
ifneq ($(ONLY_CBLAS), 1)
|
||||
ifeq ($(GEMM_GEMV_FORWARD), 1)
|
||||
CCOMMON_OPT += -DGEMM_GEMV_FORWARD
|
||||
endif
|
||||
ifeq ($(SBGEMM_GEMV_FORWARD), 1)
|
||||
CCOMMON_OPT += -DSBGEMM_GEMV_FORWARD
|
||||
endif
|
||||
ifeq ($(BGEMM_GEMV_FORWARD), 1)
|
||||
CCOMMON_OPT += -DBGEMM_GEMV_FORWARD
|
||||
endif
|
||||
endif
|
||||
|
||||
# This operation is expensive, so execution should be once.
|
||||
@@ -376,9 +386,6 @@ OBJCONV = $(CROSS_SUFFIX)objconv
|
||||
ifeq ($(NOFORTRAN), 1)
|
||||
C_LAPACK = 1
|
||||
override FEXTRALIB =
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
CCOMMON_OPT += -Wno-error=incompatible-pointer-types
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
@@ -391,6 +398,8 @@ GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
||||
GCCVERSIONGTEQ10 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 10)
|
||||
GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
|
||||
GCCVERSIONGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||
GCCVERSIONGTEQ13 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 13)
|
||||
GCCVERSIONGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
||||
# Note that the behavior of -dumpversion is compile-time-configurable for
|
||||
# gcc-7.x and newer. Use -dumpfullversion there
|
||||
ifeq ($(GCCVERSIONGTEQ7),1)
|
||||
@@ -417,9 +426,8 @@ ifeq ($(OSNAME), Darwin)
|
||||
ifndef MACOSX_DEPLOYMENT_TARGET
|
||||
ifeq ($(ARCH), arm64)
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
export NO_SVE = 1
|
||||
endif
|
||||
export NO_SME = 1
|
||||
else
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.8
|
||||
endif
|
||||
@@ -433,6 +441,9 @@ ifeq (x$(XCVER), x 15)
|
||||
CCOMMON_OPT += -Wl,-ld_classic
|
||||
FCOMMON_OPT += -Wl,-ld_classic
|
||||
endif
|
||||
ifeq (x$(XCVER), x 16)
|
||||
override CEXTRALIB := $(filter-out(-lto_library, $(CEXTRALIB)))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring $(OSNAME), FreeBSD OpenBSD DragonFly))
|
||||
@@ -445,7 +456,7 @@ endif
|
||||
|
||||
ifeq ($(OSNAME), Linux)
|
||||
EXTRALIB += -lm
|
||||
NO_EXPRECISION = 1
|
||||
#NO_EXPRECISION = 1
|
||||
endif
|
||||
|
||||
ifeq ($(OSNAME), Android)
|
||||
@@ -571,7 +582,7 @@ NO_BINARY_MODE = 1
|
||||
endif
|
||||
|
||||
ifeq ($(CORE), generic)
|
||||
NO_EXPRECISION = 1
|
||||
#NO_EXPRECISION = 1
|
||||
endif
|
||||
|
||||
ifndef NO_EXPRECISION
|
||||
@@ -594,7 +605,7 @@ endif
|
||||
ifeq ($(ARCH), x86_64)
|
||||
|
||||
ifeq ($(CORE), generic)
|
||||
NO_EXPRECISION = 1
|
||||
#NO_EXPRECISION = 1
|
||||
endif
|
||||
|
||||
ifndef NO_EXPRECISION
|
||||
@@ -708,6 +719,9 @@ DYNAMIC_CORE += NEOVERSEN2
|
||||
DYNAMIC_CORE += ARMV8SVE
|
||||
DYNAMIC_CORE += A64FX
|
||||
endif
|
||||
ifneq ($(NO_SME), 1)
|
||||
DYNAMIC_CORE += ARMV9SME
|
||||
endif
|
||||
DYNAMIC_CORE += THUNDERX
|
||||
DYNAMIC_CORE += THUNDERX2T99
|
||||
DYNAMIC_CORE += TSV110
|
||||
@@ -730,7 +744,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), loongarch64)
|
||||
DYNAMIC_CORE = LOONGSON3R5 LOONGSON2K1000 LOONGSONGENERIC
|
||||
DYNAMIC_CORE = LA64_GENERIC LA264 LA464
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), riscv64)
|
||||
@@ -827,8 +841,8 @@ BINARY_DEFINED = 1
|
||||
|
||||
ifeq ($(F_COMPILER), GFORTRAN)
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
# EXPRECISION = 1
|
||||
# CCOMMON_OPT += -DEXPRECISION
|
||||
EXPRECISION = 1
|
||||
CCOMMON_OPT += -DEXPRECISION
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -1180,6 +1194,13 @@ endif
|
||||
else ifeq ($(ARCH), $(filter $(ARCH),mips))
|
||||
FCOMMON_OPT += -mabi=32
|
||||
endif
|
||||
ifeq ($(ARCH), $(filter $(ARCH),loongarch64))
|
||||
ifdef INTERFACE64
|
||||
ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -fdefault-integer-8
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifdef BINARY64
|
||||
ifneq ($(OSNAME), AIX)
|
||||
@@ -1471,6 +1492,10 @@ ifeq ($(NO_SVE), 1)
|
||||
CCOMMON_OPT += -DNO_SVE
|
||||
endif
|
||||
|
||||
ifeq ($(NO_SME), 1)
|
||||
CCOMMON_OPT += -DNO_SME
|
||||
endif
|
||||
|
||||
ifdef SMP
|
||||
CCOMMON_OPT += -DSMP_SERVER
|
||||
|
||||
@@ -1532,6 +1557,9 @@ endif
|
||||
ifeq ($(BUILD_BFLOAT16), 1)
|
||||
CCOMMON_OPT += -DBUILD_BFLOAT16
|
||||
endif
|
||||
ifeq ($(BUILD_HFLOAT16), 1)
|
||||
CCOMMON_OPT += -DBUILD_HFLOAT16
|
||||
endif
|
||||
ifeq ($(BUILD_SINGLE), 1)
|
||||
CCOMMON_OPT += -DBUILD_SINGLE=1
|
||||
endif
|
||||
@@ -1612,6 +1640,13 @@ NO_AFFINITY = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), POWER)
|
||||
ifeq ($(DEBUG), 1)
|
||||
CCOMMON_OPT := $(filter-out -O%, $(CCOMMON_OPT)) -O0
|
||||
FCOMMON_OPT := $(filter-out -O%, $(FCOMMON_OPT)) -O0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef NO_AFFINITY
|
||||
ifeq ($(NO_AFFINITY), 0)
|
||||
override undefine NO_AFFINITY
|
||||
@@ -1723,8 +1758,8 @@ LAPACK_FFLAGS := $(filter-out -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx
|
||||
override FFLAGS := $(filter-out -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 ,$(FFLAGS))
|
||||
endif
|
||||
ifeq ($(F_COMPILER),FLANGNEW)
|
||||
LAPACK_FFLAGS := $(filter-out -m32 -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 ,$(FFLAGS))
|
||||
override FFLAGS := $(filter-out -m32 -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 ,$(FFLAGS))
|
||||
LAPACK_FFLAGS := $(filter-out -m32 -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 -mtune=% -mabi=% ,$(FFLAGS))
|
||||
override FFLAGS := $(filter-out -m32 -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 -mtune=% -mabi=% ,$(FFLAGS))
|
||||
endif
|
||||
|
||||
LAPACK_CFLAGS = $(CFLAGS)
|
||||
@@ -1867,11 +1902,16 @@ export TARGET_CORE
|
||||
export NO_AVX512
|
||||
export NO_AVX2
|
||||
export BUILD_BFLOAT16
|
||||
export BUILD_HFLOAT16
|
||||
export NO_LSX
|
||||
export NO_LASX
|
||||
|
||||
export BGEMM_UNROLL_M
|
||||
export BGEMM_UNROLL_N
|
||||
export SBGEMM_UNROLL_M
|
||||
export SBGEMM_UNROLL_N
|
||||
export SHGEMM_UNROLL_M
|
||||
export SHGEMM_UNROLL_N
|
||||
export SGEMM_UNROLL_M
|
||||
export SGEMM_UNROLL_N
|
||||
export DGEMM_UNROLL_M
|
||||
|
||||
+36
-2
@@ -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)
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
|
||||
[](https://gitter.im/xianyi/OpenBLAS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Travis CI: [](https://travis-ci.com/xianyi/OpenBLAS)
|
||||
|
||||
AppVeyor: [](https://ci.appveyor.com/project/xianyi/openblas/branch/develop)
|
||||
|
||||
Cirrus CI: [](https://cirrus-ci.com/github/xianyi/OpenBLAS)
|
||||
<!-- Drone CI: [](https://cloud.drone.io/xianyi/OpenBLAS/)-->
|
||||
|
||||
|
||||
|
||||
[](https://dev.azure.com/xianyi/OpenBLAS/_build/latest?definitionId=1&branchName=develop)
|
||||
@@ -19,36 +15,45 @@ OSUOSL IBMZ-CI [ library based on GotoBLAS2 1.13 BSD version.
|
||||
|
||||
Please read the documentation on the OpenBLAS wiki pages: <https://github.com/xianyi/OpenBLAS/wiki>.
|
||||
For more information about OpenBLAS, please see:
|
||||
|
||||
- The documentation at [openmathlib.org/OpenBLAS/docs/](http://www.openmathlib.org/OpenBLAS/docs),
|
||||
- The home page at [openmathlib.org/OpenBLAS/](http://www.openmathlib.org/OpenBLAS).
|
||||
|
||||
For a general introduction to the BLAS routines, please refer to the extensive documentation of their reference implementation hosted at netlib:
|
||||
<https://www.netlib.org/blas>. On that site you will likewise find documentation for the reference implementation of the higher-level library LAPACK - the **L**inear **A**lgebra **Pack**age that comes included with OpenBLAS. If you are looking for a general primer or refresher on Linear Algebra, the set of six
|
||||
20-minute lecture videos by Prof. Gilbert Strang on either MIT OpenCourseWare <https://ocw.mit.edu/resources/res-18-010-a-2020-vision-of-linear-algebra-spring-2020/> or Youtube <https://www.youtube.com/playlist?list=PLUl4u3cNGP61iQEFiWLE21EJCxwmWvvek> may be helpful.
|
||||
20-minute lecture videos by Prof. Gilbert Strang on either MIT OpenCourseWare [here](https://ocw.mit.edu/resources/res-18-010-a-2020-vision-of-linear-algebra-spring-2020/) or YouTube [here](https://www.youtube.com/playlist?list=PLUl4u3cNGP61iQEFiWLE21EJCxwmWvvek) may be helpful.
|
||||
|
||||
## Binary Packages
|
||||
|
||||
We provide official binary packages for the following platform:
|
||||
|
||||
* Windows x86/x86_64
|
||||
* Windows arm64 (woa)
|
||||
|
||||
You can download them from [file hosting on sourceforge.net](https://sourceforge.net/projects/openblas/files/) or from the Releases section of the github project page, [https://github.com/xianyi/OpenBLAS/releases](https://github.com/xianyi/OpenBLAS/releases).
|
||||
You can download them from [file hosting on sourceforge.net](https://sourceforge.net/projects/openblas/files/) or from the [Releases section of the GitHub project page](https://github.com/OpenMathLib/OpenBLAS/releases).
|
||||
|
||||
OpenBLAS is also packaged for many package managers - see [the installation section of the docs](http://www.openmathlib.org/OpenBLAS/docs/install/) for details.
|
||||
|
||||
## Installation from Source
|
||||
|
||||
Download from project homepage, https://xianyi.github.com/OpenBLAS/, or check out the code
|
||||
using Git from https://github.com/xianyi/OpenBLAS.git. (If you want the most up to date version, be
|
||||
sure to use the develop branch - master is several years out of date due to a change of maintainership.)
|
||||
Buildtime parameters can be chosen in Makefile.rule, see there for a short description of each option.
|
||||
Most can also be given directly on the make or cmake command line.
|
||||
Obtain the source code from https://github.com/OpenMathLib/OpenBLAS/. Note that the default branch
|
||||
is `develop` (a `master` branch is still present, but far out of date).
|
||||
|
||||
Build-time parameters can be chosen in `Makefile.rule`, see there for a short description of each option.
|
||||
Most options can also be given directly on the command line as parameters to your `make` or `cmake` invocation.
|
||||
|
||||
### Dependencies
|
||||
|
||||
Building OpenBLAS requires the following to be installed:
|
||||
|
||||
* GNU Make
|
||||
* A C compiler, e.g. GCC or Clang
|
||||
* GNU Make or CMake
|
||||
* A C compiler, e.g. GCC or Clang
|
||||
* A Fortran compiler (optional, for LAPACK)
|
||||
* IBM MASS (optional, see below)
|
||||
|
||||
In general, using a recent version of the compiler is strongly recommended.
|
||||
If a Fortran compiler is not available, it is possible to compile an older version of the included LAPACK
|
||||
that has been machine-translated to C.
|
||||
|
||||
### Normal compile
|
||||
|
||||
@@ -64,26 +69,31 @@ For building with `cmake`, the usual conventions apply, i.e. create a build dire
|
||||
OpenBLAS source directory or separate from it, and invoke `cmake` there with the path to the source tree and any
|
||||
build options you plan to set.
|
||||
|
||||
For more details, see the [Building from source](http://www.openmathlib.org/OpenBLAS/docs/install/#building-from-source)
|
||||
section in the docs.
|
||||
|
||||
### Cross compile
|
||||
|
||||
Set `CC` and `FC` to point to the cross toolchains, and set `HOSTCC` to your host C compiler.
|
||||
Set `CC` and `FC` to point to the cross toolchains, and if you use `make`, also set `HOSTCC` to your host C compiler.
|
||||
The target must be specified explicitly when cross compiling.
|
||||
|
||||
Examples:
|
||||
|
||||
* On an x86 box, compile this library for a loongson3a CPU:
|
||||
* On a Linux system, cross-compiling to an older MIPS64 router board:
|
||||
```sh
|
||||
make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A
|
||||
make BINARY=64 CC=mipsisa64r6el-linux-gnuabi64-gcc FC=mipsisa64r6el-linux-gnuabi64-gfortran HOSTCC=gcc TARGET=P6600
|
||||
```
|
||||
or same with the newer mips-crosscompiler put out by Loongson that defaults to the 32bit ABI:
|
||||
* or to a Windows x64 host:
|
||||
```sh
|
||||
make HOSTCC=gcc CC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gcc -mabi=64' FC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gfortran -mabi=64' TARGET=LOONGSON3A
|
||||
make CC="i686-w64-mingw32-gcc -Bstatic" FC="i686-w64-mingw32-gfortran -static-libgfortran" TARGET=HASWELL BINARY=32 CROSS=1 NUM_THREADS=20 CONSISTENT_FPCSR=1 HOSTCC=gcc
|
||||
```
|
||||
|
||||
* On an x86 box, compile this library for a loongson3a CPU with loongcc (based on Open64) compiler:
|
||||
```sh
|
||||
make CC=loongcc FC=loongf95 HOSTCC=gcc TARGET=LOONGSON3A CROSS=1 CROSS_SUFFIX=mips64el-st-linux-gnu- NO_LAPACKE=1 NO_SHARED=1 BINARY=32
|
||||
```
|
||||
You can find instructions for other cases both in the "Supported Systems" section below and in
|
||||
the [Building from source docs](http://www.openmathlib.org/OpenBLAS/docs/install).
|
||||
The `.yml` scripts included with the sources (which contain the
|
||||
build scripts for the "continuous integration" (CI) build tests automatically run on every proposed change to the sources) may also provide additional hints.
|
||||
|
||||
When compiling for a more modern CPU target of the same architecture, e.g. `TARGET=SKYLAKEX` on a `HASWELL` host, option `CROSS=1` can be used to suppress the automatic invocation of the tests at the end of the build.
|
||||
|
||||
### Debug version
|
||||
|
||||
@@ -219,6 +229,26 @@ e.g.:
|
||||
HOSTCC=gcc HOSTFC=gfortran -j
|
||||
```
|
||||
|
||||
#### LOONGARCH64
|
||||
|
||||
- **LA64_GENERIC**: Optimized Level-3, Level-2 and Level-1 BLAS with scalar instruction
|
||||
```sh
|
||||
make HOSTCC=gcc TARGET=LA64_GENERIC CC=loongarch64-unknown-linux-gnu-gcc FC=loongarch64-unknown-linux-gnu-gfortran USE_SIMPLE_THREADED_LEVEL3=1
|
||||
```
|
||||
The old-style TARGET=LOONGSONGENERIC is still supported
|
||||
|
||||
- **LA264**: Optimized Level-3, Level-2 and Level-1 BLAS with LSX instruction
|
||||
```sh
|
||||
make HOSTCC=gcc TARGET=LA264 CC=loongarch64-unknown-linux-gnu-gcc FC=loongarch64-unknown-linux-gnu-gfortran USE_SIMPLE_THREADED_LEVEL3=1
|
||||
```
|
||||
The old-style TARGET=LOONGSON2K1000 is still supported
|
||||
|
||||
- **LA464**: Optimized Level-3, Level-2 and Level-1 BLAS with LASX instruction
|
||||
```sh
|
||||
make HOSTCC=gcc TARGET=LA464 CC=loongarch64-unknown-linux-gnu-gcc FC=loongarch64-unknown-linux-gnu-gfortran USE_SIMPLE_THREADED_LEVEL3=1
|
||||
```
|
||||
The old-style TARGET=LOONGSON3R5 is still supported
|
||||
|
||||
### Support for multiple targets in a single library
|
||||
|
||||
OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying `DYNAMIC_ARCH=1` in Makefile.rule, on the gmake command line or as `-DDYNAMIC_ARCH=TRUE` in cmake.
|
||||
@@ -236,8 +266,12 @@ on **ZARCH** it comprises Z13 and Z14 as well as generic zarch support.
|
||||
|
||||
On **riscv64**, DYNAMIC_ARCH enables support for riscv64_zvl128b and riscv64_zvl256b in addition to generic riscv64 support. A compiler that supports RVV 1.0 is required to build OpenBLAS for riscv64 when DYNAMIC_ARCH is enabled.
|
||||
|
||||
The `TARGET` option can be used in conjunction with `DYNAMIC_ARCH=1` to specify which cpu model should be assumed for all the
|
||||
common code in the library, usually you will want to set this to the oldest model you expect to encounter.
|
||||
On **LoongArch64**, it comprises LA264 and LA464 as well as generic LoongArch64 support.
|
||||
|
||||
The `TARGET` option can - and usually **should** - be used in conjunction with `DYNAMIC_ARCH=1` to specify which cpu model should be assumed for all the common code in the library, usually you will want to set this to the oldest model you expect to encounter.
|
||||
Failure to specify this may lead to advanced instructions being used by the compiler, just because the build host happens to support them. This is most likely to happen when aggressive optimization options are in effect, and the resulting library may then crash with an
|
||||
illegal instruction error on weaker hardware, before it even reaches the BLAS routines specifically included for that cpu.
|
||||
|
||||
Please note that it is not possible to combine support for different architectures, so no combined 32 and 64 bit or x86_64 and arm64 in the same library.
|
||||
|
||||
### Supported OS
|
||||
@@ -291,24 +325,28 @@ If you compile this library with `USE_OPENMP=1`, you should use the above functi
|
||||
|
||||
## Reporting bugs
|
||||
|
||||
Please submit an issue in https://github.com/xianyi/OpenBLAS/issues.
|
||||
Please submit an issue in https://github.com/OpenMathLib/OpenBLAS/issues.
|
||||
|
||||
## Contact
|
||||
|
||||
+ Use github discussions: https://github.com/OpenMathLib/OpenBLAS/discussions
|
||||
* OpenBLAS users mailing list: https://groups.google.com/forum/#!forum/openblas-users
|
||||
* OpenBLAS developers mailing list: https://groups.google.com/forum/#!forum/openblas-dev
|
||||
|
||||
## Change log
|
||||
|
||||
Please see Changelog.txt to view the differences between OpenBLAS and GotoBLAS2 1.13 BSD version.
|
||||
Please see Changelog.txt.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
* Please read the [FAQ](https://github.com/xianyi/OpenBLAS/wiki/Faq) first.
|
||||
* Please read the [FAQ](http://www.openmathlib.org/OpenBLAS/docs/faq) section of the docs first.
|
||||
* Please use GCC version 4.6 and above to compile Sandy Bridge AVX kernels on Linux/MinGW/BSD.
|
||||
* Please use Clang version 3.1 and above to compile the library on Sandy Bridge microarchitecture.
|
||||
Clang 3.0 will generate the wrong AVX binary code.
|
||||
* Please use GCC version 6 or LLVM version 6 and above to compile Skylake AVX512 kernels.
|
||||
* Please use GCC version 6 or LLVM version 6 and above to compile Skylake/CooperLake AVX512 kernels
|
||||
* Please use LLVM version 18 and above (version 19 and above on Windows) if you plan to use
|
||||
its new flang compiler for Fortran
|
||||
* Please use GCC version 11 and above to compile OpenBLAS on the POWER architecture
|
||||
* The number of CPUs/cores should be less than or equal to 256. On Linux `x86_64` (`amd64`),
|
||||
there is experimental support for up to 1024 CPUs/cores and 128 numa nodes if you build
|
||||
the library with `BIGNUMA=1`.
|
||||
@@ -321,12 +359,12 @@ Please see Changelog.txt to view the differences between OpenBLAS and GotoBLAS2
|
||||
|
||||
## Contributing
|
||||
|
||||
1. [Check for open issues](https://github.com/xianyi/OpenBLAS/issues) or open a fresh issue
|
||||
1. [Check for open issues](https://github.com/OpenMathLib/OpenBLAS/issues) or open a fresh issue
|
||||
to start a discussion around a feature idea or a bug.
|
||||
2. Fork the [OpenBLAS](https://github.com/xianyi/OpenBLAS) repository to start making your changes.
|
||||
2. Fork the [OpenBLAS](https://github.com/OpenMathLib/OpenBLAS) repository to start making your changes.
|
||||
3. Write a test which shows that the bug was fixed or that the feature works as expected.
|
||||
4. Send a pull request. Make sure to add yourself to `CONTRIBUTORS.md`.
|
||||
|
||||
## Donation
|
||||
|
||||
Please read [this wiki page](https://github.com/xianyi/OpenBLAS/wiki/Donation).
|
||||
Please see [the donations section](http://www.openmathlib.org/OpenBLAS/docs/about/#donations) in the docs.
|
||||
|
||||
+12
-1
@@ -52,6 +52,7 @@ POWER7
|
||||
POWER8
|
||||
POWER9
|
||||
POWER10
|
||||
POWER11
|
||||
PPCG4
|
||||
PPC970
|
||||
PPC970MP
|
||||
@@ -101,6 +102,7 @@ CORTEXX2
|
||||
NEOVERSEN1
|
||||
NEOVERSEV1
|
||||
NEOVERSEN2
|
||||
NEOVERSEV2
|
||||
CORTEXA55
|
||||
EMAG8180
|
||||
FALKOR
|
||||
@@ -111,6 +113,7 @@ THUNDERX3T110
|
||||
VORTEX
|
||||
A64FX
|
||||
ARMV8SVE
|
||||
ARMV9SME
|
||||
FT2000
|
||||
|
||||
9.System Z:
|
||||
@@ -126,9 +129,17 @@ x280
|
||||
RISCV64_ZVL256B
|
||||
|
||||
11.LOONGARCH64:
|
||||
// LOONGSONGENERIC/LOONGSON2K1000/LOONGSON3R5 are legacy names,
|
||||
// and it is recommended to use the more standardized naming conventions
|
||||
// LA64_GENERIC/LA264/LA464. You can still specify TARGET as
|
||||
// LOONGSONGENERIC/LOONGSON2K1000/LOONGSON3R5 during compilation or runtime,
|
||||
// and they will be internally relocated to LA64_GENERIC/LA264/LA464.
|
||||
LOONGSONGENERIC
|
||||
LOONGSON3R5
|
||||
LOONGSON2K1000
|
||||
LOONGSON3R5
|
||||
LA64_GENERIC
|
||||
LA264
|
||||
LA464
|
||||
|
||||
12. Elbrus E2000:
|
||||
E2K
|
||||
|
||||
+41
-15
@@ -25,14 +25,28 @@ jobs:
|
||||
echo "FROM quay.io/pypa/manylinux1_x86_64
|
||||
COPY . /tmp/openblas
|
||||
RUN cd /tmp/openblas && \
|
||||
COMMON_FLAGS='DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32' && \
|
||||
BTYPE='BINARY=64' CC=gcc && \
|
||||
make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE && \
|
||||
make -C test $COMMON_FLAGS $BTYPE && \
|
||||
make -C ctest $COMMON_FLAGS $BTYPE && \
|
||||
make -C utest $COMMON_FLAGS $BTYPE" > Dockerfile
|
||||
CC=gcc && \
|
||||
make QUIET_MAKE=1 BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C test BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C ctest BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C utest BINARY=64 DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32" > Dockerfile
|
||||
docker build .
|
||||
displayName: Run manylinux1 docker build
|
||||
- job: manylinux_32bit
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: |
|
||||
echo "FROM quay.io/pypa/manylinux2014_i686
|
||||
COPY . /tmp/openblas
|
||||
RUN cd /tmp/openblas && \
|
||||
CC=gcc && \
|
||||
make QUIET_MAKE=1 BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C test BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C ctest BINARY=32 TARGET=NEHALEM NUM_THREADS=32 && \
|
||||
make -C utest BINARY=32 TARGET=NEHALEM NUM_THREADS=32" > Dockerfile
|
||||
docker build .
|
||||
displayName: Run manylinux 32bit docker build
|
||||
- job: Intel_SDE_skx
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
@@ -141,7 +155,7 @@ jobs:
|
||||
|
||||
- job: OSX_OpenMP
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
@@ -151,7 +165,7 @@ jobs:
|
||||
|
||||
- job: OSX_GCC_Nothreads
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
@@ -164,7 +178,19 @@ jobs:
|
||||
- script: |
|
||||
brew update
|
||||
make CC=gcc-12 FC=gfortran-12
|
||||
|
||||
|
||||
- job: OSX_LLVM_flangnew
|
||||
pool:
|
||||
vmImage: 'macOS-latest'
|
||||
variables:
|
||||
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
brew install llvm flang
|
||||
make TARGET=NEHALEM CC=/usr/local/opt/llvm/bin/clang FC=/usr/local/opt/flang/bin/flang NO_SHARED=1
|
||||
|
||||
- job: OSX_OpenMP_Clang
|
||||
pool:
|
||||
vmImage: 'macOS-latest'
|
||||
@@ -195,7 +221,7 @@ jobs:
|
||||
|
||||
- job: OSX_dynarch_cmake
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
variables:
|
||||
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
@@ -212,7 +238,7 @@ jobs:
|
||||
vmImage: 'macOS-latest'
|
||||
variables:
|
||||
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17643/m_HPCKit_p_2021.2.0.2903_offline.dmg
|
||||
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/edb4dc2f-266f-47f2-8d56-21bc7764e119/m_HPCKit_p_2023.2.0.49443.dmg
|
||||
LIBRARY_PATH: /usr/local/opt/llvm/lib
|
||||
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler
|
||||
steps:
|
||||
@@ -242,7 +268,7 @@ jobs:
|
||||
|
||||
- job: OSX_NDK_ARMV7
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
@@ -252,7 +278,7 @@ jobs:
|
||||
|
||||
- job: OSX_IOS_ARMV8
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
variables:
|
||||
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -arch arm64 -miphoneos-version-min=10.0
|
||||
@@ -262,7 +288,7 @@ jobs:
|
||||
|
||||
- job: OSX_IOS_ARMV7
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
variables:
|
||||
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
CFLAGS: -O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -arch armv7 -miphoneos-version-min=5.1
|
||||
@@ -272,7 +298,7 @@ jobs:
|
||||
|
||||
- job: OSX_xbuild_DYNAMIC_ARM64
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
vmImage: 'macOS-13'
|
||||
variables:
|
||||
CC: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -arch arm64
|
||||
|
||||
+102
-6
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
TOPDIR = ..
|
||||
include $(TOPDIR)/Makefile.system
|
||||
|
||||
@@ -56,9 +84,15 @@ GOTO_LAPACK_TARGETS=
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
GOTO_HALF_TARGETS=sbgemm.goto
|
||||
GOTO_BFLOAT_TARGETS=bgemm.goto sbgemm.goto bgemv.goto sbgemv.goto
|
||||
else
|
||||
GOTO_HALF_TARGETS=
|
||||
GOTO_BFLOAT_TARGETS=
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
GOTO_HFLOAT_TARGETS=shgemm.goto
|
||||
else
|
||||
GOTO_HFLOAT_TARGETS=
|
||||
endif
|
||||
|
||||
ifeq ($(OSNAME), WINNT)
|
||||
@@ -103,7 +137,8 @@ goto :: slinpack.goto dlinpack.goto clinpack.goto zlinpack.goto \
|
||||
sgetri.goto dgetri.goto cgetri.goto zgetri.goto \
|
||||
spotrf.goto dpotrf.goto cpotrf.goto zpotrf.goto \
|
||||
ssymm.goto dsymm.goto csymm.goto zsymm.goto \
|
||||
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto $(GOTO_HALF_TARGETS)
|
||||
somatcopy.goto domatcopy.goto comatcopy.goto zomatcopy.goto \
|
||||
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto $(GOTO_BFLOAT_TARGETS) $(GOTO_HFLOAT_TARGETS)
|
||||
|
||||
acml :: slinpack.acml dlinpack.acml clinpack.acml zlinpack.acml \
|
||||
scholesky.acml dcholesky.acml ccholesky.acml zcholesky.acml \
|
||||
@@ -276,7 +311,8 @@ goto :: sgemm.goto dgemm.goto cgemm.goto zgemm.goto \
|
||||
samin.goto damin.goto camin.goto zamin.goto \
|
||||
smin.goto dmin.goto \
|
||||
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto \
|
||||
snrm2.goto dnrm2.goto scnrm2.goto dznrm2.goto $(GOTO_LAPACK_TARGETS) $(GOTO_HALF_TARGETS)
|
||||
somatcopy.goto domatcopy.goto comatcopy.goto zomatcopy.goto \
|
||||
snrm2.goto dnrm2.goto scnrm2.goto dznrm2.goto $(GOTO_LAPACK_TARGETS) $(GOTO_BFLOAT_TARGETS) $(GOTO_HFLOAT_TARGETS)
|
||||
|
||||
acml :: slinpack.acml dlinpack.acml clinpack.acml zlinpack.acml \
|
||||
scholesky.acml dcholesky.acml ccholesky.acml zcholesky.acml \
|
||||
@@ -627,8 +663,19 @@ zcholesky.essl : zcholesky.$(SUFFIX)
|
||||
|
||||
##################################### Sgemm ####################################################
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemm.goto : bgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
sbgemm.goto : sbgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
bgemv.goto : bgemv.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
sbgemv.goto : sbgemv.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
shgemm.goto : shgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
endif
|
||||
|
||||
sgemm.goto : sgemm.$(SUFFIX) ../$(LIBNAME)
|
||||
@@ -2906,6 +2953,29 @@ dznrm2.goto : dznrm2.$(SUFFIX) ../$(LIBNAME)
|
||||
dznrm2.atlas : dznrm2.$(SUFFIX)
|
||||
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBATLAS) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
|
||||
|
||||
###################################################################################################
|
||||
|
||||
############################################ SOMATCOPY ############################################
|
||||
somatcopy.goto : somatcopy.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
|
||||
###################################################################################################
|
||||
|
||||
############################################ DOMATCOPY ############################################
|
||||
domatcopy.goto : domatcopy.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
|
||||
###################################################################################################
|
||||
|
||||
############################################ COMATCOPY ############################################
|
||||
comatcopy.goto : comatcopy.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
|
||||
###################################################################################################
|
||||
|
||||
############################################ ZOMATCOPY ############################################
|
||||
zomatcopy.goto : zomatcopy.$(SUFFIX) ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
|
||||
|
||||
###################################################################################################
|
||||
|
||||
@@ -2934,8 +3004,15 @@ zcholesky.$(SUFFIX) : cholesky.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemm.$(SUFFIX) : gemm.c
|
||||
$(CC) $(CFLAGS) -c -DBFLOAT16 -DBGEMM -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
sbgemm.$(SUFFIX) : gemm.c
|
||||
$(CC) $(CFLAGS) -c -DHALF -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
$(CC) $(CFLAGS) -c -DBFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16),1)
|
||||
shgemm.$(SUFFIX) : gemm.c
|
||||
$(CC) $(CFLAGS) -c -DHFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
endif
|
||||
|
||||
sgemm.$(SUFFIX) : gemm.c
|
||||
@@ -3073,6 +3150,13 @@ dgemv.$(SUFFIX) : gemv.c
|
||||
cgemv.$(SUFFIX) : gemv.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
|
||||
ifeq ($(BUILD_BFLOAT16),1)
|
||||
bgemv.$(SUFFIX) : gemv.c
|
||||
$(CC) $(CFLAGS) -c -DBFLOAT16 -DBGEMM -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
sbgemv.$(SUFFIX) : gemv.c
|
||||
$(CC) $(CFLAGS) -c -DBFLOAT16 -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
endif ()
|
||||
|
||||
zgemv.$(SUFFIX) : gemv.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
|
||||
|
||||
@@ -3435,6 +3519,18 @@ scnrm2.$(SUFFIX) : nrm2.c
|
||||
dznrm2.$(SUFFIX) : nrm2.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
|
||||
|
||||
somatcopy.$(SUFFIX) : omatcopy.c
|
||||
$(CC) $(CFLAGS) -c -UCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
|
||||
domatcopy.$(SUFFIX) : omatcopy.c
|
||||
$(CC) $(CFLAGS) -c -UCOMPLEX -DDOUBLE -o $(@F) $^
|
||||
|
||||
comatcopy.$(SUFFIX) : omatcopy.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^
|
||||
|
||||
zomatcopy.$(SUFFIX) : omatcopy.c
|
||||
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
|
||||
|
||||
|
||||
smallscaling: smallscaling.c ../$(LIBNAME)
|
||||
$(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm -lpthread
|
||||
@@ -3442,4 +3538,4 @@ smallscaling: smallscaling.c ../$(LIBNAME)
|
||||
clean ::
|
||||
@rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl smallscaling
|
||||
|
||||
include $(TOPDIR)/Makefile.tail
|
||||
include $(TOPDIR)/Makefile.tail
|
||||
|
||||
+20
-1
@@ -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++){
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/***************************************************************************
|
||||
Copyright (c) 2024, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "bench.h"
|
||||
|
||||
#undef OMATCOPY
|
||||
|
||||
#ifndef COMPLEX
|
||||
#ifdef DOUBLE
|
||||
#define OMATCOPY BLASFUNC(domatcopy)
|
||||
#else
|
||||
#define OMATCOPY BLASFUNC(somatcopy)
|
||||
#endif
|
||||
#else
|
||||
#ifdef DOUBLE
|
||||
#define OMATCOPY BLASFUNC(zomatcopy)
|
||||
#else
|
||||
#define OMATCOPY BLASFUNC(comatcopy)
|
||||
#endif
|
||||
#endif
|
||||
int main(int argc, char *argv[]){
|
||||
FLOAT *a, *b;
|
||||
FLOAT alpha[] = {1.0, 0.0};
|
||||
char trans = 'N';
|
||||
char order = 'C';
|
||||
blasint crows, ccols, clda, cldb;
|
||||
int loops = 1;
|
||||
char *p;
|
||||
|
||||
int from = 1;
|
||||
int to = 200;
|
||||
int step = 1;
|
||||
int i, j;
|
||||
|
||||
double time1, timeg;
|
||||
|
||||
argc--;argv++;
|
||||
|
||||
if (argc > 0) { from = atol(*argv); argc--; argv++; }
|
||||
if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++; }
|
||||
if (argc > 0) { step = atol(*argv); argc--; argv++; }
|
||||
|
||||
if ((p = getenv("OPENBLAS_TRANS"))) {
|
||||
trans=*p;
|
||||
}
|
||||
if ((p = getenv("OPENBLAS_ORDER"))) {
|
||||
order=*p;
|
||||
}
|
||||
TOUPPER(trans);
|
||||
TOUPPER(order);
|
||||
fprintf(stderr, "From : %3d To : %3d Step=%d : Trans=%c : Order=%c\n", from, to, step, trans, order);
|
||||
p = getenv("OPENBLAS_LOOPS");
|
||||
if ( p != NULL ) {
|
||||
loops = atoi(p);
|
||||
}
|
||||
|
||||
if (( a = (FLOAT *)malloc(sizeof(FLOAT) * to * to * COMPSIZE)) == NULL) {
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
if (( b = (FLOAT *)malloc(sizeof(FLOAT) * to * to * COMPSIZE)) == NULL) {
|
||||
fprintf(stderr,"Out of Memory!!\n");exit(1);
|
||||
}
|
||||
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
for (i = 0; i < to * to * COMPSIZE; i++) {
|
||||
a[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
|
||||
}
|
||||
for (i = 0; i < to * to * COMPSIZE; i++) {
|
||||
b[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
|
||||
}
|
||||
|
||||
fprintf(stderr, " SIZE Flops Time\n");
|
||||
for (i = from; i <= to; i += step) {
|
||||
cldb = clda = crows = ccols = i;
|
||||
fprintf(stderr, " ROWS=%4d, COLS=%4d : ", (int)crows, (int)ccols);
|
||||
begin();
|
||||
|
||||
for (j=0; j<loops; j++) {
|
||||
OMATCOPY (&order, &trans, &crows, &ccols, alpha, a, &clda, b, &cldb);
|
||||
}
|
||||
|
||||
end();
|
||||
time1 = getsec();
|
||||
|
||||
timeg = time1/loops;
|
||||
fprintf(stderr,
|
||||
" %10.2f MFlops %10.6f sec\n",
|
||||
COMPSIZE * COMPSIZE * (double)ccols * (double)crows / timeg * 1.e-6, time1);
|
||||
}
|
||||
|
||||
free(a);
|
||||
free(b);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -43,7 +43,17 @@ have all what it takes to build OpenBLAS from source, plus `python` and
|
||||
$ python -mpip install numpy meson ninja pytest pytest-benchmark
|
||||
```
|
||||
|
||||
The benchmark syntax is consistent with that of `pytest-benchmark` framework. The incantation to run the suite locally is `$ pytest benchmark/pybench/benchmarks/test_blas.py`.
|
||||
The Meson build system looks for the installed OpenBLAS using pkgconfig, so the openblas.pc created during the OpenBLAS build needs
|
||||
to be somewhere on the search path of pkgconfig or in a folder pointed to by the environment variable PKG_CONFIG_PATH.
|
||||
|
||||
If you want to build the benchmark suite using flang (or flang-new) instead of gfortran for the Fortran parts, you currently need
|
||||
to edit the meson.build file and change the line `'fortran_std=legacy'` to `'fortran_std=none'` to work around an incompatibility
|
||||
between Meson and flang.
|
||||
|
||||
If you are building and running the benchmark under MS Windows, it may be necessary to copy the generated openblas_wrap module from
|
||||
your build folder to the `benchmarks` folder.
|
||||
|
||||
The benchmark syntax is consistent with that of `pytest-benchmark` framework. The incantation to run the suite locally is `$ pytest benchmark/pybench/benchmarks/bench_blas.py`.
|
||||
|
||||
An ASV compatible benchmark suite is planned but currently not implemented.
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ hostarch=`uname -m | sed -e 's/i.86/x86/'`
|
||||
if [ "$hostos" = "AIX" ] || [ "$hostos" = "SunOS" ]; then
|
||||
hostarch=`uname -p`
|
||||
fi
|
||||
if [ "$hostarch" = "evbarm" ]; then
|
||||
hostarch=`uname -p`
|
||||
fi
|
||||
case "$hostarch" in
|
||||
amd64) hostarch=x86_64 ;;
|
||||
arm*) [ "$hostarch" = "arm64" ] || hostarch='arm' ;;
|
||||
@@ -331,6 +334,24 @@ if [ "$architecture" = "arm64" ]; then
|
||||
rm -rf "$tmpd"
|
||||
fi
|
||||
|
||||
no_sme=0
|
||||
if [ "$architecture" = "arm64" ]; then
|
||||
tmpd=$(mktemp -d 2>/dev/null || mktemp -d -t 'OBC')
|
||||
tmpf="$tmpd/a.S"
|
||||
printf ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n">> "$tmpf"
|
||||
args=" -march=armv9-a+sve2+sme -c -o $tmpf.o $tmpf"
|
||||
no_sme=0
|
||||
{
|
||||
$compiler_name $flags $args >/dev/null 2>&1
|
||||
} || {
|
||||
args=" -march=armv9-a+sme -c -o $tmpf.o $tmpf"
|
||||
$compiler_name $flags $args >/dev/null 2>&1
|
||||
} || {
|
||||
no_sme=1
|
||||
}
|
||||
rm -rf "$tmpd"
|
||||
fi
|
||||
|
||||
c11_atomics=0
|
||||
case "$data" in
|
||||
*HAVE_C11*)
|
||||
@@ -472,6 +493,7 @@ done
|
||||
printf "CEXTRALIB=%s %s %s\n" "$linker_L" "$linker_l" "$linker_a"
|
||||
[ "$no_msa" -eq 1 ] && printf "NO_MSA=1\n"
|
||||
[ "$no_sve" -eq 1 ] && printf "NO_SVE=1\n"
|
||||
[ "$no_sme" -eq 1 ] && printf "NO_SME=1\n"
|
||||
[ "$no_rv64gv" -eq 1 ] && printf "NO_RV64GV=1\n"
|
||||
[ "$no_avx512" -eq 1 ] && printf "NO_AVX512=1\n"
|
||||
[ "$no_avx512bf" -eq 1 ] && printf "NO_AVX512BF16=1\n"
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2025, The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#ifndef CBLAS_H
|
||||
#define CBLAS_H
|
||||
|
||||
@@ -407,13 +435,13 @@ void cblas_cimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum
|
||||
void cblas_zimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double* calpha, double* a,
|
||||
OPENBLAS_CONST blasint clda, OPENBLAS_CONST blasint cldb);
|
||||
|
||||
void cblas_sgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float cbeta,
|
||||
void cblas_sgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float cbeta,
|
||||
float *c, OPENBLAS_CONST blasint cldc);
|
||||
void cblas_dgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double cbeta,
|
||||
void cblas_dgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double cbeta,
|
||||
double *c, OPENBLAS_CONST blasint cldc);
|
||||
void cblas_cgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float *calpha, float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float *cbeta,
|
||||
void cblas_cgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float *calpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float *cbeta,
|
||||
float *c, OPENBLAS_CONST blasint cldc);
|
||||
void cblas_zgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double *calpha, double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double *cbeta,
|
||||
void cblas_zgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double *calpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double *cbeta,
|
||||
double *c, OPENBLAS_CONST blasint cldc);
|
||||
|
||||
void cblas_sgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
|
||||
@@ -437,15 +465,22 @@ void cblas_sbdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPEN
|
||||
void cblas_sbf16tos(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, float *out, OPENBLAS_CONST blasint incout);
|
||||
/* convert BFLOAT16 array to double array */
|
||||
void cblas_dbf16tod(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, double *out, OPENBLAS_CONST blasint incout);
|
||||
void cblas_bgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 beta, bfloat16 *y, OPENBLAS_CONST blasint incy);
|
||||
/* dot production of BFLOAT16 input arrays, and output as float */
|
||||
float cblas_sbdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 *y, OPENBLAS_CONST blasint incy);
|
||||
void cblas_sbgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
|
||||
|
||||
void cblas_bgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
|
||||
OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST bfloat16 beta, bfloat16 *C, OPENBLAS_CONST blasint ldc);
|
||||
void cblas_sbgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
|
||||
OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
|
||||
void cblas_sbgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
|
||||
OPENBLAS_CONST float * alpha_array, OPENBLAS_CONST bfloat16 ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST bfloat16 ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST float * beta_array, float ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
|
||||
|
||||
/*** FLOAT16 extensions ***/
|
||||
void cblas_shgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
|
||||
OPENBLAS_CONST float alpha, OPENBLAS_CONST hfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST hfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
+25
-14
@@ -31,22 +31,23 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -wd981")
|
||||
endif ()
|
||||
|
||||
if (USE_OPENMP)
|
||||
# USE_SIMPLE_THREADED_LEVEL3 = 1
|
||||
# NO_AFFINITY = 1
|
||||
find_package(OpenMP REQUIRED)
|
||||
if (OpenMP_FOUND)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} ${OpenMP_C_FLAGS} -DUSE_OPENMP")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} ${OpenMP_Fortran_FLAGS}")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
|
||||
if (DYNAMIC_ARCH)
|
||||
if (ARM64)
|
||||
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 9.99)
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
|
||||
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) # SVE ACLE supported in GCC >= 10
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
|
||||
endif ()
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 14) # SME ACLE supported in GCC >= 14
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
|
||||
endif()
|
||||
elseif (${CMAKE_C_COMPILER_ID} MATCHES "Clang")
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 11) # SVE ACLE supported in LLVM >= 11
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
|
||||
endif ()
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19) # SME ACLE supported in LLVM >= 19
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
|
||||
endif()
|
||||
endif ()
|
||||
if (DYNAMIC_LIST)
|
||||
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
|
||||
@@ -93,6 +94,16 @@ if (DYNAMIC_ARCH)
|
||||
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (ZARCH)
|
||||
set(DYNAMIC_CORE Z13 Z14 ZARCH_GENERIC)
|
||||
set(DYN_Z13 1)
|
||||
set(DYN_Z14 1)
|
||||
endif ()
|
||||
|
||||
if (LOONGARCH64)
|
||||
set(DYNAMIC_CORE LA64_GENERIC LA264 LA464)
|
||||
endif ()
|
||||
|
||||
if (EXISTS ${PROJECT_SOURCE_DIR}/config_kernel.h)
|
||||
message (FATAL_ERROR "Your build directory contains a file config_kernel.h, probably from a previous compilation with make. This will conflict with the cmake compilation and cause strange compiler errors - please remove the file before trying again")
|
||||
|
||||
+94
-13
@@ -1,3 +1,30 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
##
|
||||
## Author: Hank Anderson <hank@statease.com>
|
||||
## Description: Ported from portion of OpenBLAS/Makefile.system
|
||||
@@ -59,6 +86,10 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "LS
|
||||
set(BINARY_DEFINED 1)
|
||||
endif ()
|
||||
|
||||
if (ZARCH)
|
||||
set (BINARY_DEFINED 1)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
|
||||
set(BINARY_DEFINED 1)
|
||||
endif ()
|
||||
@@ -84,7 +115,7 @@ endif ()
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC")
|
||||
if (POWER)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -tp pwr8")
|
||||
else ()
|
||||
elseif (X86_64)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -tp px")
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -182,7 +213,9 @@ endif ()
|
||||
|
||||
if (${CORE} STREQUAL A64FX)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${GCC_VERSION} VERSION_GREATER 11.0 OR ${GCC_VERSION} VERSION_EQUAL 11.0)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=a64fx")
|
||||
elseif (${GCC_VERSION} VERSION_GREATER 11.0 OR ${GCC_VERSION} VERSION_EQUAL 11.0)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve -mtune=a64fx")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
|
||||
@@ -190,15 +223,35 @@ if (${CORE} STREQUAL A64FX)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL NEOVERSEV2)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-v2")
|
||||
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v2")
|
||||
else ()
|
||||
if (${GCC_VERSION} VERSION_GREATER 13.0 OR ${GCC_VERSION} VERSION_EQUAL 13.0)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -mcpu=neoverse-v2")
|
||||
elseif (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL NEOVERSEN2)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
|
||||
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v2")
|
||||
else ()
|
||||
if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
|
||||
if (${GCC_VERSION} VERSION_GREATER 11.1 OR ${GCC_VERSION} VERSION_EQUAL 11.1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -207,12 +260,14 @@ endif ()
|
||||
if (${CORE} STREQUAL NEOVERSEV1)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.4-a+sve -mtune=neoverse-v1")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v1")
|
||||
else ()
|
||||
if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve -mtune=neoverse-v1")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16")
|
||||
endif()
|
||||
endif()
|
||||
endif ()
|
||||
@@ -220,10 +275,24 @@ endif ()
|
||||
|
||||
if (${CORE} STREQUAL NEOVERSEN1)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${GCC_VERSION} VERSION_GREATER 9.4 OR ${GCC_VERSION} VERSION_EQUAL 9.4)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve -mtune=neoverse-n1")
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-n1")
|
||||
elseif (${GCC_VERSION} VERSION_GREATER 9.4 OR ${GCC_VERSION} VERSION_EQUAL 9.4)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a -mtune=neoverse-n1")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL AMPEREONE)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-n1")
|
||||
elseif (${GCC_VERSION} VERSION_GREATER 12.1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.6-a+crypto+crc+fp16+sha3+rng -mtune=ampereone")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.6-a+fp16")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -232,21 +301,33 @@ if (${CORE} STREQUAL ARMV8SVE)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8-a+sve")
|
||||
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL ARMV9SME)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
|
||||
else ()
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv9-a+sme")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL CORTEXA510)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL CORTEXA710)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -258,7 +339,7 @@ endif ()
|
||||
|
||||
if (${CORE} STREQUAL CORTEXX2)
|
||||
if (NOT DYNAMIC_ARCH)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
+4
-2
@@ -45,13 +45,15 @@ if (NOT ONLY_CBLAS)
|
||||
|
||||
# TODO: detect whether underscore needed, set #defines and BU appropriately - use try_compile
|
||||
# TODO: set FEXTRALIB flags a la f_check?
|
||||
|
||||
if (NOT (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND x${CMAKE_Fortran_COMPILER_ID} MATCHES "IntelLLVM"))
|
||||
set(BU "_")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define BUNDERSCORE _\n"
|
||||
"#define NEEDBUNDERSCORE 1\n"
|
||||
"#define NEED2UNDERSCORES 0\n")
|
||||
|
||||
else ()
|
||||
set (FCOMMON_OPT "${FCOMMON_OPT} /fp:precise /recursive /names:lowercase /assume:nounderscore")
|
||||
endif()
|
||||
else ()
|
||||
|
||||
#When we only build CBLAS, we set NOFORTRAN=2
|
||||
|
||||
+54
-23
@@ -7,7 +7,7 @@ if (${F_COMPILER} STREQUAL "FLANG" AND NOT CMAKE_Fortran_COMPILER_ID STREQUAL "L
|
||||
# This is for classic Flang. LLVM Flang is handled with gfortran below.
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_FLANG")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fopenmp")
|
||||
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -Mrecursive -Kieee")
|
||||
endif ()
|
||||
@@ -61,21 +61,25 @@ if (${F_COMPILER} STREQUAL "GFORTRAN" OR ${F_COMPILER} STREQUAL "F95" OR CMAKE_F
|
||||
endif ()
|
||||
if (LOONGARCH64)
|
||||
if (BINARY64)
|
||||
CHECK_C_COMPILER_FLAG("-mabi=lp64d" COMPILER_SUPPORT_LP64D_ABI)
|
||||
if(COMPILER_SUPPORT_LP64D_ABI)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64d")
|
||||
else()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64")
|
||||
endif ()
|
||||
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
|
||||
CHECK_C_COMPILER_FLAG("-mabi=lp64d" COMPILER_SUPPORT_LP64D_ABI)
|
||||
if(COMPILER_SUPPORT_LP64D_ABI)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64d")
|
||||
else()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64")
|
||||
endif ()
|
||||
endif ()
|
||||
if (INTERFACE64)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fdefault-integer-8")
|
||||
endif ()
|
||||
else ()
|
||||
CHECK_C_COMPILER_FLAG("-mabi=ilp32d" COMPILER_SUPPORT_ILP32D_ABI)
|
||||
if(COMPILER_SUPPORT_ILP32D_ABI)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=ilp32d")
|
||||
else()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp32")
|
||||
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
|
||||
CHECK_C_COMPILER_FLAG("-mabi=ilp32d" COMPILER_SUPPORT_ILP32D_ABI)
|
||||
if(COMPILER_SUPPORT_ILP32D_ABI)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=ilp32d")
|
||||
else()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp32")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -113,7 +117,7 @@ if (${F_COMPILER} STREQUAL "GFORTRAN" OR ${F_COMPILER} STREQUAL "F95" OR CMAKE_F
|
||||
endif ()
|
||||
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fopenmp")
|
||||
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -124,14 +128,14 @@ if (${F_COMPILER} STREQUAL "INTEL" OR CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
|
||||
endif ()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -recursive -fp-model=consistent")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${F_COMPILER} STREQUAL "FUJITSU")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_FUJITSU")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -147,7 +151,7 @@ if (${F_COMPILER} STREQUAL "IBM")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -q32")
|
||||
endif ()
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -164,7 +168,7 @@ if (${F_COMPILER} STREQUAL "PGI" OR ${F_COMPILER} STREQUAL "PGF95")
|
||||
endif ()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -Mrecursive")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
|
||||
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -191,7 +195,7 @@ if (${F_COMPILER} STREQUAL "PATHSCALE")
|
||||
endif ()
|
||||
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
|
||||
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -229,7 +233,7 @@ if (${F_COMPILER} STREQUAL "OPEN64")
|
||||
|
||||
if (USE_OPENMP)
|
||||
set(FEXTRALIB "${FEXTRALIB} -lstdc++")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -mp")
|
||||
set(OpenMP_Fortran_FLAGS "-mp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -241,25 +245,52 @@ if (${F_COMPILER} STREQUAL "SUN")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -m64")
|
||||
endif ()
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -xopenmp=parallel")
|
||||
set(OpenMP_Fortran_FLAGS "-xopenmp=parallel" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${F_COMPILER} STREQUAL "COMPAQ")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_COMPAQ")
|
||||
if (USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -openmp")
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${F_COMPILER} STREQUAL "CRAY")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_INTEL")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_CRAYFC")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -hnopattern")
|
||||
if (INTERFACE64)
|
||||
set (FCOMMON_OPT "${FCOMMON_OPT} -s integer64")
|
||||
endif ()
|
||||
if (NOT USE_OPENMP)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -O noomp")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fno-openmp")
|
||||
else ()
|
||||
set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (${F_COMPILER} STREQUAL "NAGFOR")
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_NAG")
|
||||
if (INTERFACE64)
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -i8")
|
||||
endif ()
|
||||
# Options from Makefile.system
|
||||
# -dcfuns: Enable non-standard double precision complex intrinsic functions
|
||||
# -ieee=full: enables all IEEE arithmetic facilities including non-stop arithmetic.
|
||||
# -w=obs: Suppress warning messages about obsolescent features
|
||||
# -thread_safe: Compile code for safe execution in a multi-threaded environment.
|
||||
# -recursive: Specifies that procedures are RECURSIVE by default.
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -dcfuns -recursive -ieee=full -w=obs -thread_safe")
|
||||
# Options from Reference-LAPACK
|
||||
# Suppress compiler banner and summary
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -quiet")
|
||||
# Disable other common warnings
|
||||
# -w=x77: Suppress warning messages about Fortran 77 features
|
||||
# -w=ques: Suppress warning messages about questionable usage
|
||||
# -w=unused: Suppress warning messages about unused variables
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -w=x77 -w=ques -w=unused")
|
||||
if (USE_OPENMP)
|
||||
set(OpenMP_Fortran_FLAGS "-openmp" CACHE STRING "OpenMP Fortran compiler flags")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
# helper functions for the kernel CMakeLists.txt
|
||||
|
||||
function(SetFallback KERNEL SOURCE_PATH)
|
||||
@@ -79,6 +107,10 @@ macro(SetDefaultL1)
|
||||
SetFallback(CROTKERNEL zrot.S)
|
||||
SetFallback(ZROTKERNEL zrot.S)
|
||||
SetFallback(XROTKERNEL zrot.S)
|
||||
SetFallback(SROTMKERNEL rotm.S)
|
||||
SetFallback(DROTMKERNEL rotm.S)
|
||||
SetFallback(QROTMKERNEL rotm.S)
|
||||
SetFallback(BSCALKERNEL ../generic/scal.c)
|
||||
SetFallback(SSCALKERNEL scal.S)
|
||||
SetFallback(DSCALKERNEL scal.S)
|
||||
SetFallback(CSCALKERNEL zscal.S)
|
||||
@@ -138,6 +170,8 @@ if (BUILD_BFLOAT16)
|
||||
SetFallback(SHSWAPKERNEL ../arm/swap.c)
|
||||
SetFallback(TOBF16KERNEL ../x86_64/tobf16.c)
|
||||
SetFallback(BF16TOKERNEL ../x86_64/bf16to.c)
|
||||
SetFallback(BGEMVNKERNEL ../generic/gemv_n.c)
|
||||
SetFallback(BGEMVTKERNEL ../generic/gemv_t.c)
|
||||
SetFallback(SBGEMVNKERNEL ../x86_64/sbgemv_n.c)
|
||||
SetFallback(SBGEMVTKERNEL ../x86_64/sbgemv_t.c)
|
||||
endif ()
|
||||
@@ -190,6 +224,8 @@ macro(SetDefaultL2)
|
||||
SetFallback(XHEMV_V_KERNEL ../generic/zhemv_k.c)
|
||||
SetFallback(XHEMV_M_KERNEL ../generic/zhemv_k.c)
|
||||
if (BUILD_BFLOAT16)
|
||||
SetFallback(BGEMVNKERNEL ../generic/gemv_n.c)
|
||||
SetFallback(BGEMVTKERNEL ../generic/gemv_t.c)
|
||||
SetFallback(SBGEMVNKERNEL ../x86_64/sbgemv_n.c)
|
||||
SetFallback(SBGEMVTKERNEL ../x86_64/sbgemv_t.c)
|
||||
SetFallback(SHGERKERNEL ../generic/ger.c)
|
||||
@@ -203,6 +239,16 @@ macro(SetDefaultL3)
|
||||
SetFallback(ZGEADD_KERNEL ../generic/zgeadd.c)
|
||||
if (BUILD_BFLOAT16)
|
||||
SetFallback(SHGEADD_KERNEL ../generic/geadd.c)
|
||||
SetFallback(BGEMMKERNEL ../generic/gemmkernel_2x2.c)
|
||||
SetFallback(BGEMM_BETA ../generic/gemm_beta.c)
|
||||
SetFallback(BGEMMINCOPY ../generic/gemm_ncopy_2.c)
|
||||
SetFallback(BGEMMITCOPY ../generic/gemm_tcopy_2.c)
|
||||
SetFallback(BGEMMONCOPY ../generic/gemm_ncopy_2.c)
|
||||
SetFallback(BGEMMOTCOPY ../generic/gemm_tcopy_2.c)
|
||||
SetFallback(BGEMMINCOPYOBJ bgemm_incopy.o)
|
||||
SetFallback(BGEMMITCOPYOBJ bgemm_itcopy.o)
|
||||
SetFallback(BGEMMONCOPYOBJ bgemm_oncopy.o)
|
||||
SetFallback(BGEMMOTCOPYOBJ bgemm_otcopy.o)
|
||||
SetFallback(SBGEMMKERNEL ../generic/gemmkernel_2x2.c)
|
||||
SetFallback(SBGEMM_BETA ../generic/gemm_beta.c)
|
||||
SetFallback(SBGEMMINCOPY ../generic/gemm_ncopy_2.c)
|
||||
|
||||
+10
-5
@@ -11,7 +11,7 @@ set(SCLAUX
|
||||
la_constants.f90
|
||||
sbdsdc.f
|
||||
sbdsqr.f sdisna.f slabad.f slacpy.f sladiv.f slae2.f slaebz.f
|
||||
slaed0.f slaed1.f slaed2.f slaed3.f slaed4.f slaed5.f slaed6.f
|
||||
slaed0.f slaed1.f slaed2.f slaed4.f slaed5.f slaed6.f
|
||||
slaed7.f slaed8.f slaed9.f slaeda.f slaev2.f slagtf.f
|
||||
slagts.f slamrg.f slanst.f
|
||||
slapy2.f slapy3.f slarnv.f
|
||||
@@ -31,7 +31,7 @@ set(DZLAUX
|
||||
dbdsdc.f
|
||||
dbdsvdx.f dstevx.f dstein.f
|
||||
dbdsqr.f ddisna.f dlabad.f dlacpy.f dladiv.f dlae2.f dlaebz.f
|
||||
dlaed0.f dlaed1.f dlaed2.f dlaed3.f dlaed4.f dlaed5.f dlaed6.f
|
||||
dlaed0.f dlaed1.f dlaed2.f dlaed4.f dlaed5.f dlaed6.f
|
||||
dlaed7.f dlaed8.f dlaed9.f dlaeda.f dlaev2.f dlagtf.f
|
||||
dlagts.f dlamrg.f dlanst.f
|
||||
dlapy2.f dlapy3.f dlarnv.f
|
||||
@@ -517,7 +517,7 @@ set(SCLAUX
|
||||
scombssq.c sbdsvdx.c sstevx.c sstein.c
|
||||
sbdsdc.c
|
||||
sbdsqr.c sdisna.c slabad.c slacpy.c sladiv.c slae2.c slaebz.c
|
||||
slaed0.c slaed1.c slaed2.c slaed3.c slaed4.c slaed5.c slaed6.c
|
||||
slaed0.c slaed1.c slaed2.c slaed4.c slaed5.c slaed6.c
|
||||
slaed7.c slaed8.c slaed9.c slaeda.c slaev2.c slagtf.c
|
||||
slagts.c slamrg.c slanst.c
|
||||
slapy2.c slapy3.c slarnv.c
|
||||
@@ -536,7 +536,7 @@ set(DZLAUX
|
||||
dbdsdc.c
|
||||
dbdsvdx.c dstevx.c dstein.c
|
||||
dbdsqr.c ddisna.c dlabad.c dlacpy.c dladiv.c dlae2.c dlaebz.c
|
||||
dlaed0.c dlaed1.c dlaed2.c dlaed3.c dlaed4.c dlaed5.c dlaed6.c
|
||||
dlaed0.c dlaed1.c dlaed2.c dlaed4.c dlaed5.c dlaed6.c
|
||||
dlaed7.c dlaed8.c dlaed9.c dlaeda.c dlaev2.c dlagtf.c
|
||||
dlagts.c dlamrg.c dlanst.c
|
||||
dlapy2.c dlapy3.c dlarnv.c
|
||||
@@ -1018,7 +1018,12 @@ foreach (LA_FILE ${LA_GEN_SRC})
|
||||
endforeach ()
|
||||
|
||||
if (NOT C_LAPACK)
|
||||
set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS}")
|
||||
# The below line is duplicating Fortran flags but NAG has a few flags
|
||||
# that cannot be specified twice. It's possible this is not needed for
|
||||
# any compiler, but for safety, we only turn off for NAG
|
||||
if (NOT ${F_COMPILER} STREQUAL "NAGFOR")
|
||||
set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS}")
|
||||
endif ()
|
||||
if (${F_COMPILER} STREQUAL "GFORTRAN")
|
||||
set_source_files_properties(${LA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_FFLAGS} -fno-tree-vectorize")
|
||||
endif()
|
||||
|
||||
+8
-6
@@ -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
|
||||
|
||||
@@ -9,5 +9,5 @@ Name: OpenBLAS
|
||||
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
|
||||
Version: @OpenBLAS_VERSION@
|
||||
URL: https://github.com/OpenMathLib/OpenBLAS
|
||||
Libs: @OpenMP_C_FLAGS@ -L${libdir} -l${libnameprefix}openblas${libnamesuffix}${libsuffix}
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -l${libnameprefix}openblas${libnamesuffix}${libsuffix}
|
||||
Cflags: -I${includedir} @OpenMP_C_FLAGS@
|
||||
|
||||
+209
-9
@@ -1,3 +1,31 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
|
||||
##
|
||||
## Author: Hank Anderson <hank@statease.com>
|
||||
## Description: Ported from OpenBLAS/Makefile.prebuild
|
||||
@@ -58,7 +86,7 @@ set(TARGET_CONF_TEMP "${PROJECT_BINARY_DIR}/${TARGET_CONF}.tmp")
|
||||
|
||||
# c_check
|
||||
set(FU "")
|
||||
if (APPLE OR (MSVC AND NOT ${CMAKE_C_COMPILER_ID} MATCHES "Clang"))
|
||||
if (APPLE OR (MSVC AND NOT (${CMAKE_C_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM")))
|
||||
set(FU "_")
|
||||
endif()
|
||||
if(MINGW AND NOT MINGW64)
|
||||
@@ -131,6 +159,8 @@ if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSS
|
||||
set(HAVE_SSE2 1)
|
||||
set(HAVE_SSE3 1)
|
||||
set(HAVE_SSSE3 1)
|
||||
set(BGEMM_UNROLL_M 8)
|
||||
set(BGEMM_UNROLL_N 4)
|
||||
set(SBGEMM_UNROLL_M 8)
|
||||
set(SBGEMM_UNROLL_N 4)
|
||||
set(SGEMM_UNROLL_M 8)
|
||||
@@ -1006,15 +1036,15 @@ endif ()
|
||||
"#define HAVE_SVE\n"
|
||||
"#define ARMV8\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 4)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 4)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 2)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_M 2)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "NEOVERSEN2")
|
||||
elseif ("${TCORE}" STREQUAL "NEOVERSEN2" OR "${TCORE}" STREQUAL "ARMV9SME")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_CODE_SIZE\t65536\n"
|
||||
"#define L1_CODE_LINESIZE\t64\n"
|
||||
@@ -1195,6 +1225,33 @@ endif ()
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "AMPEREONE")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_CODE_SIZE\t16384\n"
|
||||
"#define L1_CODE_LINESIZE\t64\n"
|
||||
"#define L1_CODE_ASSOCIATIVE\t4\n"
|
||||
"#define L1_DATA_SIZE\t65536\n"
|
||||
"#define L1_DATA_LINESIZE\t64\n"
|
||||
"#define L1_DATA_ASSOCIATIVE\t4\n"
|
||||
"#define L2_SIZE\t2097152\n\n"
|
||||
"#define L2_LINESIZE\t64\n"
|
||||
"#define L2_ASSOCIATIVE\t8\n"
|
||||
"#define DTB_DEFAULT_ENTRIES\t64\n"
|
||||
"#define DTB_SIZE\t4096\n"
|
||||
"#define HAVE_VFPV4\n"
|
||||
"#define HAVE_VFPV3\n"
|
||||
"#define HAVE_VFP\n"
|
||||
"#define HAVE_NEON\n"
|
||||
"#define ARMV8\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 4)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "VORTEX")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define ARMV8\n"
|
||||
@@ -1249,6 +1306,25 @@ endif ()
|
||||
set(ZGEMM_UNROLL_M 2)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "ARMV8SVE" OR "${TCORE}" STREQUAL "CORTEXA510" OR "${TCORE}" STREQUAL "CORTEXX2" OR "${TCORE}" STREQUAL "ARMV9")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE\t32768\n"
|
||||
"#define L1_DATA_LINESIZE\t64\n"
|
||||
"#define L2_SIZE\t1048576\n"
|
||||
"#define L2_LINESIZE\t64\n"
|
||||
"#define DTB_DEFAULT_ENTRIES\t64\n"
|
||||
"#define DTB_SIZE\t4096\n"
|
||||
"#define L2_ASSOCIATIVE\t32\n"
|
||||
"#define ARMV8\n")
|
||||
set(SGEMM_UNROLL_M 4)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 4)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 2)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 2)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "P5600")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L2_SIZE 1048576\n"
|
||||
@@ -1331,6 +1407,78 @@ endif ()
|
||||
set(ZGEMM_UNROLL_M 8)
|
||||
set(ZGEMM_UNROLL_N 2)
|
||||
set(SYMV_P 8)
|
||||
elseif ("${TCORE}" STREQUAL "C910V")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 1048576\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 4)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 2)
|
||||
set(CGEMM_UNROLL_N 2)
|
||||
set(ZGEMM_UNROLL_M 2)
|
||||
set(ZGEMM_UNROLL_N 2)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "x280")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 65536\n"
|
||||
"#define L1_LINESIZE 32 \n"
|
||||
"#define L2_SIZE 2097152\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 16)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 8)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "RISCV64_ZVL128B")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 1048576\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
set(SGEMM_UNROLL_M 8)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "RISCV64_ZVL256B")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 65536\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 2097152\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 8)
|
||||
set(ZGEMM_UNROLL_M 8)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(SYMV_P 16)
|
||||
elseif ("${TCORE}" STREQUAL "GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
@@ -1342,13 +1490,61 @@ endif ()
|
||||
"#define L2_ASSOCIATIVE 8\n")
|
||||
elseif ("${TCORE}" STREQUAL "RISCV64_GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 1048576\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
elseif ("${TCORE}" STREQUAL "LA64_GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define DTB_DEFAULT_ENTRIES 64\n")
|
||||
set(SGEMM_UNROLL_M 2)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 2)
|
||||
set(DGEMM_UNROLL_N 8)
|
||||
set(CGEMM_UNROLL_M 1)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 1)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(CGEMM3M_UNROLL_M 2)
|
||||
set(CGEMM3M_UNROLL_N 8)
|
||||
set(ZGEMM3M_UNROLL_M 2)
|
||||
set(ZGEMM3M_UNROLL_N 8)
|
||||
elseif ("${TCORE}" STREQUAL "LA264")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define DTB_DEFAULT_ENTRIES 64\n")
|
||||
set(HAVE_LSX 1)
|
||||
set(SGEMM_UNROLL_M 2)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 8)
|
||||
set(DGEMM_UNROLL_N 4)
|
||||
set(CGEMM_UNROLL_M 8)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 4)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(CGEMM3M_UNROLL_M 2)
|
||||
set(CGEMM3M_UNROLL_N 8)
|
||||
set(ZGEMM3M_UNROLL_M 8)
|
||||
set(ZGEMM3M_UNROLL_N 4)
|
||||
elseif ("${TCORE}" STREQUAL "LA464")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define DTB_DEFAULT_ENTRIES 64\n")
|
||||
set(HAVE_LASX 1)
|
||||
set(HAVE_LSX 1)
|
||||
set(SGEMM_UNROLL_M 16)
|
||||
set(SGEMM_UNROLL_N 8)
|
||||
set(DGEMM_UNROLL_M 16)
|
||||
set(DGEMM_UNROLL_N 6)
|
||||
set(CGEMM_UNROLL_M 16)
|
||||
set(CGEMM_UNROLL_N 4)
|
||||
set(ZGEMM_UNROLL_M 8)
|
||||
set(ZGEMM_UNROLL_N 4)
|
||||
set(CGEMM3M_UNROLL_M 16)
|
||||
set(CGEMM3M_UNROLL_N 8)
|
||||
set(ZGEMM3M_UNROLL_M 16)
|
||||
set(ZGEMM3M_UNROLL_N 6)
|
||||
endif()
|
||||
set(SBGEMM_UNROLL_M 8)
|
||||
set(SBGEMM_UNROLL_N 4)
|
||||
@@ -1361,9 +1557,11 @@ endif ()
|
||||
# GetArch_2nd
|
||||
foreach(float_char S;D;Q;C;Z;X)
|
||||
if (NOT DEFINED ${float_char}GEMM_UNROLL_M)
|
||||
message(STATUS "setting unrollm=2")
|
||||
set(${float_char}GEMM_UNROLL_M 2)
|
||||
endif()
|
||||
if (NOT DEFINED ${float_char}GEMM_UNROLL_N)
|
||||
message(STATUS "setting unrolln=2")
|
||||
set(${float_char}GEMM_UNROLL_N 2)
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -1385,7 +1583,9 @@ else(NOT CMAKE_CROSSCOMPILING)
|
||||
message(STATUS "MSVC")
|
||||
set(GETARCH_FLAGS ${GETARCH_FLAGS} -DFORCE_GENERIC)
|
||||
else()
|
||||
list(APPEND GETARCH_SRC ${PROJECT_SOURCE_DIR}/cpuid.S)
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
list(APPEND GETARCH_SRC ${PROJECT_SOURCE_DIR}/cpuid.S)
|
||||
endif()
|
||||
if (DEFINED TARGET_CORE)
|
||||
set(GETARCH_FLAGS ${GETARCH_FLAGS} -DFORCE_${TARGET_CORE})
|
||||
endif ()
|
||||
|
||||
+124
-33
@@ -1,3 +1,30 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2025, The OpenBLAS Project
|
||||
# All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the OpenBLAS project nor the names of
|
||||
# its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###############################################################################
|
||||
##
|
||||
## Author: Hank Anderson <hank@statease.com>
|
||||
## Description: Ported from OpenBLAS/Makefile.system
|
||||
@@ -21,7 +48,15 @@ endif()
|
||||
# Other files expect CORE, which is actually TARGET and will become TARGET_CORE for kernel build. Confused yet?
|
||||
# It seems we are meant to use TARGET as input and CORE internally as kernel.
|
||||
if(NOT DEFINED CORE AND DEFINED TARGET)
|
||||
set(CORE ${TARGET})
|
||||
if (${TARGET} STREQUAL "LOONGSON3R5")
|
||||
set(CORE "LA464")
|
||||
elseif (${TARGET} STREQUAL "LOONGSON2K1000")
|
||||
set(CORE "LA264")
|
||||
elseif (${TARGET} STREQUAL "LOONGSONGENERIC")
|
||||
set(CORE "LA64_GENERIC)")
|
||||
else ()
|
||||
set(CORE ${TARGET})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# TARGET_CORE will override TARGET which is used in DYNAMIC_ARCH=1.
|
||||
@@ -263,7 +298,7 @@ if (DEFINED TARGET)
|
||||
endif()
|
||||
|
||||
if (${TARGET} STREQUAL POWER10)
|
||||
if (CMAKE_C_COMPILER VERSION VERSION_GREATER 10.2 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.2)
|
||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.2 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.2)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler GCC ${CMAKE_C_COMPILER_VERSION} does not support Power10.")
|
||||
@@ -281,12 +316,19 @@ if (DEFINED TARGET)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math")
|
||||
endif()
|
||||
|
||||
if (${TARGET} STREQUAL Z13)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=z13 -mzvector")
|
||||
endif()
|
||||
if (${TARGET} STREQUAL Z14)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=z14 -mzvector")
|
||||
endif()
|
||||
|
||||
if (${TARGET} STREQUAL NEOVERSEV1)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve_intrinsics -march=armv8.4-a+sve -mtune=neoverse-v1")
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve_intrinsics -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.4 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.4)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve -mtune=neoverse-v1")
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_VERSION} does not support Neoverse V1.")
|
||||
endif()
|
||||
@@ -303,6 +345,19 @@ if (${TARGET} STREQUAL NEOVERSEV1)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (${TARGET} STREQUAL NEOVERSEV2)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv9-a+sve+sve2+bf16 -mtune=neoverse-v2")
|
||||
else ()
|
||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.0 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 13.0)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=neoverse-v2")
|
||||
elseif (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.4 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.4)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler $${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_VERSION} does not support Neoverse V2.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (${TARGET} STREQUAL ARMV8SVE)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv8.2-a+sve")
|
||||
@@ -310,6 +365,9 @@ if (${TARGET} STREQUAL NEOVERSEV1)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.2-a+sve")
|
||||
endif()
|
||||
endif()
|
||||
if (${TARGET} STREQUAL ARMV9SME)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv9-a+sme -O3")
|
||||
endif()
|
||||
if (${TARGET} STREQUAL A64FX)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv8.2-a+sve -mtune=a64fx")
|
||||
@@ -361,6 +419,20 @@ else ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (USE_OPENMP)
|
||||
find_package(OpenMP COMPONENTS C REQUIRED)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_OPENMP")
|
||||
if (NOT NOFORTRAN)
|
||||
find_package(OpenMP COMPONENTS Fortran REQUIRED)
|
||||
# Avoid mixed OpenMP linkage
|
||||
get_target_property(OMP_C_LIB OpenMP::OpenMP_C INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(OMP_Fortran_LIB OpenMP::OpenMP_Fortran INTERFACE_LINK_LIBRARIES)
|
||||
if (NOT OMP_C_LIB STREQUAL OMP_Fortran_LIB)
|
||||
message(FATAL_ERROR "Multiple OpenMP runtime libraries detected. Mixed OpenMP runtime linkage is dangerous. You may pass -DOpenMP_LANG_LIB_NAMES and -DOpenMP_omp_LIBRARY to manually choose the OpenMP library.")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (BINARY64)
|
||||
if (INTERFACE64)
|
||||
# CCOMMON_OPT += -DUSE64BITINT
|
||||
@@ -382,28 +454,45 @@ if (NEED_PIC)
|
||||
if (NOT NOFORTRAN)
|
||||
if (${F_COMPILER} STREQUAL "SUN")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -pic")
|
||||
elseif (${F_COMPILER} STREQUAL "NAGFOR")
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -PIC")
|
||||
else ()
|
||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fPIC")
|
||||
endif ()
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (X86_64 OR ${CORE} STREQUAL POWER10)
|
||||
if (X86_64 OR ${CORE} STREQUAL POWER10 OR ARM64 OR LOONGARCH64)
|
||||
set(SMALL_MATRIX_OPT TRUE)
|
||||
endif ()
|
||||
if (ARM64)
|
||||
set(GEMM_GEMV_FORWARD TRUE)
|
||||
set(SBGEMM_GEMV_FORWARD TRUE)
|
||||
set(BGEMM_GEMV_FORWARD TRUE)
|
||||
endif ()
|
||||
if (POWER)
|
||||
set(GEMM_GEMV_FORWARD TRUE)
|
||||
set(SBGEMM_GEMV_FORWARD TRUE)
|
||||
endif ()
|
||||
if (RISCV64)
|
||||
set(GEMM_GEMV_FORWARD TRUE)
|
||||
endif ()
|
||||
|
||||
if (GEMM_GEMV_FORWARD AND NOT ONLY_CBLAS)
|
||||
if (GEMM_GEMV_FORWARD)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DGEMM_GEMV_FORWARD")
|
||||
endif ()
|
||||
if (SBGEMM_GEMV_FORWARD)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DSBGEMM_GEMV_FORWARD")
|
||||
endif ()
|
||||
if (BGEMM_GEMV_FORWARD)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DBGEMM_GEMV_FORWARD")
|
||||
endif ()
|
||||
if (SMALL_MATRIX_OPT)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DSMALL_MATRIX_OPT")
|
||||
endif ()
|
||||
|
||||
if (DYNAMIC_ARCH)
|
||||
if (X86 OR X86_64 OR ARM64 OR POWER OR RISCV64)
|
||||
if (X86 OR X86_64 OR ARM64 OR POWER OR RISCV64 OR LOONGARCH64 OR ZARCH)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH")
|
||||
if (DYNAMIC_OLDER)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER")
|
||||
@@ -610,11 +699,26 @@ endif()
|
||||
if (BUILD_BFLOAT16)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_BFLOAT16")
|
||||
endif()
|
||||
if (BUILD_HFLOAT16)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBUILD_HFLOAT16")
|
||||
endif()
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${CCOMMON_OPT}")
|
||||
endif()
|
||||
# TODO: not sure what PFLAGS is -hpa
|
||||
set(PFLAGS "${PFLAGS} ${CCOMMON_OPT} -I${TOPDIR} -DPROFILE ${COMMON_PROF}")
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
|
||||
if ("${F_COMPILER}" STREQUAL "FLANG")
|
||||
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fno-unroll-loops")
|
||||
endif ()
|
||||
endif ()
|
||||
if (ARM64 AND CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O2")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FCOMMON_OPT}")
|
||||
# TODO: not sure what FPFLAGS is -hpa
|
||||
@@ -627,27 +731,18 @@ if (LAPACK_STRLEN)
|
||||
endif()
|
||||
set(LAPACK_FPFLAGS "${LAPACK_FPFLAGS} ${FPFLAGS}")
|
||||
|
||||
#Disable -fopenmp for LAPACK Fortran codes on Windows.
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
set(FILTER_FLAGS "-fopenmp;-mp;-openmp;-xopenmp=parallel")
|
||||
foreach (FILTER_FLAG ${FILTER_FLAGS})
|
||||
string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
|
||||
string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS})
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
if (CMAKE_Fortran_COMPILER)
|
||||
if ("${F_COMPILER}" STREQUAL "NAG" OR "${F_COMPILER}" STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
|
||||
set(FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512")
|
||||
if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
|
||||
message(STATUS "removing fortran flags")
|
||||
set(FILTER_FLAGS "${FILTER_FLAGS};-m32;-m64")
|
||||
if ("${F_COMPILER}" STREQUAL "NAGFOR" OR "${F_COMPILER}" STREQUAL "CRAY" OR CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
|
||||
set(FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512")
|
||||
if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*")
|
||||
message(STATUS "removing fortran flags not supported by the compiler")
|
||||
set(FILTER_FLAGS "${FILTER_FLAGS};-m32;-m64")
|
||||
endif ()
|
||||
foreach (FILTER_FLAG ${FILTER_FLAGS})
|
||||
string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
|
||||
string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS})
|
||||
endforeach ()
|
||||
endif ()
|
||||
foreach (FILTER_FLAG ${FILTER_FLAGS})
|
||||
string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
|
||||
string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS})
|
||||
endforeach ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if ("${F_COMPILER}" STREQUAL "GFORTRAN")
|
||||
@@ -667,14 +762,10 @@ endif ()
|
||||
if (${CMAKE_C_COMPILER} STREQUAL "LSB" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DLAPACK_COMPLEX_STRUCTURE")
|
||||
endif ()
|
||||
if (${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM" AND ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DNOCHANGE")
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
if ("${F_COMPILER}" STREQUAL "FLANG")
|
||||
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fno-unroll-loops")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED SUFFIX)
|
||||
set(SUFFIX o)
|
||||
|
||||
@@ -10,6 +10,10 @@ if (${HOST_OS} STREQUAL "WINDOWS")
|
||||
set(HOST_OS WINNT)
|
||||
endif ()
|
||||
|
||||
if (${HOST_OS} STREQUAL "IOS")
|
||||
set(HOST_OS DARWIN)
|
||||
endif ()
|
||||
|
||||
if (${HOST_OS} STREQUAL "LINUX")
|
||||
# check if we're building natively on Android (TERMUX)
|
||||
EXECUTE_PROCESS( COMMAND uname -o COMMAND tr -d '\n' OUTPUT_VARIABLE OPERATING_SYSTEM)
|
||||
@@ -46,6 +50,9 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64.*")
|
||||
set(LOONGARCH64 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64.*")
|
||||
set(RISCV64 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390.*")
|
||||
set(ZARCH 1)
|
||||
set(BINARY 64)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*"))
|
||||
if (NOT BINARY)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
@@ -96,6 +103,8 @@ elseif(X86)
|
||||
set(ARCH "x86")
|
||||
elseif(POWER)
|
||||
set(ARCH "power")
|
||||
elseif(ZARCH)
|
||||
set(ARCH "zarch")
|
||||
elseif(MIPS32)
|
||||
set(ARCH "mips")
|
||||
elseif(MIPS64)
|
||||
@@ -104,6 +113,8 @@ elseif(ARM)
|
||||
set(ARCH "arm")
|
||||
elseif(ARM64)
|
||||
set(ARCH "arm64")
|
||||
elseif(LOONGARCH64)
|
||||
set(ARCH "loongarch64")
|
||||
else()
|
||||
set(ARCH ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "Target Architecture")
|
||||
endif ()
|
||||
@@ -133,6 +144,17 @@ endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ARM64)
|
||||
if (NOT NO_SME)
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/sme.c ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=armv9-a+sve2+sme -c -v -o ${PROJECT_BINARY_DIR}/sme.o ${PROJECT_BINARY_DIR}/sme.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_SME)
|
||||
if (NO_SME EQUAL 1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_SME")
|
||||
endif()
|
||||
file(REMOVE "${PROJECT_BINARY_DIR}/sme.c" "${PROJECT_BINARY_DIR}/sme.o")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CheckIncludeFile)
|
||||
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
|
||||
if (HAVE_C11 EQUAL 1)
|
||||
|
||||
+37
-1
@@ -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
|
||||
@@ -372,6 +392,12 @@ typedef int blasint;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(ARCH_RISCV64)
|
||||
#ifndef YIELDING
|
||||
#define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop;\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#define YIELDING
|
||||
@@ -696,6 +722,7 @@ void gotoblas_profile_init(void);
|
||||
void gotoblas_profile_quit(void);
|
||||
|
||||
int support_avx512(void);
|
||||
int support_sme1(void);
|
||||
|
||||
#ifdef USE_OPENMP
|
||||
|
||||
|
||||
+16
-3
@@ -47,8 +47,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#endif
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
#define RETURN_BY_COMPLEX
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
@@ -104,12 +102,27 @@ static inline int blas_quickdivide(blasint x, blasint y){
|
||||
|
||||
#if defined(ASSEMBLER) && !defined(NEEDPARAM)
|
||||
|
||||
#if !defined(__APPLE__) && !defined(_WIN32)
|
||||
#define OPENBLAS_ARM_TYPE_FUNCTION .type REALNAME, %function ;
|
||||
#else
|
||||
#define OPENBLAS_ARM_TYPE_FUNCTION
|
||||
#endif
|
||||
|
||||
#define PROLOGUE \
|
||||
.arm ;\
|
||||
.global REALNAME ;\
|
||||
OPENBLAS_ARM_TYPE_FUNCTION \
|
||||
REALNAME:
|
||||
|
||||
#define EPILOGUE
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
# define GNUSTACK .section .note.GNU-stack,"",%progbits
|
||||
#else
|
||||
# define GNUSTACK
|
||||
#endif
|
||||
|
||||
#define EPILOGUE \
|
||||
GNUSTACK
|
||||
|
||||
|
||||
#define PROFCODE
|
||||
|
||||
|
||||
+4
-4
@@ -44,9 +44,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define RMB __asm__ __volatile__ ("dmb ishld" : : : "memory")
|
||||
#endif
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
#if defined( F_INTERFACE_FLANG) || defined(F_INTERFACE_PGI)
|
||||
#if defined( F_INTERFACE_FLANG) || (defined(F_INTERFACE_PGI) && (defined(__NVCOMPILER) && (__NVCOMPILER_MAJOR__ < 23 || (__NVCOMPILER_MAJOR__ == 23 && __NVCOMPILER_MINOR__ < 9))))
|
||||
#define RETURN_BY_STACK
|
||||
#else
|
||||
#define RETURN_BY_COMPLEX
|
||||
@@ -55,6 +53,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
|
||||
#ifndef NO_AFFINITY
|
||||
static __inline int WhereAmI(void){
|
||||
uint64_t ret;
|
||||
__asm__ volatile (
|
||||
@@ -67,6 +66,7 @@ static __inline int WhereAmI(void){
|
||||
if ((int)ret <0) ret = 0;
|
||||
return (int)ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline void blas_lock(volatile BLASULONG *address){
|
||||
|
||||
@@ -175,7 +175,7 @@ REALNAME:
|
||||
#define HUGE_PAGESIZE ( 4 << 20)
|
||||
|
||||
#ifndef BUFFERSIZE
|
||||
#if defined(NEOVERSEN1) || defined(NEOVERSEN2) || defined(NEOVERSEV1) || defined(A64FX) || defined(ARMV8SVE)
|
||||
#if defined(NEOVERSEN1) || defined(NEOVERSEN2) || defined(NEOVERSEV1) || defined(A64FX) || defined(ARMV8SVE) || defined(ARMV9SME)
|
||||
#define BUFFER_SIZE (32 << 22)
|
||||
#else
|
||||
#define BUFFER_SIZE (32 << 20)
|
||||
|
||||
+100
@@ -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
|
||||
|
||||
@@ -41,8 +41,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define WMB do { __asm__ __volatile__("": : :"memory"); } while (0)
|
||||
#define RMB
|
||||
|
||||
#define INLINE __attribute__((__always_inline__)) inline
|
||||
|
||||
static inline int blas_quickdivide(blasint x, blasint y) {
|
||||
return x / y;
|
||||
}
|
||||
|
||||
@@ -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__
|
||||
}
|
||||
|
||||
@@ -75,8 +75,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define WMB __sync_synchronize()
|
||||
#define RMB __sync_synchronize()
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
static inline int blas_quickdivide(blasint x, blasint y){
|
||||
@@ -281,9 +279,13 @@ REALNAME: ;\
|
||||
#define GNUSTACK
|
||||
#endif /* defined(__linux__) && defined(__ELF__) */
|
||||
|
||||
#ifdef __clang__
|
||||
#define EPILOGUE .end
|
||||
#else
|
||||
#define EPILOGUE \
|
||||
.end REALNAME ;\
|
||||
GNUSTACK
|
||||
#endif
|
||||
|
||||
#define PROFCODE
|
||||
|
||||
|
||||
+109
-5
@@ -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
|
||||
|
||||
@@ -37,8 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define WMB __sync_synchronize()
|
||||
#define RMB __sync_synchronize()
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
#define RETURN_BY_COMPLEX
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
@@ -75,8 +75,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define WMB __sync_synchronize()
|
||||
#define RMB __sync_synchronize()
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
static inline unsigned int rpcc(void){
|
||||
|
||||
+128
-23
@@ -1,6 +1,6 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* Copyright 2023 The OpenBLAS Project. */
|
||||
/* Copyright 2023, 2025 The OpenBLAS Project. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
@@ -48,8 +48,27 @@ typedef struct {
|
||||
int dtb_entries;
|
||||
int switch_ratio;
|
||||
int offsetA, offsetB, align;
|
||||
#if BUILD_HFLOAT16 == 1
|
||||
int shgemm_p, shgemm_q, shgemm_r;
|
||||
int shgemm_unroll_m, shgemm_unroll_n, shgemm_unroll_mn;
|
||||
|
||||
int (*shgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, hfloat16 *, hfloat16 *, float *, BLASLONG);
|
||||
int (*shgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*shgemm_incopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
|
||||
int (*shgemm_itcopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
|
||||
int (*shgemm_oncopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
|
||||
int (*shgemm_otcopy )(BLASLONG, BLASLONG, hfloat16 *, BLASLONG, hfloat16 *);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if BUILD_BFLOAT16 == 1
|
||||
int bgemm_p, bgemm_q, bgemm_r;
|
||||
int bgemm_unroll_m, bgemm_unroll_n, bgemm_unroll_mn;
|
||||
int bgemm_align_k;
|
||||
|
||||
int sbgemm_p, sbgemm_q, sbgemm_r;
|
||||
int sbgemm_unroll_m, sbgemm_unroll_n, sbgemm_unroll_mn;
|
||||
int sbgemm_align_k;
|
||||
@@ -64,10 +83,10 @@ typedef struct {
|
||||
float (*sbamin_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sbmax_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbmax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbmax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
|
||||
float (*sbnrm2_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sbasum_k) (BLASLONG, float *, BLASLONG);
|
||||
@@ -77,11 +96,16 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
double (*dsbdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*sbrot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
|
||||
int (*sbrotm_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
|
||||
int (*bscal_k) (BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
int (*sbaxpy_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
int (*sbscal_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
int (*sbswap_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*bgemv_n) (BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
|
||||
int (*bgemv_t) (BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16, bfloat16 *, BLASLONG);
|
||||
|
||||
int (*sbgemv_n) (BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
|
||||
int (*sbgemv_t) (BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float, float *, BLASLONG);
|
||||
int (*sbger_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
@@ -89,6 +113,14 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
int (*sbsymv_L) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
int (*sbsymv_U) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
|
||||
int (*bgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, bfloat16 *, bfloat16 *, BLASLONG);
|
||||
int (*bgemm_beta )(BLASLONG, BLASLONG, BLASLONG, bfloat16, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
|
||||
|
||||
int (*bgemm_incopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*bgemm_itcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*bgemm_oncopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
int (*bgemm_otcopy )(BLASLONG, BLASLONG, bfloat16 *, BLASLONG, bfloat16 *);
|
||||
|
||||
int (*sbgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, bfloat16 *, float *, BLASLONG);
|
||||
int (*sbgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
@@ -179,12 +211,12 @@ BLASLONG (*isbmin_k) (BLASLONG, float *, BLASLONG);
|
||||
#endif
|
||||
|
||||
#if (BUILD_SINGLE==1) || (BUILD_DOUBLE ==1) || (BUILD_COMPLEX==1)
|
||||
BLASLONG (*isamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isamax_k)(BLASLONG, float *, BLASLONG);
|
||||
#endif
|
||||
#if (BUILD_SINGLE==1) || (BUILD_COMPLEX==1)
|
||||
BLASLONG (*isamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ismax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*isamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ismax_k) (BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*snrm2_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*sasum_k) (BLASLONG, float *, BLASLONG);
|
||||
#endif
|
||||
@@ -197,6 +229,7 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
//double (*dsdot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
|
||||
int (*srot_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float, float);
|
||||
int (*srotm_k) (BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
|
||||
#endif
|
||||
#if (BUILD_SINGLE==1) || (BUILD_DOUBLE==1) || (BUILD_COMPLEX==1)
|
||||
int (*saxpy_k) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
@@ -221,6 +254,11 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
void (*sgemm_direct) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG , float *, BLASLONG , float * , BLASLONG);
|
||||
int (*sgemm_direct_performant) (BLASLONG M, BLASLONG N, BLASLONG K);
|
||||
#endif
|
||||
#ifdef ARCH_ARM64
|
||||
void (*sgemm_direct) (BLASLONG, BLASLONG, BLASLONG, float *, BLASLONG , float *, BLASLONG , float * , BLASLONG);
|
||||
void (*sgemm_direct_alpha_beta) (BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float * , BLASLONG);
|
||||
#endif
|
||||
|
||||
|
||||
int (*sgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, float, float *, float *, float *, BLASLONG);
|
||||
int (*sgemm_beta )(BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
|
||||
@@ -310,10 +348,10 @@ BLASLONG (*ismin_k) (BLASLONG, float *, BLASLONG);
|
||||
double (*damin_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*dmax_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*dmin_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamin_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmax_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idamin_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmax_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
|
||||
double (*dnrm2_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*dasum_k) (BLASLONG, double *, BLASLONG);
|
||||
@@ -330,6 +368,7 @@ BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
#endif
|
||||
#if (BUILD_DOUBLE==1) || (BUILD_COMPLEX16==1)
|
||||
int (*drot_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double);
|
||||
int (*drotm_k) (BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
|
||||
int (*daxpy_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
int (*dscal_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
int (*dswap_k) (BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
|
||||
@@ -428,10 +467,10 @@ BLASLONG (*idmin_k) (BLASLONG, double *, BLASLONG);
|
||||
xdouble (*qamin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*qmax_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*qmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqamax_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqmax_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqamax_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqmax_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
|
||||
xdouble (*qnrm2_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*qasum_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
@@ -439,6 +478,7 @@ BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
int (*qcopy_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*qdot_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
int (*qrot_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble);
|
||||
int (*qrotm_k) (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *);
|
||||
|
||||
int (*qaxpy_k) (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
int (*qscal_k) (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
|
||||
@@ -520,8 +560,8 @@ BLASLONG (*iqmin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
float (*camax_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*camin_k) (BLASLONG, float *, BLASLONG);
|
||||
|
||||
BLASLONG (*icamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*icamax_k)(BLASLONG, float *, BLASLONG);
|
||||
BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
|
||||
|
||||
float (*cnrm2_k) (BLASLONG, float *, BLASLONG);
|
||||
float (*casum_k) (BLASLONG, float *, BLASLONG);
|
||||
@@ -731,8 +771,8 @@ BLASLONG (*icamin_k)(BLASLONG, float *, BLASLONG);
|
||||
|
||||
double (*zamax_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*zamin_k) (BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*izamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*izamax_k)(BLASLONG, double *, BLASLONG);
|
||||
BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
|
||||
|
||||
double (*znrm2_k) (BLASLONG, double *, BLASLONG);
|
||||
double (*zasum_k) (BLASLONG, double *, BLASLONG);
|
||||
@@ -942,8 +982,8 @@ BLASLONG (*izamin_k)(BLASLONG, double *, BLASLONG);
|
||||
|
||||
xdouble (*xamax_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*xamin_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*ixamax_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*ixamax_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
BLASLONG (*ixamin_k)(BLASLONG, xdouble *, BLASLONG);
|
||||
|
||||
xdouble (*xnrm2_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
xdouble (*xasum_k) (BLASLONG, xdouble *, BLASLONG);
|
||||
@@ -1221,7 +1261,23 @@ extern gotoblas_t *gotoblas;
|
||||
|
||||
#define HAVE_EX_L2 gotoblas -> exclusive_cache
|
||||
|
||||
#if (BUILD_HFLOAT16==1)
|
||||
#define SHGEMM_P gotoblas -> shgemm_p
|
||||
#define SHGEMM_Q gotoblas -> shgemm_q
|
||||
#define SHGEMM_R gotoblas -> shgemm_r
|
||||
#define SHGEMM_UNROLL_M gotoblas -> shgemm_unroll_m
|
||||
#define SHGEMM_UNROLL_N gotoblas -> shgemm_unroll_n
|
||||
#define SHGEMM_UNROLL_MN gotoblas -> shgemm_unroll_mn
|
||||
#endif
|
||||
|
||||
#if (BUILD_BFLOAT16==1)
|
||||
#define BGEMM_P gotoblas -> bgemm_p
|
||||
#define BGEMM_Q gotoblas -> bgemm_q
|
||||
#define BGEMM_R gotoblas -> bgemm_r
|
||||
#define BGEMM_UNROLL_M gotoblas -> bgemm_unroll_m
|
||||
#define BGEMM_UNROLL_N gotoblas -> bgemm_unroll_n
|
||||
#define BGEMM_UNROLL_MN gotoblas -> bgemm_unroll_mn
|
||||
|
||||
#define SBGEMM_P gotoblas -> sbgemm_p
|
||||
#define SBGEMM_Q gotoblas -> sbgemm_q
|
||||
#define SBGEMM_R gotoblas -> sbgemm_r
|
||||
@@ -1349,7 +1405,31 @@ extern gotoblas_t *gotoblas;
|
||||
#define HAVE_EX_L2 0
|
||||
#endif
|
||||
|
||||
#if (BUILD_HFLOAT16 == 1)
|
||||
#define SHGEMM_P SHGEMM_DEFAULT_P
|
||||
#define SHGEMM_Q SHGEMM_DEFAULT_Q
|
||||
#define SHGEMM_R SHGEMM_DEFAULT_R
|
||||
#define SHGEMM_UNROLL_M SHGEMM_DEFAULT_UNROLL_M
|
||||
#define SHGEMM_UNROLL_N SHGEMM_DEFAULT_UNROLL_N
|
||||
#ifdef SHGEMM_DEFAULT_UNROLL_MN
|
||||
#define SHGEMM_UNROLL_MN SHGEMM_DEFAULT_UNROLL_MN
|
||||
#else
|
||||
#define SHGEMM_UNROLL_MN MAX((SHGEMM_UNROLL_M), (SHGEMM_UNROLL_N))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (BUILD_BFLOAT16 == 1)
|
||||
#define BGEMM_P BGEMM_DEFAULT_P
|
||||
#define BGEMM_Q BGEMM_DEFAULT_Q
|
||||
#define BGEMM_R BGEMM_DEFAULT_R
|
||||
#define BGEMM_UNROLL_M BGEMM_DEFAULT_UNROLL_M
|
||||
#define BGEMM_UNROLL_N BGEMM_DEFAULT_UNROLL_N
|
||||
#ifdef BGEMM_DEFAULT_UNROLL_MN
|
||||
#define BGEMM_UNROLL_MN BGEMM_DEFAULT_UNROLL_MN
|
||||
#else
|
||||
#define BGEMM_UNROLL_MN MAX((BGEMM_UNROLL_M), (BGEMM_UNROLL_N))
|
||||
#endif
|
||||
|
||||
#define SBGEMM_P SBGEMM_DEFAULT_P
|
||||
#define SBGEMM_Q SBGEMM_DEFAULT_Q
|
||||
#define SBGEMM_R SBGEMM_DEFAULT_R
|
||||
@@ -1470,6 +1550,7 @@ extern gotoblas_t *gotoblas;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef COMPLEX
|
||||
@@ -1497,6 +1578,30 @@ extern gotoblas_t *gotoblas;
|
||||
#define GEMM_DEFAULT_R DGEMM_DEFAULT_R
|
||||
#define GEMM_DEFAULT_UNROLL_M DGEMM_DEFAULT_UNROLL_M
|
||||
#define GEMM_DEFAULT_UNROLL_N DGEMM_DEFAULT_UNROLL_N
|
||||
#elif defined(HFLOAT16)
|
||||
#define GEMM_P SHGEMM_P
|
||||
#define GEMM_Q SHGEMM_Q
|
||||
#define GEMM_R SHGEMM_R
|
||||
#define GEMM_UNROLL_M SHGEMM_UNROLL_M
|
||||
#define GEMM_UNROLL_N SHGEMM_UNROLL_N
|
||||
#define GEMM_UNROLL_MN SHGEMM_UNROLL_MN
|
||||
#define GEMM_DEFAULT_P SHGEMM_DEFAULT_P
|
||||
#define GEMM_DEFAULT_Q SHGEMM_DEFAULT_Q
|
||||
#define GEMM_DEFAULT_R SHGEMM_DEFAULT_R
|
||||
#define GEMM_DEFAULT_UNROLL_M SHGEMM_DEFAULT_UNROLL_M
|
||||
#define GEMM_DEFAULT_UNROLL_N SHGEMM_DEFAULT_UNROLL_N
|
||||
#elif defined(BFLOAT16) && defined(BGEMM)
|
||||
#define GEMM_P BGEMM_P
|
||||
#define GEMM_Q BGEMM_Q
|
||||
#define GEMM_R BGEMM_R
|
||||
#define GEMM_UNROLL_M BGEMM_UNROLL_M
|
||||
#define GEMM_UNROLL_N BGEMM_UNROLL_N
|
||||
#define GEMM_UNROLL_MN BGEMM_UNROLL_MN
|
||||
#define GEMM_DEFAULT_P BGEMM_DEFAULT_P
|
||||
#define GEMM_DEFAULT_Q BGEMM_DEFAULT_Q
|
||||
#define GEMM_DEFAULT_R BGEMM_DEFAULT_R
|
||||
#define GEMM_DEFAULT_UNROLL_M BGEMM_DEFAULT_UNROLL_M
|
||||
#define GEMM_DEFAULT_UNROLL_N BGEMM_DEFAULT_UNROLL_N
|
||||
#elif defined(BFLOAT16)
|
||||
#define GEMM_P SBGEMM_P
|
||||
#define GEMM_Q SBGEMM_Q
|
||||
|
||||
+1
-3
@@ -78,8 +78,6 @@
|
||||
#define RMB __asm__ __volatile__ ("sync")
|
||||
#endif
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
#ifdef PPC440
|
||||
#define STDERR stdout
|
||||
#define QNONCACHE 0x1
|
||||
@@ -91,7 +89,7 @@
|
||||
|
||||
void *qalloc(int flags, size_t bytes);
|
||||
|
||||
static INLINE void blas_lock(volatile unsigned long *address){
|
||||
static inline void blas_lock(volatile unsigned long *address){
|
||||
|
||||
long int ret, val = 1;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -75,8 +75,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define WMB __sync_synchronize()
|
||||
#define RMB __sync_synchronize()
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
|
||||
|
||||
+6
-2
@@ -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
|
||||
@@ -283,6 +283,10 @@ static __inline unsigned int blas_quickdivide(unsigned int x, unsigned int y){
|
||||
#define RETURN_BY_STACK
|
||||
#endif
|
||||
|
||||
#ifdef F_INTERFACE_CRAYFC
|
||||
#define RETURN_BY_PACKED
|
||||
#endif
|
||||
|
||||
#ifdef F_INTERFACE_FUJITSU
|
||||
#define RETURN_BY_STACK
|
||||
#endif
|
||||
|
||||
+9
-5
@@ -37,9 +37,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define WMB
|
||||
#define RMB
|
||||
|
||||
|
||||
#define INLINE inline
|
||||
|
||||
#define RETURN_BY_COMPLEX
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
@@ -106,9 +103,16 @@ static inline int blas_quickdivide(blasint x, blasint y){
|
||||
.global REALNAME ;\
|
||||
.type REALNAME, %function ;\
|
||||
REALNAME:
|
||||
|
||||
|
||||
#define EPILOGUE
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
# define GNUSTACK .section .note.GNU-stack,"",@progbits
|
||||
#else
|
||||
# define GNUSTACK
|
||||
#endif
|
||||
|
||||
#define EPILOGUE \
|
||||
.size REALNAME, .-REALNAME; \
|
||||
GNUSTACK
|
||||
|
||||
#define PROFCODE
|
||||
|
||||
|
||||
@@ -65,3 +65,10 @@ _cpuid:
|
||||
.subsections_via_symbols
|
||||
|
||||
#endif
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
#if defined(__arm__)
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
#else
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+224
-45
@@ -25,6 +25,7 @@
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef __APPLE__
|
||||
#include <sys/sysctl.h>
|
||||
@@ -33,6 +34,23 @@ size_t length=sizeof(value);
|
||||
int64_t value64;
|
||||
size_t length64=sizeof(value64);
|
||||
#endif
|
||||
#if (defined OS_LINUX || defined OS_ANDROID)
|
||||
#include <asm/hwcap.h>
|
||||
#include <sys/auxv.h>
|
||||
#ifndef HWCAP_CPUID
|
||||
#define HWCAP_CPUID (1 << 11)
|
||||
#endif
|
||||
#ifndef HWCAP_SVE
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#endif
|
||||
#if (defined OS_WINDOWS)
|
||||
#include <winreg.h>
|
||||
#endif
|
||||
|
||||
#define get_cpu_ftr(id, var) ({ \
|
||||
__asm__ __volatile__ ("mrs %0, "#id : "=r" (var)); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#define CPU_UNKNOWN 0
|
||||
#define CPU_ARMV8 1
|
||||
@@ -42,11 +60,11 @@ size_t length64=sizeof(value64);
|
||||
#define CPU_CORTEXA57 3
|
||||
#define CPU_CORTEXA72 4
|
||||
#define CPU_CORTEXA73 5
|
||||
#define CPU_CORTEXA76 23
|
||||
#define CPU_CORTEXA76 23
|
||||
#define CPU_NEOVERSEN1 11
|
||||
#define CPU_NEOVERSEV1 16
|
||||
#define CPU_NEOVERSEN2 17
|
||||
#define CPU_NEOVERSEV2 24
|
||||
#define CPU_NEOVERSEV2 24
|
||||
#define CPU_CORTEXX1 18
|
||||
#define CPU_CORTEXX2 19
|
||||
#define CPU_CORTEXA510 20
|
||||
@@ -61,6 +79,7 @@ size_t length64=sizeof(value64);
|
||||
#define CPU_TSV110 9
|
||||
// Ampere
|
||||
#define CPU_EMAG8180 10
|
||||
#define CPU_AMPERE1 25
|
||||
// Apple
|
||||
#define CPU_VORTEX 13
|
||||
// Fujitsu
|
||||
@@ -93,7 +112,8 @@ static char *cpuname[] = {
|
||||
"CORTEXA710",
|
||||
"FT2000",
|
||||
"CORTEXA76",
|
||||
"NEOVERSEV2"
|
||||
"NEOVERSEV2",
|
||||
"AMPERE1"
|
||||
};
|
||||
|
||||
static char *cpuname_lower[] = {
|
||||
@@ -121,13 +141,19 @@ static char *cpuname_lower[] = {
|
||||
"cortexa710",
|
||||
"ft2000",
|
||||
"cortexa76",
|
||||
"neoversev2"
|
||||
"neoversev2",
|
||||
"ampere1",
|
||||
"ampere1a"
|
||||
};
|
||||
|
||||
static int cpulowperf=0;
|
||||
static int cpumidperf=0;
|
||||
static int cpuhiperf=0;
|
||||
|
||||
int get_feature(char *search)
|
||||
{
|
||||
|
||||
#ifdef __linux
|
||||
#if defined( __linux ) || defined( __NetBSD__ )
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
@@ -158,33 +184,108 @@ int get_feature(char *search)
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int cpusort(const void *model1, const void *model2)
|
||||
{
|
||||
return (*(int*)model2-*(int*)model1);
|
||||
}
|
||||
|
||||
int detect(void)
|
||||
{
|
||||
|
||||
#ifdef __linux
|
||||
|
||||
#if defined( __linux ) || defined( __NetBSD__ )
|
||||
int n,i,ii;
|
||||
int midr_el1;
|
||||
int implementer;
|
||||
int cpucap[1024];
|
||||
int cpucores[1024];
|
||||
FILE *infile;
|
||||
char buffer[512], *p, *cpu_part = NULL, *cpu_implementer = NULL;
|
||||
char cpupart[6],cpuimpl[6];
|
||||
char *cpu_impl=NULL,*cpu_pt=NULL;
|
||||
char buffer[2048], *p, *cpu_part = NULL, *cpu_implementer = NULL;
|
||||
p = (char *) NULL ;
|
||||
|
||||
infile = fopen("/proc/cpuinfo", "r");
|
||||
while (fgets(buffer, sizeof(buffer), infile)) {
|
||||
if ((cpu_part != NULL) && (cpu_implementer != NULL)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((cpu_part == NULL) && !strncmp("CPU part", buffer, 8)) {
|
||||
cpu_part = strchr(buffer, ':') + 2;
|
||||
cpu_part = strdup(cpu_part);
|
||||
} else if ((cpu_implementer == NULL) && !strncmp("CPU implementer", buffer, 15)) {
|
||||
cpu_implementer = strchr(buffer, ':') + 2;
|
||||
cpu_implementer = strdup(cpu_implementer);
|
||||
cpulowperf=cpumidperf=cpuhiperf=0;
|
||||
for (i=0;i<1024;i++)cpucores[i]=0;
|
||||
n=0;
|
||||
infile = fopen("/sys/devices/system/cpu/possible", "r");
|
||||
if (!infile) {
|
||||
infile = fopen("/proc/cpuinfo", "r");
|
||||
while (fgets(buffer, sizeof(buffer), infile)) {
|
||||
if (!strncmp("processor", buffer, 9))
|
||||
n++;
|
||||
}
|
||||
} else {
|
||||
fgets(buffer, sizeof(buffer), infile);
|
||||
sscanf(buffer,"0-%d",&n);
|
||||
n++;
|
||||
}
|
||||
fclose(infile);
|
||||
|
||||
fclose(infile);
|
||||
cpu_implementer=NULL;
|
||||
for (i=0;i<n;i++){
|
||||
sprintf(buffer,"/sys/devices/system/cpu/cpu%d/regs/identification/midr_el1",i);
|
||||
infile= fopen(buffer,"r");
|
||||
if (!infile) {
|
||||
infile = fopen("/proc/cpuinfo", "r");
|
||||
for (ii=0;ii<n;ii++){
|
||||
cpu_part=NULL;cpu_implementer=NULL;
|
||||
while (fgets(buffer, sizeof(buffer), infile)) {
|
||||
if ((cpu_part != NULL) && (cpu_implementer != NULL)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((cpu_part == NULL) && !strncmp("CPU part", buffer, 8)) {
|
||||
cpu_pt = strchr(buffer, ':') + 2;
|
||||
cpu_part = strdup(cpu_pt);
|
||||
cpucores[i]=strtol(cpu_part,NULL,0);
|
||||
|
||||
} else if ((cpu_implementer == NULL) && !strncmp("CPU implementer", buffer, 15)) {
|
||||
cpu_impl = strchr(buffer, ':') + 2;
|
||||
cpu_implementer = strdup(cpu_impl);
|
||||
}
|
||||
|
||||
}
|
||||
if (strstr(cpu_implementer, "0x41")) {
|
||||
if (cpucores[ii] >= 0xd4b) cpuhiperf++;
|
||||
else
|
||||
if (cpucores[ii] >= 0xd07) cpumidperf++;
|
||||
else cpulowperf++;
|
||||
}
|
||||
else cpulowperf++;
|
||||
}
|
||||
fclose(infile);
|
||||
break;
|
||||
} else {
|
||||
(void)fgets(buffer, sizeof(buffer), infile);
|
||||
midr_el1=strtoul(buffer,NULL,16);
|
||||
fclose(infile);
|
||||
implementer = (midr_el1 >> 24) & 0xFF;
|
||||
cpucores[i] = (midr_el1 >> 4) & 0xFFF;
|
||||
sprintf(buffer,"/sys/devices/system/cpu/cpu%d/cpu_capacity",i);
|
||||
infile= fopen(buffer,"r");
|
||||
if (!infile) {
|
||||
if (implementer== 65) {
|
||||
if (cpucores[i] >= 0xd4b) cpuhiperf++;
|
||||
else
|
||||
if (cpucores[i] >= 0xd07) cpumidperf++;
|
||||
else cpulowperf++;
|
||||
}
|
||||
else cpulowperf++;
|
||||
} else {
|
||||
(void)fgets(buffer, sizeof(buffer), infile);
|
||||
sscanf(buffer,"%d",&cpucap[i]);
|
||||
if (cpucap[i] >= 1000) cpuhiperf++;
|
||||
else
|
||||
if (cpucap[i] >= 500) cpumidperf++;
|
||||
else cpulowperf++;
|
||||
fclose(infile);
|
||||
}
|
||||
}
|
||||
sprintf(cpuimpl,"0x%02x",implementer);
|
||||
cpu_implementer=strdup(cpuimpl);
|
||||
}
|
||||
qsort(cpucores,1024,sizeof(int),cpusort);
|
||||
sprintf(cpupart,"0x%03x",cpucores[0]);
|
||||
cpu_part=strdup(cpupart);
|
||||
if(cpu_part != NULL && cpu_implementer != NULL) {
|
||||
// Arm
|
||||
if (strstr(cpu_implementer, "0x41")) {
|
||||
@@ -219,7 +320,7 @@ int detect(void)
|
||||
else if (strstr(cpu_part, "0xd4f")) //NVIDIA Grace et al.
|
||||
return CPU_NEOVERSEV2;
|
||||
else if (strstr(cpu_part, "0xd0b"))
|
||||
return CPU_CORTEXA76;
|
||||
return CPU_CORTEXA76;
|
||||
}
|
||||
// Qualcomm
|
||||
else if (strstr(cpu_implementer, "0x51") && strstr(cpu_part, "0xc00"))
|
||||
@@ -237,6 +338,10 @@ int detect(void)
|
||||
// Ampere
|
||||
else if (strstr(cpu_implementer, "0x50") && strstr(cpu_part, "0x000"))
|
||||
return CPU_EMAG8180;
|
||||
else if (strstr(cpu_implementer, "0xc0")) {
|
||||
if (strstr(cpu_part, "0xac3") || strstr(cpu_part, "0xac4"))
|
||||
return CPU_AMPERE1;
|
||||
}
|
||||
// Fujitsu
|
||||
else if (strstr(cpu_implementer, "0x46") && strstr(cpu_part, "0x001"))
|
||||
return CPU_A64FX;
|
||||
@@ -277,10 +382,47 @@ int detect(void)
|
||||
}
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.ncpu",&value64,&length64,NULL,0);
|
||||
cpulowperf=value64;
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.nperflevels",&value64,&length64,NULL,0);
|
||||
if (value64 > 1) {
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.perflevel0.cpusperl2",&value64,&length64,NULL,0);
|
||||
cpuhiperf=value64;
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.perflevel1.cpusperl2",&value64,&length64,NULL,0);
|
||||
cpulowperf=value64;
|
||||
}
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.cpufamily",&value64,&length64,NULL,0);
|
||||
if (value64 ==131287967|| value64 == 458787763 ) return CPU_VORTEX; //A12/M1
|
||||
if (value64 == 3660830781) return CPU_VORTEX; //A15/M2
|
||||
if (value64 == 2271604202) return CPU_VORTEX; //A16/M3
|
||||
if (value64 == 2271604202) return CPU_VORTEX; //A16/M3
|
||||
if (value64 == 1867590060) return CPU_VORTEX; //M4
|
||||
#else
|
||||
#ifdef OS_WINDOWS
|
||||
HKEY reghandle;
|
||||
HKEY hklm = HKEY_LOCAL_MACHINE;
|
||||
WCHAR valstring[512];
|
||||
PVOID pvalstring=valstring;
|
||||
DWORD size=sizeof (valstring);
|
||||
DWORD type=RRF_RT_ANY;
|
||||
DWORD flags=0;
|
||||
LPCWSTR subkey= L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
|
||||
LPCWSTR field=L"ProcessorNameString";
|
||||
LONG errcode=RegOpenKeyEx(HKEY_LOCAL_MACHINE,TEXT("Hardware\\Description\\System\\CentralProcessor\\0"), 0, KEY_READ, ®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
|
||||
@@ -313,7 +455,7 @@ void get_cpucount(void)
|
||||
{
|
||||
int n=0;
|
||||
|
||||
#ifdef __linux
|
||||
#if defined( __linux ) || defined( __NetBSD__ )
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
@@ -330,10 +472,23 @@ int n=0;
|
||||
fclose(infile);
|
||||
|
||||
printf("#define NUM_CORES %d\n",n);
|
||||
if (cpulowperf >0)
|
||||
printf("#define NUM_CORES_LP %d\n",cpulowperf);
|
||||
if (cpumidperf >0)
|
||||
printf("#define NUM_CORES_MP %d\n",cpumidperf);
|
||||
if (cpuhiperf >0)
|
||||
printf("#define NUM_CORES_HP %d\n",cpuhiperf);
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.physicalcpu_max",&value,&length,NULL,0);
|
||||
printf("#define NUM_CORES %d\n",value);
|
||||
if (cpulowperf >0)
|
||||
printf("#define NUM_CORES_LP %d\n",cpulowperf);
|
||||
if (cpumidperf >0)
|
||||
printf("#define NUM_CORES_MP %d\n",cpumidperf);
|
||||
if (cpuhiperf >0)
|
||||
printf("#define NUM_CORES_HP %d\n",cpuhiperf);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -346,7 +501,6 @@ void get_cpuconfig(void)
|
||||
printf("#define ARMV8\n");
|
||||
printf("#define HAVE_NEON\n"); // This shouldn't be necessary
|
||||
printf("#define HAVE_VFPV4\n"); // This shouldn't be necessary
|
||||
|
||||
int d = detect();
|
||||
switch (d)
|
||||
{
|
||||
@@ -401,7 +555,8 @@ void get_cpuconfig(void)
|
||||
break;
|
||||
|
||||
case CPU_NEOVERSEV1:
|
||||
case CPU_CORTEXA76:
|
||||
printf("#define HAVE_SVE 1\n");
|
||||
case CPU_CORTEXA76:
|
||||
printf("#define %s\n", cpuname[d]);
|
||||
printf("#define L1_CODE_SIZE 65536\n");
|
||||
printf("#define L1_CODE_LINESIZE 64\n");
|
||||
@@ -429,29 +584,32 @@ void get_cpuconfig(void)
|
||||
printf("#define L2_ASSOCIATIVE 8\n");
|
||||
printf("#define DTB_DEFAULT_ENTRIES 48\n");
|
||||
printf("#define DTB_SIZE 4096\n");
|
||||
printf("#define HAVE_SVE 1\n");
|
||||
break;
|
||||
case CPU_NEOVERSEV2:
|
||||
case CPU_NEOVERSEV2:
|
||||
printf("#define ARMV9\n");
|
||||
printf("#define %s\n", cpuname[d]);
|
||||
printf("#define L1_CODE_SIZE 65536\n");
|
||||
printf("#define L1_CODE_LINESIZE 64\n");
|
||||
printf("#define L1_CODE_ASSOCIATIVE 4\n");
|
||||
printf("#define L1_DATA_SIZE 65536\n");
|
||||
printf("#define L1_DATA_LINESIZE 64\n");
|
||||
printf("#define L1_DATA_ASSOCIATIVE 4\n");
|
||||
printf("#define L2_SIZE 1048576\n");
|
||||
printf("#define L2_LINESIZE 64\n");
|
||||
printf("#define L2_ASSOCIATIVE 8\n");
|
||||
// L1 Data TLB = 48 entries
|
||||
// L2 Data TLB = 2048 entries
|
||||
printf("#define DTB_DEFAULT_ENTRIES 48\n");
|
||||
printf("#define DTB_SIZE 4096\n"); // Set to 4096 for symmetry with other configs.
|
||||
break;
|
||||
printf("#define HAVE_SVE 1\n");
|
||||
printf("#define %s\n", cpuname[d]);
|
||||
printf("#define L1_CODE_SIZE 65536\n");
|
||||
printf("#define L1_CODE_LINESIZE 64\n");
|
||||
printf("#define L1_CODE_ASSOCIATIVE 4\n");
|
||||
printf("#define L1_DATA_SIZE 65536\n");
|
||||
printf("#define L1_DATA_LINESIZE 64\n");
|
||||
printf("#define L1_DATA_ASSOCIATIVE 4\n");
|
||||
printf("#define L2_SIZE 1048576\n");
|
||||
printf("#define L2_LINESIZE 64\n");
|
||||
printf("#define L2_ASSOCIATIVE 8\n");
|
||||
// L1 Data TLB = 48 entries
|
||||
// L2 Data TLB = 2048 entries
|
||||
printf("#define DTB_DEFAULT_ENTRIES 48\n");
|
||||
printf("#define DTB_SIZE 4096\n"); // Set to 4096 for symmetry with other configs.
|
||||
break;
|
||||
case CPU_CORTEXA510:
|
||||
case CPU_CORTEXA710:
|
||||
case CPU_CORTEXX1:
|
||||
case CPU_CORTEXX2:
|
||||
printf("#define ARMV9\n");
|
||||
printf("#define HAVE_SVE 1\n");
|
||||
printf("#define %s\n", cpuname[d]);
|
||||
printf("#define L1_CODE_SIZE 65536\n");
|
||||
printf("#define L1_CODE_LINESIZE 64\n");
|
||||
@@ -534,6 +692,21 @@ void get_cpuconfig(void)
|
||||
printf("#define DTB_SIZE 4096\n");
|
||||
break;
|
||||
|
||||
case CPU_AMPERE1:
|
||||
printf("#define %s\n", cpuname[d]);
|
||||
printf("#define L1_CODE_SIZE 16384\n");
|
||||
printf("#define L1_CODE_LINESIZE 64\n");
|
||||
printf("#define L1_CODE_ASSOCIATIVE 4\n");
|
||||
printf("#define L1_DATA_SIZE 65536\n");
|
||||
printf("#define L1_DATA_LINESIZE 64\n");
|
||||
printf("#define L1_DATA_ASSOCIATIVE 4\n");
|
||||
printf("#define L2_SIZE 2097152\n");
|
||||
printf("#define L2_LINESIZE 64\n");
|
||||
printf("#define L2_ASSOCIATIVE 8\n");
|
||||
printf("#define DTB_DEFAULT_ENTRIES 64\n");
|
||||
printf("#define DTB_SIZE 4096\n");
|
||||
break;
|
||||
|
||||
case CPU_THUNDERX3T110:
|
||||
printf("#define THUNDERX3T110 \n");
|
||||
printf("#define L1_CODE_SIZE 65536 \n");
|
||||
@@ -554,12 +727,17 @@ void get_cpuconfig(void)
|
||||
case CPU_VORTEX:
|
||||
printf("#define VORTEX \n");
|
||||
#ifdef __APPLE__
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.l1icachesize",&value64,&length64,NULL,0);
|
||||
printf("#define L1_CODE_SIZE %lld \n",value64);
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.cachelinesize",&value64,&length64,NULL,0);
|
||||
printf("#define L1_CODE_LINESIZE %lld \n",value64);
|
||||
printf("#define L1_DATA_LINESIZE %lld \n",value64);
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.l1dcachesize",&value64,&length64,NULL,0);
|
||||
printf("#define L1_DATA_SIZE %lld \n",value64);
|
||||
length64 = sizeof(value64);
|
||||
sysctlbyname("hw.l2cachesize",&value64,&length64,NULL,0);
|
||||
printf("#define L2_SIZE %lld \n",value64);
|
||||
#endif
|
||||
@@ -568,6 +746,7 @@ void get_cpuconfig(void)
|
||||
break;
|
||||
case CPU_A64FX:
|
||||
printf("#define A64FX\n");
|
||||
printf("#define HAVE_SVE 1\n");
|
||||
printf("#define L1_CODE_SIZE 65535\n");
|
||||
printf("#define L1_DATA_SIZE 65535\n");
|
||||
printf("#define L1_DATA_LINESIZE 256\n");
|
||||
@@ -600,7 +779,7 @@ void get_libname(void)
|
||||
void get_features(void)
|
||||
{
|
||||
|
||||
#ifdef __linux
|
||||
#if defined( __linux ) || defined( __NetBSD__ )
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
|
||||
+334
-70
@@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
Copyright (c) 2011-2020, The OpenBLAS Project
|
||||
Copyright (c) 2011-2024, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -32,53 +32,299 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**********************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/auxv.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <sys/auxv.h>
|
||||
|
||||
/* If LASX extension instructions supported,
|
||||
* using core LOONGSON3R5
|
||||
* If only LSX extension instructions supported,
|
||||
* using core LOONGSON2K1000
|
||||
* If neither LASX nor LSX extension instructions supported,
|
||||
* using core LOONGSONGENERIC (As far as I know, there is no such
|
||||
* CPU yet)
|
||||
*/
|
||||
#define CPU_LA64_GENERIC 0
|
||||
#define CPU_LA264 1
|
||||
#define CPU_LA364 2
|
||||
#define CPU_LA464 3
|
||||
#define CPU_LA664 4
|
||||
|
||||
#define CPU_GENERIC 0
|
||||
#define CPU_LOONGSON3R5 1
|
||||
#define CPU_LOONGSON2K1000 2
|
||||
#define CORE_LA64_GENERIC 0
|
||||
#define CORE_LA264 1
|
||||
#define CORE_LA464 2
|
||||
|
||||
#define LA_HWCAP_LSX (1U << 4)
|
||||
#define LA_HWCAP_LASX (1U << 5)
|
||||
|
||||
#define LOONGARCH_CFG0 0x00
|
||||
#define LOONGARCH_CFG2 0x02
|
||||
#define LOONGARCH_CFG10 0x10
|
||||
#define LOONGARCH_CFG11 0x11
|
||||
#define LOONGARCH_CFG12 0x12
|
||||
#define LOONGARCH_CFG13 0x13
|
||||
#define LOONGARCH_CFG14 0x14
|
||||
#define LASX_MASK 1<<7
|
||||
#define LSX_MASK 1<<6
|
||||
#define PRID_SERIES_MASK 0xf000
|
||||
#define PRID_SERIES_LA264 0xa000
|
||||
#define PRID_SERIES_LA364 0xb000
|
||||
#define PRID_SERIES_LA464 0xc000
|
||||
#define PRID_SERIES_LA664 0xd000
|
||||
|
||||
#define CACHE_INFO_L1_IU 0
|
||||
#define CACHE_INFO_L1_D 1
|
||||
#define CACHE_INFO_L2_IU 2
|
||||
#define CACHE_INFO_L2_D 3
|
||||
#define CACHE_INFO_L3_IU 4
|
||||
#define CACHE_INFO_L3_D 5
|
||||
#define L1_IU_PRESENT_MASK 0x0001
|
||||
#define L1_IU_UNITY_MASK 0x0002
|
||||
#define L1_D_PRESENT_MASK 0x0004
|
||||
#define L2_IU_PRESENT_MASK 0x0008
|
||||
#define L2_IU_UNITY_MASK 0x0010
|
||||
#define L2_D_PRESENT_MASK 0x0080
|
||||
#define L3_IU_PRESENT_MASK 0x0400
|
||||
#define L3_IU_UNITY_MASK 0x0800
|
||||
#define L3_D_PRESENT_MASK 0x4000
|
||||
#define CACHE_WAY_MINUS_1_MASK 0x0000ffff
|
||||
#define CACHE_INDEX_LOG2_MASK 0x00ff0000
|
||||
#define CACHE_LINESIZE_LOG2_MASK 0x7f000000
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
int associative;
|
||||
int linesize;
|
||||
int unify;
|
||||
int present;
|
||||
} cache_info_t;
|
||||
|
||||
/* Using microarchitecture representation */
|
||||
static char *cpuname[] = {
|
||||
"LOONGSONGENERIC",
|
||||
"LOONGSON3R5",
|
||||
"LOONGSON2K1000"
|
||||
"LA64_GENERIC",
|
||||
"LA264", /* Loongson 64bit, 2-issue, Like 2K1000LA */
|
||||
"LA364", /* Loongson 64bit, 3-issue, Like 2K2000 */
|
||||
"LA464", /* Loongson 64bit, 4-issue, Like 3A5000, 3C5000L, 3C5000 and 3D5000 */
|
||||
"LA664" /* Loongson 64bit, 6-issue, Like 3A6000, 3C6000 and 3D6000 */
|
||||
};
|
||||
|
||||
static char *cpuname_lower[] = {
|
||||
"loongsongeneric",
|
||||
"loongson3r5",
|
||||
"loongson2k1000"
|
||||
"la64_generic",
|
||||
"la264",
|
||||
"la364",
|
||||
"la464",
|
||||
"la664"
|
||||
};
|
||||
|
||||
int detect(void) {
|
||||
#ifdef __linux
|
||||
static char *corename[] = {
|
||||
"LA64_GENERIC", /* Implies using scalar instructions for optimization */
|
||||
"LA264", /* Implies using LSX instructions for optimization */
|
||||
"LA464", /* Implies using LASX instructions for optimization */
|
||||
};
|
||||
|
||||
static char *corename_lower[] = {
|
||||
"la64_generic",
|
||||
"la264",
|
||||
"la464",
|
||||
};
|
||||
|
||||
/*
|
||||
* Obtain cache and processor identification
|
||||
* through the cpucfg command.
|
||||
*/
|
||||
static void get_cacheinfo(int type, cache_info_t *cacheinfo) {
|
||||
cache_info_t cache_info;
|
||||
memset(&cache_info, 0, sizeof(cache_info));
|
||||
uint32_t reg_10 = 0;
|
||||
__asm__ volatile (
|
||||
"cpucfg %0, %1 \n\t"
|
||||
: "+&r"(reg_10)
|
||||
: "r"(LOONGARCH_CFG10)
|
||||
);
|
||||
|
||||
switch (type) {
|
||||
case CACHE_INFO_L1_IU:
|
||||
if (reg_10 & L1_IU_PRESENT_MASK) {
|
||||
uint32_t reg_11 = 0;
|
||||
cache_info.present = reg_10 & L1_IU_PRESENT_MASK;
|
||||
cache_info.unify = reg_10 & L1_IU_UNITY_MASK;
|
||||
__asm__ volatile (
|
||||
"cpucfg %0, %1 \n\t"
|
||||
: "+&r"(reg_11)
|
||||
: "r"(LOONGARCH_CFG11)
|
||||
);
|
||||
cache_info.associative = (reg_11 & CACHE_WAY_MINUS_1_MASK) + 1;
|
||||
cache_info.linesize = 1 << ((reg_11 & CACHE_LINESIZE_LOG2_MASK) >> 24);
|
||||
cache_info.size = cache_info.associative * cache_info.linesize *
|
||||
(1 << ((reg_11 & CACHE_INDEX_LOG2_MASK) >> 16));
|
||||
}
|
||||
break;
|
||||
|
||||
case CACHE_INFO_L1_D:
|
||||
if (reg_10 & L1_D_PRESENT_MASK) {
|
||||
uint32_t reg_12 = 0;
|
||||
cache_info.present = reg_10 & L1_D_PRESENT_MASK;
|
||||
__asm__ volatile (
|
||||
"cpucfg %0, %1 \n\t"
|
||||
: "+&r"(reg_12)
|
||||
: "r"(LOONGARCH_CFG12)
|
||||
);
|
||||
cache_info.associative = (reg_12 & CACHE_WAY_MINUS_1_MASK) + 1;
|
||||
cache_info.linesize = 1 << ((reg_12 & CACHE_LINESIZE_LOG2_MASK) >> 24);
|
||||
cache_info.size = cache_info.associative * cache_info.linesize *
|
||||
(1 << ((reg_12 & CACHE_INDEX_LOG2_MASK) >> 16));
|
||||
}
|
||||
break;
|
||||
|
||||
case CACHE_INFO_L2_IU:
|
||||
if (reg_10 & L2_IU_PRESENT_MASK) {
|
||||
uint32_t reg_13 = 0;
|
||||
cache_info.present = reg_10 & L2_IU_PRESENT_MASK;
|
||||
cache_info.unify = reg_10 & L2_IU_UNITY_MASK;
|
||||
__asm__ volatile (
|
||||
"cpucfg %0, %1 \n\t"
|
||||
: "+&r"(reg_13)
|
||||
: "r"(LOONGARCH_CFG13)
|
||||
);
|
||||
cache_info.associative = (reg_13 & CACHE_WAY_MINUS_1_MASK) + 1;
|
||||
cache_info.linesize = 1 << ((reg_13 & CACHE_LINESIZE_LOG2_MASK) >> 24);
|
||||
cache_info.size = cache_info.associative * cache_info.linesize *
|
||||
(1 << ((reg_13 & CACHE_INDEX_LOG2_MASK) >> 16));
|
||||
}
|
||||
break;
|
||||
|
||||
case CACHE_INFO_L2_D:
|
||||
if (reg_10 & L2_D_PRESENT_MASK) {
|
||||
cache_info.present = reg_10 & L2_D_PRESENT_MASK;
|
||||
// No date fetch
|
||||
}
|
||||
break;
|
||||
|
||||
case CACHE_INFO_L3_IU:
|
||||
if (reg_10 & L3_IU_PRESENT_MASK) {
|
||||
uint32_t reg_14 = 0;
|
||||
cache_info.present = reg_10 & L3_IU_PRESENT_MASK;
|
||||
cache_info.unify = reg_10 & L3_IU_UNITY_MASK;
|
||||
__asm__ volatile (
|
||||
"cpucfg %0, %1 \n\t"
|
||||
: "+&r"(reg_14)
|
||||
: "r"(LOONGARCH_CFG14)
|
||||
);
|
||||
cache_info.associative = (reg_14 & CACHE_WAY_MINUS_1_MASK) + 1;
|
||||
cache_info.linesize = 1 << ((reg_14 & CACHE_LINESIZE_LOG2_MASK) >> 24);
|
||||
cache_info.size = cache_info.associative * cache_info.linesize *
|
||||
(1 << ((reg_14 & CACHE_INDEX_LOG2_MASK) >> 16));
|
||||
}
|
||||
break;
|
||||
|
||||
case CACHE_INFO_L3_D:
|
||||
if (reg_10 & L3_D_PRESENT_MASK) {
|
||||
cache_info.present = reg_10 & L3_D_PRESENT_MASK;
|
||||
// No data fetch
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
*cacheinfo = cache_info;
|
||||
}
|
||||
|
||||
static uint32_t get_prid() {
|
||||
uint32_t reg = 0;
|
||||
__asm__ volatile (
|
||||
"cpucfg %0, %1 \n\t"
|
||||
: "+&r"(reg)
|
||||
: "r"(LOONGARCH_CFG0)
|
||||
);
|
||||
return reg;
|
||||
}
|
||||
|
||||
static void get_cpucount(uint32_t *count) {
|
||||
uint32_t num = 0;
|
||||
FILE *f = fopen("/proc/cpuinfo", "r");
|
||||
if (!f) return;
|
||||
char buf[200];
|
||||
while (fgets(buf, sizeof(buf), f))
|
||||
{
|
||||
if (!strncmp("processor", buf, 9))
|
||||
num ++;
|
||||
}
|
||||
fclose(f);
|
||||
*count = num;
|
||||
}
|
||||
|
||||
/* Detect whether the OS supports the LASX instruction set */
|
||||
static int os_support_lasx() {
|
||||
int hwcap = (int)getauxval(AT_HWCAP);
|
||||
|
||||
if (hwcap & LA_HWCAP_LASX)
|
||||
return CPU_LOONGSON3R5;
|
||||
else if (hwcap & LA_HWCAP_LSX)
|
||||
return CPU_LOONGSON2K1000;
|
||||
return 1;
|
||||
else
|
||||
return CPU_GENERIC;
|
||||
#endif
|
||||
return CPU_GENERIC;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Detect whether the OS supports the LSX instruction set */
|
||||
static int os_support_lsx() {
|
||||
int hwcap = (int)getauxval(AT_HWCAP);
|
||||
|
||||
if (hwcap & LA_HWCAP_LSX)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
int get_coretype(void) {
|
||||
uint32_t prid = get_prid();
|
||||
switch (prid & PRID_SERIES_MASK) {
|
||||
case (PRID_SERIES_LA464):
|
||||
case (PRID_SERIES_LA664):
|
||||
if (os_support_lasx())
|
||||
return CORE_LA464;
|
||||
else if (os_support_lsx())
|
||||
return CORE_LA264;
|
||||
else
|
||||
return CORE_LA64_GENERIC;
|
||||
break;
|
||||
|
||||
case (PRID_SERIES_LA264):
|
||||
case (PRID_SERIES_LA364):
|
||||
if (os_support_lsx())
|
||||
return CORE_LA264;
|
||||
else
|
||||
return CORE_LA64_GENERIC;
|
||||
break;
|
||||
|
||||
default:
|
||||
return CORE_LA64_GENERIC;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int get_cputype(void) {
|
||||
uint32_t prid = get_prid();
|
||||
switch (prid & PRID_SERIES_MASK) {
|
||||
case (PRID_SERIES_LA264):
|
||||
return CPU_LA264;
|
||||
break;
|
||||
|
||||
case (PRID_SERIES_LA364):
|
||||
return CPU_LA364;
|
||||
break;
|
||||
|
||||
case (PRID_SERIES_LA464):
|
||||
return CPU_LA464;
|
||||
break;
|
||||
|
||||
case (PRID_SERIES_LA664):
|
||||
return CPU_LA664;
|
||||
break;
|
||||
|
||||
default:
|
||||
return CPU_LA64_GENERIC;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
char *get_corename(void) {
|
||||
return cpuname[detect()];
|
||||
return corename[get_coretype()];
|
||||
}
|
||||
|
||||
void get_libname(void){
|
||||
printf("%s", corename_lower[get_coretype()]);
|
||||
}
|
||||
|
||||
void get_architecture(void) {
|
||||
@@ -86,8 +332,7 @@ void get_architecture(void) {
|
||||
}
|
||||
|
||||
void get_subarchitecture(void) {
|
||||
int d = detect();
|
||||
printf("%s", cpuname[d]);
|
||||
printf("%s", cpuname[get_cputype()]);
|
||||
}
|
||||
|
||||
void get_subdirname(void) {
|
||||
@@ -95,50 +340,69 @@ void get_subdirname(void) {
|
||||
}
|
||||
|
||||
void get_cpuconfig(void) {
|
||||
uint32_t hwcaps = 0;
|
||||
int d = detect();
|
||||
cache_info_t info;
|
||||
uint32_t num_cores = 0;
|
||||
|
||||
switch (d) {
|
||||
case CPU_LOONGSON3R5:
|
||||
printf("#define LOONGSON3R5\n");
|
||||
printf("#define L1_DATA_SIZE 65536\n");
|
||||
printf("#define L1_DATA_LINESIZE 64\n");
|
||||
printf("#define L2_SIZE 1048576\n");
|
||||
printf("#define L2_LINESIZE 64\n");
|
||||
printf("#define DTB_DEFAULT_ENTRIES 64\n");
|
||||
printf("#define DTB_SIZE 4096\n");
|
||||
printf("#define L2_ASSOCIATIVE 16\n");
|
||||
break;
|
||||
printf("#define %s\n", corename[get_coretype()]); // Core name
|
||||
|
||||
case CPU_LOONGSON2K1000:
|
||||
printf("#define LOONGSON2K1000\n");
|
||||
printf("#define L1_DATA_SIZE 65536\n");
|
||||
printf("#define L1_DATA_LINESIZE 64\n");
|
||||
printf("#define L2_SIZE 262144\n");
|
||||
printf("#define L2_LINESIZE 64\n");
|
||||
printf("#define DTB_DEFAULT_ENTRIES 64\n");
|
||||
printf("#define DTB_SIZE 4096\n");
|
||||
printf("#define L2_ASSOCIATIVE 16\n");
|
||||
break;
|
||||
printf("#define CPU_NAME %s\n", cpuname[get_cputype()]); // Cpu microarchitecture name
|
||||
|
||||
default:
|
||||
printf("#define LOONGSONGENERIC\n");
|
||||
printf("#define L1_DATA_SIZE 65536\n");
|
||||
printf("#define L1_DATA_LINESIZE 64\n");
|
||||
printf("#define L2_SIZE 262144\n");
|
||||
printf("#define L2_LINESIZE 64\n");
|
||||
printf("#define DTB_DEFAULT_ENTRIES 64\n");
|
||||
printf("#define DTB_SIZE 4096\n");
|
||||
printf("#define L2_ASSOCIATIVE 16\n");
|
||||
break;
|
||||
get_cacheinfo(CACHE_INFO_L1_IU, &info);
|
||||
if (info.present) {
|
||||
if (info.unify) { // Unified cache, without distinguishing between instructions and data
|
||||
printf("#define L1_SIZE %d\n", info.size);
|
||||
printf("#define L1_ASSOCIATIVE %d\n", info.associative);
|
||||
printf("#define L1_LINESIZE %d\n", info.linesize);
|
||||
} else {
|
||||
printf("#define L1_CODE_SIZE %d\n", info.size);
|
||||
printf("#define L1_CODE_ASSOCIATIVE %d\n", info.associative);
|
||||
printf("#define L1_CODE_LINESIZE %d\n", info.linesize);
|
||||
}
|
||||
}
|
||||
|
||||
hwcaps = (uint32_t)getauxval( AT_HWCAP );
|
||||
if (hwcaps & LA_HWCAP_LSX) printf("#define HAVE_LSX\n");
|
||||
if (hwcaps & LA_HWCAP_LASX) printf("#define HAVE_LASX\n");
|
||||
}
|
||||
if (!info.unify) {
|
||||
get_cacheinfo(CACHE_INFO_L1_D, &info);
|
||||
if (info.present) {
|
||||
printf("#define L1_DATA_SIZE %d\n", info.size);
|
||||
printf("#define L1_DATA_ASSOCIATIVE %d\n", info.associative);
|
||||
printf("#define L1_DATA_LINESIZE %d\n", info.linesize);
|
||||
}
|
||||
}
|
||||
|
||||
void get_libname(void){
|
||||
int d = detect();
|
||||
printf("%s", cpuname_lower[d]);
|
||||
get_cacheinfo(CACHE_INFO_L2_IU, &info);
|
||||
if (info.present > 0) {
|
||||
if (info.unify) {
|
||||
printf("#define L2_SIZE %d\n", info.size);
|
||||
printf("#define L2_ASSOCIATIVE %d\n", info.associative);
|
||||
printf("#define L2_LINESIZE %d\n", info.linesize);
|
||||
} else {
|
||||
printf("#define L2_CODE_SIZE %d\n", info.size);
|
||||
printf("#define L2_CODE_ASSOCIATIVE %d\n", info.associative);
|
||||
printf("#define L2_CODE_LINESIZE %d\n", info.linesize);
|
||||
}
|
||||
}
|
||||
|
||||
get_cacheinfo(CACHE_INFO_L3_IU, &info);
|
||||
if (info.present > 0) {
|
||||
if (info.unify) {
|
||||
printf("#define L3_SIZE %d\n", info.size);
|
||||
printf("#define L3_ASSOCIATIVE %d\n", info.associative);
|
||||
printf("#define L3_LINESIZE %d\n", info.linesize);
|
||||
} else {
|
||||
printf("#define L3_CODE_SIZE %d\n", info.size);
|
||||
printf("#define L3_CODE_ASSOCIATIVE %d\n", info.associative);
|
||||
printf("#define L3_CODE_LINESIZE %d\n", info.linesize);
|
||||
}
|
||||
}
|
||||
|
||||
if(os_support_lsx) printf("#define HAVE_LSX\n");
|
||||
if(os_support_lasx) printf("#define HAVE_LASX\n");
|
||||
|
||||
get_cpucount(&num_cores);
|
||||
if (num_cores)
|
||||
printf("#define NUM_CORES %d\n", num_cores);
|
||||
|
||||
//TODO: It’s unclear what this entry represents, but it is indeed necessary.
|
||||
//It has been set based on reference to other platforms.
|
||||
printf("#define DTB_DEFAULT_ENTRIES 64\n");
|
||||
}
|
||||
|
||||
@@ -131,6 +131,7 @@ int detect(void){
|
||||
if (!strncasecmp(p, "POWER8", 6)) return CPUTYPE_POWER8;
|
||||
if (!strncasecmp(p, "POWER9", 6)) return CPUTYPE_POWER9;
|
||||
if (!strncasecmp(p, "POWER10", 7)) return CPUTYPE_POWER10;
|
||||
if (!strncasecmp(p, "POWER11", 7)) return CPUTYPE_POWER10;
|
||||
if (!strncasecmp(p, "Cell", 4)) return CPUTYPE_CELL;
|
||||
if (!strncasecmp(p, "7447", 4)) return CPUTYPE_PPCG4;
|
||||
|
||||
@@ -171,6 +172,9 @@ int detect(void){
|
||||
int id;
|
||||
__asm __volatile("mfpvr %0" : "=r"(id));
|
||||
switch ( id >> 16 ) {
|
||||
case 0x82: // POWER11
|
||||
return CPUTYPE_POWER10;
|
||||
break;
|
||||
case 0x80: // POWER10
|
||||
return CPUTYPE_POWER10;
|
||||
break;
|
||||
|
||||
+50
-2
@@ -1527,6 +1527,19 @@ int get_cpuname(void){
|
||||
break;
|
||||
case 10: //family 6 exmodel 10
|
||||
switch (model) {
|
||||
case 13: // Granite Rapids
|
||||
if(support_amx_bf16())
|
||||
return CPUTYPE_SAPPHIRERAPIDS;
|
||||
if(support_avx512_bf16())
|
||||
return CPUTYPE_COOPERLAKE;
|
||||
if(support_avx512())
|
||||
return CPUTYPE_SKYLAKEX;
|
||||
if(support_avx2())
|
||||
return CPUTYPE_HASWELL;
|
||||
if(support_avx())
|
||||
return CPUTYPE_SANDYBRIDGE;
|
||||
else
|
||||
return CPUTYPE_NEHALEM;
|
||||
case 5: // Comet Lake H and S
|
||||
case 6: // Comet Lake U
|
||||
case 10: // Meteor Lake
|
||||
@@ -1554,6 +1567,7 @@ int get_cpuname(void){
|
||||
case 10:
|
||||
case 15:
|
||||
case 14: // Alder Lake N
|
||||
case 13: // Lunar Lake
|
||||
if(support_avx2())
|
||||
return CPUTYPE_HASWELL;
|
||||
if(support_avx())
|
||||
@@ -1565,6 +1579,7 @@ int get_cpuname(void){
|
||||
case 12: //family 6 exmodel 12
|
||||
switch (model) {
|
||||
case 15:
|
||||
case 6: // Arrow Lake
|
||||
if(support_avx512())
|
||||
return CPUTYPE_SAPPHIRERAPIDS;
|
||||
if(support_avx2())
|
||||
@@ -1676,6 +1691,7 @@ int get_cpuname(void){
|
||||
return CPUTYPE_BARCELONA;
|
||||
}
|
||||
case 10: // Zen3/4
|
||||
case 11: // Zen5
|
||||
#ifndef NO_AVX512
|
||||
if(support_avx512_bf16())
|
||||
return CPUTYPE_COOPERLAKE;
|
||||
@@ -2352,8 +2368,22 @@ int get_coretype(void){
|
||||
|
||||
case 10:
|
||||
switch (model) {
|
||||
case 13: // Granite Rapids
|
||||
if(support_amx_bf16())
|
||||
return CORE_SAPPHIRERAPIDS;
|
||||
if(support_avx512_bf16())
|
||||
return CORE_COOPERLAKE;
|
||||
if(support_avx512())
|
||||
return CORE_SKYLAKEX;
|
||||
if(support_avx2())
|
||||
return CORE_HASWELL;
|
||||
if(support_avx())
|
||||
return CORE_SANDYBRIDGE;
|
||||
else
|
||||
return CORE_NEHALEM;
|
||||
case 5: // Comet Lake H and S
|
||||
case 6: // Comet Lake U
|
||||
case 10: // Meteor Lake
|
||||
if(support_avx())
|
||||
#ifndef NO_AVX2
|
||||
return CORE_HASWELL;
|
||||
@@ -2362,6 +2392,7 @@ int get_coretype(void){
|
||||
#endif
|
||||
else
|
||||
return CORE_NEHALEM;
|
||||
case 0: // Meteor Lake
|
||||
case 7:// Rocket Lake
|
||||
#ifndef NO_AVX512
|
||||
if(support_avx512())
|
||||
@@ -2382,7 +2413,8 @@ int get_coretype(void){
|
||||
case 7: // Raptor Lake
|
||||
case 10:
|
||||
case 15:
|
||||
case 14: // Alder Lake N
|
||||
case 14: // Alder Lake N
|
||||
case 13: // Lunar Lake
|
||||
#ifndef NO_AVX2
|
||||
if(support_avx2())
|
||||
return CORE_HASWELL;
|
||||
@@ -2392,6 +2424,22 @@ int get_coretype(void){
|
||||
else
|
||||
return CORE_NEHALEM;
|
||||
}
|
||||
case 12:
|
||||
switch (model) {
|
||||
case 6: // Arrow Lake
|
||||
if(support_amx_bf16())
|
||||
return CORE_SAPPHIRERAPIDS;
|
||||
if(support_avx512_bf16())
|
||||
return CORE_COOPERLAKE;
|
||||
if(support_avx512())
|
||||
return CORE_SKYLAKEX;
|
||||
if(support_avx2())
|
||||
return CORE_HASWELL;
|
||||
if(support_avx())
|
||||
return CORE_SANDYBRIDGE;
|
||||
else
|
||||
return CORE_NEHALEM;
|
||||
}
|
||||
}
|
||||
case 15:
|
||||
if (model <= 0x2) return CORE_NORTHWOOD;
|
||||
@@ -2451,7 +2499,7 @@ int get_coretype(void){
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (exfamily == 8 || exfamily == 10) {
|
||||
} else if (exfamily == 8 || exfamily == 10 || exfamily == 11) {
|
||||
switch (model) {
|
||||
case 1:
|
||||
// AMD Ryzen
|
||||
|
||||
+4
-16
@@ -6,6 +6,10 @@ enable_language(Fortran)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DADD${BU} -DCBLAS")
|
||||
if (BINARY32 AND CMAKE_C_PLATFORM_ID MATCHES "MinGW" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 14.1)
|
||||
list(REMOVE_ITEM ${CMAKE_Fortran_FLAGS} -O3 -O2 -O1 -Os)
|
||||
set (CMAKE_Fortran_FLAGS_RELEASE "" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize")
|
||||
endif()
|
||||
@@ -40,10 +44,6 @@ else()
|
||||
c_${float_char}blas1.c)
|
||||
endif()
|
||||
target_link_libraries(x${float_char}cblat1 ${OpenBLAS_LIBNAME})
|
||||
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
|
||||
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
|
||||
target_link_libraries(x${float_char}cblat1 omp pthread)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
target_link_libraries(x${float_char}cblat1 m)
|
||||
endif()
|
||||
@@ -69,10 +69,6 @@ else()
|
||||
constant.c)
|
||||
endif()
|
||||
target_link_libraries(x${float_char}cblat2 ${OpenBLAS_LIBNAME})
|
||||
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
|
||||
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
|
||||
target_link_libraries(x${float_char}cblat2 omp pthread)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
target_link_libraries(x${float_char}cblat2 m)
|
||||
endif()
|
||||
@@ -120,20 +116,12 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
target_link_libraries(x${float_char}cblat3 ${OpenBLAS_LIBNAME})
|
||||
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
|
||||
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
|
||||
target_link_libraries(x${float_char}cblat3 omp pthread)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
target_link_libraries(x${float_char}cblat3 m)
|
||||
endif()
|
||||
if (USE_GEMM3M)
|
||||
if ((${float_char} STREQUAL "c") OR (${float_char} STREQUAL "z"))
|
||||
target_link_libraries(x${float_char}cblat3_3m ${OpenBLAS_LIBNAME})
|
||||
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
|
||||
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
|
||||
target_link_libraries(x${float_char}cblat3 omp pthread)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
target_link_libraries(x${float_char}cblat3_3m m)
|
||||
endif()
|
||||
|
||||
+5
-5
@@ -26,7 +26,7 @@ endif
|
||||
override CFLAGS += -DADD$(BU) -DCBLAS
|
||||
ifeq ($(F_COMPILER),GFORTRAN)
|
||||
ifneq (, $(filter $(CORE),LOONGSON3R3 LOONGSON3R4))
|
||||
override FFLAGS = $(filter_out(-O2 -O3,$(FFLAGS))) -O0
|
||||
override FFLAGS := $(filter_out(-O2 -O3,$(FFLAGS))) -O0
|
||||
endif
|
||||
override FFLAGS += -fno-tree-vectorize
|
||||
endif
|
||||
@@ -235,18 +235,18 @@ FLDFLAGS = $(FFLAGS:-fPIC=) $(LDFLAGS)
|
||||
ifeq ($(USE_OPENMP), 1)
|
||||
ifeq ($(F_COMPILER), GFORTRAN)
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CEXTRALIB += -lomp
|
||||
EXTRALIB += -lomp
|
||||
endif
|
||||
endif
|
||||
ifeq ($(F_COMPILER), NAG)
|
||||
CEXTRALIB = -lgomp
|
||||
EXTRALIB = -lgomp
|
||||
endif
|
||||
ifeq ($(F_COMPILER), IBM)
|
||||
ifeq ($(C_COMPILER), GCC)
|
||||
CEXTRALIB += -lgomp
|
||||
EXTRALIB += -lgomp
|
||||
endif
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CEXTRALIB += -lomp
|
||||
EXTRALIB += -lomp
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
+7
-4
@@ -38,9 +38,12 @@
|
||||
CALL CHECK1(SFAC)
|
||||
END IF
|
||||
* -- Print
|
||||
IF (PASS) WRITE (NOUT,99998)
|
||||
IF (PASS) THEN
|
||||
WRITE (NOUT,99998)
|
||||
ELSE
|
||||
ERROR STOP
|
||||
END IF
|
||||
20 CONTINUE
|
||||
STOP
|
||||
*
|
||||
99999 FORMAT (' Complex CBLAS Test Program Results',/1X)
|
||||
99998 FORMAT (' ----- PASS -----')
|
||||
@@ -228,7 +231,7 @@
|
||||
CALL ITEST1(ICAMAXTEST(N,CX,INCX),ITRUE3(NP1))
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
40 CONTINUE
|
||||
@@ -512,7 +515,7 @@
|
||||
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0)
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
40 CONTINUE
|
||||
|
||||
+1
-1
@@ -440,7 +440,7 @@ static real c_b43 = (float)1.;
|
||||
extern /* Subroutine */ int ctest_(integer*, complex*, complex*, complex*, real*);
|
||||
static complex mwpcs[5], mwpct[5];
|
||||
extern /* Subroutine */ int itest1_(integer*, integer*), stest1_(real*,real*,real*,real*);
|
||||
extern /* Subroutine */ int cscaltest_(), itest1_(), stest1_();
|
||||
extern /* Subroutine */ int cscaltest_(integer*, complex*, complex*, integer*);
|
||||
static complex cx[8];
|
||||
extern real scnrm2test_(integer*, complex*, integer*);
|
||||
static integer np1;
|
||||
|
||||
+7
-5
@@ -10,7 +10,7 @@
|
||||
* 'CBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -243,7 +243,7 @@
|
||||
$ GO TO 70
|
||||
60 CONTINUE
|
||||
WRITE( NOUT, FMT = 9986 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
70 LTEST( I ) = LTESTT
|
||||
GO TO 50
|
||||
*
|
||||
@@ -283,7 +283,7 @@
|
||||
SAME = LCE( YY, YT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANS = 'T'
|
||||
CALL CMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,
|
||||
@@ -291,7 +291,7 @@
|
||||
SAME = LCE( YY, YT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -418,7 +418,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+9
-7
@@ -10,7 +10,7 @@
|
||||
* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -194,7 +194,7 @@
|
||||
$ GO TO 50
|
||||
40 CONTINUE
|
||||
WRITE( NOUT, FMT = 9990 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
50 LTEST( I ) = LTESTT
|
||||
GO TO 30
|
||||
*
|
||||
@@ -237,7 +237,7 @@
|
||||
SAME = LCE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'C'
|
||||
CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -246,7 +246,7 @@
|
||||
SAME = LCE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
DO 120 J = 1, N
|
||||
AB( J, NMAX + 1 ) = N - J + 1
|
||||
@@ -264,7 +264,7 @@
|
||||
SAME = LCE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'C'
|
||||
CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -273,7 +273,7 @@
|
||||
SAME = LCE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -385,7 +385,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT(' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+9
-7
@@ -10,7 +10,7 @@
|
||||
* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -194,7 +194,7 @@
|
||||
$ GO TO 50
|
||||
40 CONTINUE
|
||||
WRITE( NOUT, FMT = 9990 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
50 LTEST( I ) = LTESTT
|
||||
GO TO 30
|
||||
*
|
||||
@@ -237,7 +237,7 @@
|
||||
SAME = LCE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'C'
|
||||
CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -246,7 +246,7 @@
|
||||
SAME = LCE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
DO 120 J = 1, N
|
||||
AB( J, NMAX + 1 ) = N - J + 1
|
||||
@@ -264,7 +264,7 @@
|
||||
SAME = LCE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'C'
|
||||
CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -273,7 +273,7 @@
|
||||
SAME = LCE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -385,7 +385,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT(' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+9
-6
@@ -44,9 +44,12 @@
|
||||
CALL CHECK3(SFAC)
|
||||
END IF
|
||||
* -- Print
|
||||
IF (PASS) WRITE (NOUT,99998)
|
||||
IF (PASS) THEN
|
||||
WRITE (NOUT,99998)
|
||||
ELSE
|
||||
ERROR STOP
|
||||
END IF
|
||||
20 CONTINUE
|
||||
STOP
|
||||
*
|
||||
99999 FORMAT (' Real CBLAS Test Program Results',/1X)
|
||||
99998 FORMAT (' ----- PASS -----')
|
||||
@@ -136,7 +139,7 @@
|
||||
CALL STEST1(SS,DS1(K),DS1(K),SFAC)
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
20 CONTINUE
|
||||
40 RETURN
|
||||
@@ -229,7 +232,7 @@
|
||||
CALL ITEST1(IDAMAXTEST(N,SX,INCX),ITRUE2(NP1))
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
60 CONTINUE
|
||||
80 CONTINUE
|
||||
@@ -384,7 +387,7 @@
|
||||
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
100 CONTINUE
|
||||
120 CONTINUE
|
||||
@@ -472,7 +475,7 @@
|
||||
70 CONTINUE
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
40 CONTINUE
|
||||
60 CONTINUE
|
||||
|
||||
+7
-5
@@ -10,7 +10,7 @@
|
||||
* 'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -239,7 +239,7 @@
|
||||
$ GO TO 70
|
||||
60 CONTINUE
|
||||
WRITE( NOUT, FMT = 9986 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
70 LTEST( I ) = LTESTT
|
||||
GO TO 50
|
||||
*
|
||||
@@ -279,7 +279,7 @@
|
||||
SAME = LDE( YY, YT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANS = 'T'
|
||||
CALL DMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,
|
||||
@@ -287,7 +287,7 @@
|
||||
SAME = LDE( YY, YT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -414,7 +414,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+9
-7
@@ -10,7 +10,7 @@
|
||||
* 'DBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -189,7 +189,7 @@
|
||||
$ GO TO 50
|
||||
40 CONTINUE
|
||||
WRITE( NOUT, FMT = 9990 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
50 LTEST( I ) = LTESTT
|
||||
GO TO 30
|
||||
*
|
||||
@@ -232,7 +232,7 @@
|
||||
SAME = LDE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'T'
|
||||
CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -241,7 +241,7 @@
|
||||
SAME = LDE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
DO 120 J = 1, N
|
||||
AB( J, NMAX + 1 ) = N - J + 1
|
||||
@@ -259,7 +259,7 @@
|
||||
SAME = LDE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'T'
|
||||
CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -268,7 +268,7 @@
|
||||
SAME = LDE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -379,7 +379,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+10
-7
@@ -44,9 +44,12 @@
|
||||
CALL CHECK3(SFAC)
|
||||
END IF
|
||||
* -- Print
|
||||
IF (PASS) WRITE (NOUT,99998)
|
||||
IF (PASS) THEN
|
||||
WRITE (NOUT,99998)
|
||||
ELSE
|
||||
ERROR STOP
|
||||
END IF
|
||||
20 CONTINUE
|
||||
STOP
|
||||
*
|
||||
99999 FORMAT (' Real CBLAS Test Program Results',/1X)
|
||||
99998 FORMAT (' ----- PASS -----')
|
||||
@@ -136,7 +139,7 @@
|
||||
CALL STEST1(SS,DS1(K),DS1(K),SFAC)
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
20 CONTINUE
|
||||
40 RETURN
|
||||
@@ -229,7 +232,7 @@
|
||||
CALL ITEST1(ISAMAXTEST(N,SX,INCX),ITRUE2(NP1))
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
60 CONTINUE
|
||||
80 CONTINUE
|
||||
@@ -384,7 +387,7 @@
|
||||
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
100 CONTINUE
|
||||
120 CONTINUE
|
||||
@@ -479,7 +482,7 @@
|
||||
70 CONTINUE
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
40 CONTINUE
|
||||
60 CONTINUE
|
||||
@@ -759,4 +762,4 @@
|
||||
END IF
|
||||
END IF
|
||||
RETURN
|
||||
END
|
||||
END
|
||||
|
||||
+7
-5
@@ -10,7 +10,7 @@
|
||||
* 'SBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -239,7 +239,7 @@
|
||||
$ GO TO 70
|
||||
60 CONTINUE
|
||||
WRITE( NOUT, FMT = 9986 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
70 LTEST( I ) = LTESTT
|
||||
GO TO 50
|
||||
*
|
||||
@@ -279,7 +279,7 @@
|
||||
SAME = LSE( YY, YT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANS = 'T'
|
||||
CALL SMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,
|
||||
@@ -287,7 +287,7 @@
|
||||
SAME = LSE( YY, YT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -414,7 +414,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+9
-7
@@ -10,7 +10,7 @@
|
||||
* 'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -188,7 +188,7 @@
|
||||
$ GO TO 50
|
||||
40 CONTINUE
|
||||
WRITE( NOUT, FMT = 9990 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
50 LTEST( I ) = LTESTT
|
||||
GO TO 30
|
||||
*
|
||||
@@ -231,7 +231,7 @@
|
||||
SAME = LSE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'T'
|
||||
CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -240,7 +240,7 @@
|
||||
SAME = LSE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
DO 120 J = 1, N
|
||||
AB( J, NMAX + 1 ) = N - J + 1
|
||||
@@ -258,7 +258,7 @@
|
||||
SAME = LSE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'T'
|
||||
CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -267,7 +267,7 @@
|
||||
SAME = LSE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -378,7 +378,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+7
-4
@@ -38,9 +38,12 @@
|
||||
CALL CHECK1(SFAC)
|
||||
END IF
|
||||
* -- Print
|
||||
IF (PASS) WRITE (NOUT,99998)
|
||||
IF (PASS) THEN
|
||||
WRITE (NOUT,99998)
|
||||
ELSE
|
||||
ERROR STOP
|
||||
END IF
|
||||
20 CONTINUE
|
||||
STOP
|
||||
*
|
||||
99999 FORMAT (' Complex CBLAS Test Program Results',/1X)
|
||||
99998 FORMAT (' ----- PASS -----')
|
||||
@@ -228,7 +231,7 @@
|
||||
CALL ITEST1(IZAMAXTEST(N,CX,INCX),ITRUE3(NP1))
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
40 CONTINUE
|
||||
@@ -512,7 +515,7 @@
|
||||
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0)
|
||||
ELSE
|
||||
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
40 CONTINUE
|
||||
|
||||
+2
-2
@@ -380,7 +380,7 @@ static doublereal c_b43 = 1.;
|
||||
static integer i__;
|
||||
extern /* Subroutine */ int ctest_(integer*, doublecomplex*, doublecomplex*, doublecomplex*, doublereal*);
|
||||
static doublecomplex mwpcs[5], mwpct[5];
|
||||
extern /* Subroutine */ int zscaltest_(integer*, doublereal*, doublecomplex*, integer*), itest1_(integer*, integer*), stest1_(doublereal*, doublereal*, doublereal*, doublereal*);
|
||||
extern /* Subroutine */ int zscaltest_(integer*, doublecomplex*, doublecomplex*, integer*), itest1_(integer*, integer*), stest1_(doublereal*, doublereal*, doublereal*, doublereal*);
|
||||
static doublecomplex cx[8];
|
||||
extern doublereal dznrm2test_(integer*, doublecomplex*, integer*);
|
||||
static integer np1;
|
||||
@@ -595,7 +595,7 @@ static doublereal c_b43 = 1.;
|
||||
static integer ki;
|
||||
extern /* Subroutine */ int zdotutest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zswaptest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static integer kn;
|
||||
extern /* Subroutine */ int zaxpytest_(integer*, doublereal*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ int zaxpytest_(integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static doublecomplex cx[7], cy[7];
|
||||
static integer mx, my;
|
||||
|
||||
|
||||
+7
-5
@@ -10,7 +10,7 @@
|
||||
* 'CBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -243,7 +243,7 @@
|
||||
$ GO TO 70
|
||||
60 CONTINUE
|
||||
WRITE( NOUT, FMT = 9986 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
70 LTEST( I ) = LTESTT
|
||||
GO TO 50
|
||||
*
|
||||
@@ -283,7 +283,7 @@
|
||||
SAME = LZE( YY, YT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANS = 'T'
|
||||
CALL ZMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,
|
||||
@@ -291,7 +291,7 @@
|
||||
SAME = LZE( YY, YT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -418,7 +418,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT( ' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+9
-7
@@ -10,7 +10,7 @@
|
||||
* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -195,7 +195,7 @@
|
||||
$ GO TO 50
|
||||
40 CONTINUE
|
||||
WRITE( NOUT, FMT = 9990 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
50 LTEST( I ) = LTESTT
|
||||
GO TO 30
|
||||
*
|
||||
@@ -238,7 +238,7 @@
|
||||
SAME = LZE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'C'
|
||||
CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -247,7 +247,7 @@
|
||||
SAME = LZE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
DO 120 J = 1, N
|
||||
AB( J, NMAX + 1 ) = N - J + 1
|
||||
@@ -265,7 +265,7 @@
|
||||
SAME = LZE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'C'
|
||||
CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -274,7 +274,7 @@
|
||||
SAME = LZE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -386,7 +386,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT(' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
+9
-7
@@ -10,7 +10,7 @@
|
||||
* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
|
||||
* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
|
||||
* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
|
||||
* F LOGICAL FLAG, T TO STOP ON FAILURES.
|
||||
* F LOGICAL FLAG, T TO ERROR STOP ON FAILURES.
|
||||
* T LOGICAL FLAG, T TO TEST ERROR EXITS.
|
||||
* 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH
|
||||
* 16.0 THRESHOLD VALUE OF TEST RATIO
|
||||
@@ -195,7 +195,7 @@
|
||||
$ GO TO 50
|
||||
40 CONTINUE
|
||||
WRITE( NOUT, FMT = 9990 )SNAMET
|
||||
STOP
|
||||
ERROR STOP
|
||||
50 LTEST( I ) = LTESTT
|
||||
GO TO 30
|
||||
*
|
||||
@@ -238,7 +238,7 @@
|
||||
SAME = LZE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'C'
|
||||
CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -247,7 +247,7 @@
|
||||
SAME = LZE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
DO 120 J = 1, N
|
||||
AB( J, NMAX + 1 ) = N - J + 1
|
||||
@@ -265,7 +265,7 @@
|
||||
SAME = LZE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
TRANSB = 'C'
|
||||
CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
|
||||
@@ -274,7 +274,7 @@
|
||||
SAME = LZE( CC, CT, N )
|
||||
IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
|
||||
WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
|
||||
STOP
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
* Test each subroutine in turn.
|
||||
@@ -386,7 +386,9 @@
|
||||
IF( TRACE )
|
||||
$ CLOSE ( NTRA )
|
||||
CLOSE ( NOUT )
|
||||
STOP
|
||||
IF( FATAL ) THEN
|
||||
ERROR STOP
|
||||
END IF
|
||||
*
|
||||
10002 FORMAT( ' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
|
||||
10001 FORMAT(' ROW-MAJOR DATA LAYOUT IS TESTED' )
|
||||
|
||||
@@ -10,6 +10,15 @@
|
||||
#define int long
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(__INTEL_CLANG_COMPILER)
|
||||
//#define LAPACK_COMPLEX_STRUCTURE
|
||||
#define NOCHANGE
|
||||
#endif
|
||||
/* e.g. mingw64/x86_64-w64-mingw32/include/winerror.h */
|
||||
#ifdef FAILED
|
||||
#undef FAILED
|
||||
#endif
|
||||
|
||||
#define TRUE 1
|
||||
#define PASSED 1
|
||||
#define TEST_ROW_MJR 1
|
||||
|
||||
+128
-81
@@ -1,104 +1,122 @@
|
||||
This page describes the Make-based build, which is the default/authoritative
|
||||
build method. Note that the OpenBLAS repository also supports building with
|
||||
CMake (not described here) - that generally works and is tested, however there
|
||||
may be small differences between the Make and CMake builds.
|
||||
!!! info "Supported build systems"
|
||||
|
||||
!!! warning
|
||||
This page is made by someone who is not the developer and should not be considered as an official documentation of the build system. For getting the full picture, it is best to read the Makefiles and understand them yourself.
|
||||
This page describes the Make-based build, which is the
|
||||
default/authoritative build method. Note that the OpenBLAS repository also
|
||||
supports building with CMake (not described here) - that generally works
|
||||
and is tested, however there may be small differences between the Make and
|
||||
CMake builds.
|
||||
|
||||
## Makefile dep graph
|
||||
|
||||
## Makefile dependency graph
|
||||
|
||||
<!---
|
||||
An easy way to update this diagram is to copy it into https://mermaid.live
|
||||
and edit it interactively.
|
||||
-->
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A[Makefile] -->|included by many of the Makefiles in the subdirectories!| B(Makefile.system)
|
||||
B -->|triggered, not included, once by Makefile.system, and runs before any of the actual library code is built. builds and runs the 'getarch' tool for cpu identification, runs the compiler detection scripts c_check/f_check| C{Makefile.prebuild}
|
||||
C -->|either this or Makefile_kernel.conf is generated| D[Makefile.conf]
|
||||
C -->|temporary Makefile.conf during DYNAMIC_ARCH builds| E[Makefile_kernel.conf]
|
||||
B -->|defaults for build options that can be given on the make command line| F[Makefile.rule]
|
||||
B -->|architecture-specific compiler options and OpenBLAS buffer size values| G[Makefile.$ARCH]
|
||||
A --> exports
|
||||
A -->|directories: test, ctest, utest, cpp_thread_test| H(test directories)
|
||||
A --> I($BLASDIRS)
|
||||
I --> interface
|
||||
I --> driver/level2
|
||||
I --> driver/level3
|
||||
I --> driver/others
|
||||
A -->|for each target in DYNAMIC_CORE if DYNAMIC_ARCH=1| kernel
|
||||
A -->|subdirs: timing, testing, testing/EIG, testing/LIN| J($NETLIB_LAPACK_DIR)
|
||||
A --> relapack
|
||||
```
|
||||
Makefile
|
||||
|
|
||||
|----- Makefile.system # !!! this is included by many of the Makefiles in the subdirectories !!!
|
||||
| |
|
||||
| |===== Makefile.prebuild # This is triggered (not included) once by Makefile.system
|
||||
| | | # and runs before any of the actual library code is built.
|
||||
| | | # (builds and runs the "getarch" tool for cpu identification,
|
||||
| | | # runs the compiler detection scripts c_check and f_check)
|
||||
| | |
|
||||
| | ----- (Makefile.conf) [ either this or Makefile_kernel.conf is generated ]
|
||||
| | | { Makefile.system#L243 }
|
||||
| | ----- (Makefile_kernel.conf) [ temporary Makefile.conf during DYNAMIC_ARCH builds ]
|
||||
| |
|
||||
| |----- Makefile.rule # defaults for build options that can be given on the make command line
|
||||
| |
|
||||
| |----- Makefile.$(ARCH) # architecture-specific compiler options and OpenBLAS buffer size values
|
||||
|
|
||||
|~~~~~ exports/
|
||||
|
|
||||
|~~~~~ test/
|
||||
|
|
||||
|~~~~~ utest/
|
||||
|
|
||||
|~~~~~ ctest/
|
||||
|
|
||||
|~~~~~ cpp_thread_test/
|
||||
|
|
||||
|~~~~~ kernel/
|
||||
|
|
||||
|~~~~~ ${SUBDIRS}
|
||||
|
|
||||
|~~~~~ ${BLASDIRS}
|
||||
|
|
||||
|~~~~~ ${NETLIB_LAPACK_DIR}{,/timing,/testing/{EIG,LIN}}
|
||||
|
|
||||
|~~~~~ relapack/
|
||||
```
|
||||
|
||||
|
||||
## Important Variables
|
||||
|
||||
Most of the tunable variables are found in [Makefile.rule](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.rule), along with their detailed descriptions.<br/>
|
||||
Most of the variables are detected automatically in [Makefile.prebuild](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.prebuild), if they are not set in the environment.
|
||||
Most of the tunable variables are found in
|
||||
[Makefile.rule](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.rule),
|
||||
along with their detailed descriptions.
|
||||
|
||||
Most of the variables are detected automatically in
|
||||
[Makefile.prebuild](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.prebuild),
|
||||
if they are not set in the environment.
|
||||
|
||||
The most commonly used variables are documented below. There are more options
|
||||
though - please read the linked Makefiles if you want to see all variables.
|
||||
|
||||
### CPU related
|
||||
```
|
||||
ARCH - Target architecture (eg. x86_64)
|
||||
TARGET - Target CPU architecture, in case of DYNAMIC_ARCH=1 means library will not be usable on less capable CPUs
|
||||
TARGET_CORE - TARGET_CORE will override TARGET internally during each cpu-specific cycle of the build for DYNAMIC_ARCH
|
||||
DYNAMIC_ARCH - For building library for multiple TARGETs (does not lose any optimizations, but increases library size)
|
||||
DYNAMIC_LIST - optional user-provided subset of the DYNAMIC_CORE list in Makefile.system
|
||||
```
|
||||
|
||||
- `ARCH`: target architecture (e.g., `x86-64`).
|
||||
- `DYNAMIC_ARCH`: For building library for multiple `TARGET`s (does not lose any
|
||||
optimizations, but increases library size).
|
||||
- `DYNAMIC_LIST`: optional user-provided subset of the `DYNAMIC_CORE` list in
|
||||
[Makefile.system](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.system).
|
||||
- `TARGET`: target CPU architecture. In case of `DYNAMIC_ARCH=1`, it means that
|
||||
the library will not be usable on less capable CPUs.
|
||||
- `TARGET_CORE`: override `TARGET` internally during each CPU-specific cycle of
|
||||
the build for `DYNAMIC_ARCH`.
|
||||
|
||||
|
||||
### Toolchain related
|
||||
```
|
||||
CC - TARGET C compiler used for compilation (can be cross-toolchains)
|
||||
FC - TARGET Fortran compiler used for compilation (can be cross-toolchains, set NOFORTRAN=1 if used cross-toolchain has no fortran compiler)
|
||||
AR, AS, LD, RANLIB - TARGET toolchain helpers used for compilation (can be cross-toolchains)
|
||||
|
||||
HOSTCC - compiler of build machine, needed to create proper config files for target architecture
|
||||
HOST_CFLAGS - flags for build machine compiler
|
||||
```
|
||||
- `CC`: `TARGET` C compiler used for compilation (can be cross-toolchains).
|
||||
- `FC`: `TARGET` Fortran compiler used for compilation (can be cross-toolchains,
|
||||
set `NOFORTRAN=1` if the used cross-toolchain has no Fortran compiler).
|
||||
- `COMMON_OPT`: flags to add to all invocations of the target C and Fortran compilers
|
||||
(overrides `CFLAGS`/`FFLAGS` - prefer using `COMMON_OPT`)
|
||||
- `CCOMMON_OPT`: flags to add to all invocations of the target C compiler
|
||||
(overrides `CFLAGS`)
|
||||
- `FCOMMON_OPT`: flags to add to all invocations of the target Fortran compiler
|
||||
(overrides `FFLAGS`)
|
||||
- `LDFLAGS`: flags to add to all target linker invocations
|
||||
- `AR`, `AS`, `LD`, `RANLIB`: `TARGET` toolchain helpers used for compilation
|
||||
(can be cross-toolchains).
|
||||
- `HOSTCC`: compiler of build machine, needed to create proper config files for
|
||||
the target architecture.
|
||||
- `HOST_CFLAGS`: flags for the build machine compiler.
|
||||
|
||||
|
||||
### Library related
|
||||
```
|
||||
BINARY - 32/64 bit library
|
||||
|
||||
BUILD_SHARED - Create shared library
|
||||
BUILD_STATIC - Create static library
|
||||
#### Library kind and bitness options
|
||||
|
||||
QUAD_PRECISION - enable support for IEEE quad precision [ largely unimplemented leftover from GotoBLAS, do not use ]
|
||||
EXPRECISION - Obsolete option to use float80 of SSE on BSD-like systems
|
||||
INTERFACE64 - Build with 64bit integer representations to support large array index values [ incompatible with standard API ]
|
||||
- `BINARY`: whether to build a 32-bit or 64-bit library (default is `64`, set
|
||||
to `32` on a 32-bit platform).
|
||||
- `INTERFACE64`: build with 64-bit (ILP64) integer representations to support
|
||||
large array index values (incompatible with the standard 32-bit integer (LP64) API).
|
||||
- `NO_STATIC`: if set to `1`, don't build a static library (default is `0`)
|
||||
- `NO_SHARED`: if set to `1`, don't build a shared library (default is `0`)
|
||||
|
||||
BUILD_SINGLE - build the single-precision real functions of BLAS [and optionally LAPACK]
|
||||
BUILD_DOUBLE - build the double-precision real functions
|
||||
BUILD_COMPLEX - build the single-precision complex functions
|
||||
BUILD_COMPLEX16 - build the double-precision complex functions
|
||||
(all four types are included in the build by default when none was specifically selected)
|
||||
#### Data type options
|
||||
|
||||
BUILD_BFLOAT16 - build the "half precision brainfloat" real functions
|
||||
- `BUILD_SINGLE`: build the single-precision real functions of BLAS and (if
|
||||
it's built) LAPACK
|
||||
- `BUILD_DOUBLE`: build the double-precision real functions
|
||||
- `BUILD_COMPLEX`: build the single-precision complex functions
|
||||
- `BUILD_COMPLEX16`: build the double-precision complex functions
|
||||
- `BUILD_BFLOAT16`: build the "half precision brainfloat" real functions
|
||||
- `EXPRECISION`: (do not use, this is a work in progress) option to use `long
|
||||
double` functions
|
||||
|
||||
By default, the single- and double-precision real and complex floating-point
|
||||
functions are included in the build, while the half- and extended-precision
|
||||
functions are not.
|
||||
|
||||
USE_THREAD - Use a multithreading backend (default to pthread)
|
||||
USE_LOCKING - implement locking for thread safety even when USE_THREAD is not set (so that the singlethreaded library can
|
||||
safely be called from multithreaded programs)
|
||||
USE_OPENMP - Use OpenMP as multithreading backend
|
||||
NUM_THREADS - define this to the maximum number of parallel threads you expect to need (defaults to the number of cores in the build cpu)
|
||||
NUM_PARALLEL - define this to the number of OpenMP instances that your code may use for parallel calls into OpenBLAS (default 1,see below)
|
||||
|
||||
```
|
||||
#### Threading options
|
||||
|
||||
- `USE_THREAD`: Use a multithreading backend (defaults to `pthreads`).
|
||||
- `USE_LOCKING`: implement locking for thread safety even when `USE_THREAD` is
|
||||
not set (so that the single-threaded library can safely be called from
|
||||
multithreaded programs).
|
||||
- `USE_OPENMP`: Use OpenMP as multithreading backend
|
||||
- `NUM_THREADS`: define this to the maximum number of parallel threads you
|
||||
expect to need (defaults to the number of cores in the build CPU).
|
||||
- `NUM_PARALLEL`: define this to the number of OpenMP instances that your code
|
||||
may use for parallel calls into OpenBLAS (the default is `1`, see below).
|
||||
|
||||
OpenBLAS uses a fixed set of memory buffers internally, used for communicating
|
||||
and compiling partial results from individual threads. For efficiency, the
|
||||
@@ -118,3 +136,32 @@ same time, then only one of them will be able to make progress while all the
|
||||
rest of them spin-wait for the one available buffer. Setting `NUM_PARALLEL` to
|
||||
the upper bound on the number of OpenMP runtimes that you can have in a process
|
||||
ensures that there are a sufficient number of buffer sets available.
|
||||
|
||||
#### Library and symbol name options
|
||||
|
||||
- `FIXED_LIBNAME`: if set to `1`, uses a non-versioned name for the library and
|
||||
no symbolic linking to variant names (default is `0`)
|
||||
- `LIBNAMEPREFIX`: prefix that, if given, will be inserted in the library name
|
||||
before `openblas` (e.g., `xxx` will result in `libxxxopenblas.so`)
|
||||
- `LIBNAMESUFFIX`: suffix that, if given, will be inserted in the library name
|
||||
after `openblas`, separated by an underscore (e.g., `yyy` will result in
|
||||
`libopenblas_yyy.so`)
|
||||
- `SYMBOLPREFIX`: prefix that, if given, will be added to all symbol names
|
||||
*and* to the library name
|
||||
- `SYMBOLSUFFIX`: suffix that, if given, will be added to all symbol names
|
||||
*and* to the library name
|
||||
|
||||
#### BLAS and LAPACK options
|
||||
|
||||
By default, the Fortran and C interfaces to BLAS and LAPACK are built,
|
||||
including deprecated functions, while
|
||||
[ReLAPACK](https://github.com/HPAC/ReLAPACK) is not.
|
||||
|
||||
- `NO_CBLAS`: if set to `1`, don't build the CBLAS interface (default is `0`)
|
||||
- `ONLY_CBLAS`: if set to `1`, only build the CBLAS interface (default is `0`)
|
||||
- `NO_LAPACK`: if set to `1`, don't build LAPACK (default is `0`)
|
||||
- `NO_LAPACKE`: if set to `1`, don't build the LAPACKE interface (default is `0`)
|
||||
- `BUILD_LAPACK_DEPRECATED`: if set to `0`, don't build deprecated LAPACK
|
||||
functions (default is `1`)
|
||||
- `BUILD_RELAPACK`: if set to `1`, build Recursive LAPACK on top of LAPACK
|
||||
(default is `0`)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
+8
-8
@@ -5,14 +5,14 @@ This page documents those non-standard APIs.
|
||||
|
||||
## BLAS-like extensions
|
||||
|
||||
| Routine | Data Types | Description |
|
||||
| ------------- |:------------- | :---------------|
|
||||
| ?axpby | s,d,c,z | like axpy with a multiplier for y |
|
||||
| ?gemm3m | c,z | gemm3m |
|
||||
| ?imatcopy | s,d,c,z | in-place transpositon/copying |
|
||||
| ?omatcopy | s,d,c,z | out-of-place transpositon/copying |
|
||||
| ?geadd | s,d,c,z | matrix add |
|
||||
| ?gemmt | s,d,c,z | gemm but only a triangular part updated|
|
||||
| Routine | Data Types | Description |
|
||||
| ------------- |:------------- | :-----------------------------------------------|
|
||||
| ?axpby | s,d,c,z | like `axpy` with a multiplier for `y` |
|
||||
| ?gemm3m | c,z | `gemm3m` |
|
||||
| ?imatcopy | s,d,c,z | in-place transposition/copying |
|
||||
| ?omatcopy | s,d,c,z | out-of-place transposition/copying |
|
||||
| ?geadd | s,d,c,z | ATLAS-like matrix add `B = α*A+β*B` |
|
||||
| ?gemmt | s,d,c,z | `gemm` but only a triangular part updated |
|
||||
|
||||
|
||||
## bfloat16 functionality
|
||||
|
||||
+15
-8
@@ -51,9 +51,9 @@ In practice, the values are derived by experimentation to yield the block sizes
|
||||
|
||||
### <a name="reportbug"></a>How can I report a bug?
|
||||
|
||||
Please file an issue at this [issue page](https://github.com/xianyi/OpenBLAS/issues) or send mail to the [OpenBLAS mailing list](https://groups.google.com/forum/#!forum/openblas-users).
|
||||
Please file an issue at this [issue page](https://github.com/OpenMathLib/OpenBLAS/issues) or send mail to the [OpenBLAS mailing list](https://groups.google.com/forum/#!forum/openblas-users).
|
||||
|
||||
Please provide the following information: CPU, OS, compiler, and OpenBLAS compiling flags (Makefile.rule). In addition, please describe how to reproduce this bug.
|
||||
Please provide the following information: CPU, OS, compiler, OpenBLAS version and any compiling flags you used (Makefile.rule). In addition, please describe how to reproduce this bug.
|
||||
|
||||
### <a name="publication"></a>How to reference OpenBLAS.
|
||||
|
||||
@@ -91,7 +91,7 @@ like Intel Haswell. There once was an effort to build an OpenCL implementation t
|
||||
|
||||
We obtained a performance comparable with Intel MKL that actually outperformed Intel MKL in some cases.
|
||||
Here is the result of the DGEMM subroutine's performance on Intel Core i5-2500K Windows 7 SP1 64-bit:
|
||||

|
||||

|
||||
|
||||
<hr noshade="noshade">
|
||||
|
||||
@@ -99,13 +99,13 @@ Here is the result of the DGEMM subroutine's performance on Intel Core i5-2500K
|
||||
|
||||
### <a name="MSVC"></a>How can I call an OpenBLAS function in Microsoft Visual Studio?
|
||||
|
||||
Please read [this page](install.md#visual-studio).
|
||||
Please read [this page](install.md#visual-studio-native-windows-abi).
|
||||
|
||||
### <a name="C99_complex_number"></a>How can I use CBLAS and LAPACKE without C99 complex number support (e.g. in Visual Studio)?
|
||||
|
||||
Zaheer has fixed this bug. You can now use the structure instead of C99 complex numbers. Please read [this issue page](http://github.com/xianyi/OpenBLAS/issues/95) for details.
|
||||
|
||||
[This issue](https://github.com/xianyi/OpenBLAS/issues/305) is for using LAPACKE in Visual Studio.
|
||||
[This issue](https://github.com/OpenMathLib/OpenBLAS/issues/305) is for using LAPACKE in Visual Studio.
|
||||
|
||||
### <a name="Linux_SEGFAULT"></a>I get a SEGFAULT with multi-threading on Linux. What's wrong?
|
||||
|
||||
@@ -134,6 +134,13 @@ Background: OpenBLAS implements optimized versions of some LAPACK functions, so
|
||||
Some of the LAPACK tests, notably in xeigtstz, try to allocate around 10MB on the stack. You may need to use
|
||||
`ulimit -s` to change the default limits on your system to allow this.
|
||||
|
||||
### <a name="lapack_test"></a>My build worked fine and passed the BLAS tests, but running `make lapack-test` ends with a number of errors in the summary report
|
||||
|
||||
The LAPACK tests were primarily created to test the validity of the Reference-LAPACK implementation, which is implemented in unoptimized, single-threaded Fortran code. This makes it very sensitive to small numerical deviations that can result from the use of specialized cpu instructions that combine multiplications and additions without intermediate rounding and storing to memory (FMA), or from changing the order of mathematical operations by splitting an original problem workload into smaller tasks that are solved in parallel. As a result, you may encounter a small number of errors in the "numerical" column of
|
||||
the summary table at the end of the `make lapack-test` run - this is usually nothing to worry about, and the exact number and distribution of errors among the
|
||||
four data types will often vary with the optimization flags you supplied to the compiler, or the cpu model for which you built OpenBLAS. Sporadic errors in the column labeled `other` are normally the sign of failed convergence of iterative diagonalizations for the same reasons just mentioned. A more detailed error report is stored in the file testing_results.txt - this should be consulted in case of doubt. Care should be taken if you encounter numerical errors in the hundreds, or `other` errors accompanied by the LAPACK error message "on entry to function_name parameter X had an illegal value" that signals a problem with argument passing between individual functions.
|
||||
(See also [this issue](https://github.com/OpenMathLib/OpenBLAS/issues/4032) in the issue tracker on github for additional discussion, examples and links)
|
||||
|
||||
### <a name="no_affinity"></a>How could I disable OpenBLAS threading affinity on runtime?
|
||||
|
||||
You can define the OPENBLAS_MAIN_FREE or GOTOBLAS_MAIN_FREE environment variable to disable threading affinity on runtime. For example, before the running,
|
||||
@@ -213,8 +220,8 @@ lead to compiler error messages about an "ABI change" when compiling AVX512 code
|
||||
### <a name="ppcxl"></a>Building OpenBLAS on POWER fails with IBM XL
|
||||
|
||||
Trying to compile OpenBLAS with IBM XL ends with error messages about unknown register names
|
||||
like "vs32". Working around these by using known alternate names for the vector registers only leads to another assembler error about unsupported constraints. This is a known deficiency in the IBM compiler at least up to and including 16.1.0 (and in the POWER version of clang, from which it is derived) - use gcc instead. (See issues #1078
|
||||
and #1699 for related discussions)
|
||||
like "vs32". Working around these by using known alternate names for the vector registers only leads to another assembler error about unsupported constraints. This is a known deficiency in the IBM compiler at least up to and including 16.1.0 (and in the POWER version of clang, from which it is derived) - use gcc instead. (See issues [#1078](https://github.com/OpenMathLib/OpenBLAS/issues/1078)
|
||||
and [#1699](https://github.com/OpenMathLib/OpenBLAS/issues/1699) for related discussions)
|
||||
|
||||
### <a name="debianlts"></a>Replacing system BLAS/updating APT OpenBLAS in Mint/Ubuntu/Debian
|
||||
|
||||
@@ -261,7 +268,7 @@ path (usually either /usr/local/include, /opt/OpenBLAS/include or whatever you s
|
||||
|
||||
This is due to different interpretations of the (informal) standard for passing characters as arguments between C and FORTRAN functions. As the method for storing text differs in the two languages, when C calls Fortran the text length is passed as an "invisible" additional parameter.
|
||||
Historically, this has not been required when the text is just a single character, so older code like the Reference-LAPACK bundled with OpenBLAS
|
||||
does not do it. Recently gcc's checking has changed to require it, but there is no consensus yet if and how the existing LAPACK (and many other codebases) should adapt. (And for actual compilation, gcc has mostly backtracked and provided compatibility options - hence the default build settings in the OpenBLAS Makefiles add -fno-optimize-sibling-calls to the gfortran options to prevent miscompilation with "affected" versions. See ticket 2154 in the issue tracker for more details and links)
|
||||
does not do it. Recently gcc's checking has changed to require it, but there is no consensus yet if and how the existing LAPACK (and many other codebases) should adapt. (And for actual compilation, gcc has mostly backtracked and provided compatibility options - hence the default build settings in the OpenBLAS Makefiles add -fno-optimize-sibling-calls to the gfortran options to prevent miscompilation with "affected" versions. See ticket [#2154](https://github.com/OpenMathLib/OpenBLAS/issues/2154) in the issue tracker for more details and links)
|
||||
<hr noshade="noshade">
|
||||
|
||||
### <a name="newcpu"></a>Build fails with lots of errors about undefined ?GEMM_UNROLL_M
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user