mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-06 23:52:38 -05:00
Compare commits
720 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb4b4a56e2 | ||
|
|
b025bca185 | ||
|
|
87bb1aa4d3 | ||
|
|
2d95a394a6 | ||
|
|
9634907676 | ||
|
|
d27647e408 | ||
|
|
9c9e7fa998 | ||
|
|
1a495e351c | ||
|
|
680e4dd865 | ||
|
|
abb3340cc7 | ||
|
|
70a3a83c26 | ||
|
|
92810ad761 | ||
|
|
39bd3ca1da | ||
|
|
4d0edde66d | ||
|
|
69cbfd682a | ||
|
|
6ae37a9519 | ||
|
|
97305f11a8 | ||
|
|
2e6c518a1c | ||
|
|
7f01c5c6f3 | ||
|
|
f19b2f7248 | ||
|
|
914b7023a2 | ||
|
|
4dddd3a44f | ||
|
|
01236bc40b | ||
|
|
618ca6525b | ||
|
|
c71ef8197f | ||
|
|
1eccb9d66f | ||
|
|
c0f7e881ba | ||
|
|
f9c65f3bbf | ||
|
|
f19fcb4407 | ||
|
|
382bfb0957 | ||
|
|
b7fbb28a47 | ||
|
|
fbedf197ab | ||
|
|
fc68ed15bc | ||
|
|
53ac6f7ee7 | ||
|
|
50eb7ba2fd | ||
|
|
1b875fdabb | ||
|
|
bb96684daf | ||
|
|
1e88b8447f | ||
|
|
5b610e4dfe | ||
|
|
92a258f142 | ||
|
|
1986b45acd | ||
|
|
539943c655 | ||
|
|
adb3c22e80 | ||
|
|
e22f798085 | ||
|
|
8698b73036 | ||
|
|
64650bf121 | ||
|
|
9405d8ed92 | ||
|
|
219f033647 | ||
|
|
16a83a9f61 | ||
|
|
abfed74af9 | ||
|
|
ba4a11c619 | ||
|
|
f1b8351a63 | ||
|
|
a620dfc955 | ||
|
|
f1e688724e | ||
|
|
e8355e1a1c | ||
|
|
6cb27e9662 | ||
|
|
5fee8ba288 | ||
|
|
b7840d9ab6 | ||
|
|
d591832eea | ||
|
|
13ac54ada9 | ||
|
|
1f36ea2a8e | ||
|
|
ab90af37b3 | ||
|
|
88031650b4 | ||
|
|
4a5493e12f | ||
|
|
6a97aeaf1b | ||
|
|
6ac3534fd5 | ||
|
|
e210067660 | ||
|
|
50c66083a7 | ||
|
|
05dc9821c5 | ||
|
|
c623dc7c92 | ||
|
|
4a7897b8bc | ||
|
|
33a7530f9b | ||
|
|
44f0daf384 | ||
|
|
6a45d5dcc9 | ||
|
|
7bf12dc81f | ||
|
|
2020b71eeb | ||
|
|
cad5fef1ea | ||
|
|
56e88f57fb | ||
|
|
bc09aa5ad0 | ||
|
|
eeadea53e2 | ||
|
|
0528ccd01e | ||
|
|
5486300db7 | ||
|
|
b0dda2b5b3 | ||
|
|
c80ef54b60 | ||
|
|
31383861cd | ||
|
|
b2b18ce22d | ||
|
|
8496f5b631 | ||
|
|
ec17bc4d40 | ||
|
|
5fa6a034d5 | ||
|
|
24c25b7d2e | ||
|
|
874cff3d51 | ||
|
|
297d884482 | ||
|
|
26c72cd7d8 | ||
|
|
fa91cff515 | ||
|
|
f415814069 | ||
|
|
9cf78cf14b | ||
|
|
8dc87576c5 | ||
|
|
f0db17be87 | ||
|
|
616c52f266 | ||
|
|
5bad45925a | ||
|
|
cdd9ea2496 | ||
|
|
14ef99ca67 | ||
|
|
2cd45a9e38 | ||
|
|
a070035d97 | ||
|
|
012d7124cd | ||
|
|
cde1e2c5f3 | ||
|
|
ead441f5db | ||
|
|
031e09fede | ||
|
|
1ee27a564b | ||
|
|
23c51c9a11 | ||
|
|
f9e653ea9f | ||
|
|
131085be80 | ||
|
|
12081e4f5b | ||
|
|
e1b8f52e59 | ||
|
|
6dad42a4db | ||
|
|
799d95d67a | ||
|
|
b131c60f08 | ||
|
|
1e2e247789 | ||
|
|
0caeb41bff | ||
|
|
fd0cbd448b | ||
|
|
bdf6e87dc5 | ||
|
|
88c7aca6f5 | ||
|
|
887c891ab2 | ||
|
|
2bc5fb10a7 | ||
|
|
8497e9c54f | ||
|
|
2e07e69697 | ||
|
|
2fea4e72b5 | ||
|
|
2863ade0c2 | ||
|
|
fb0b638cbb | ||
|
|
1e2d011705 | ||
|
|
dfaca04167 | ||
|
|
33b1d5f4b3 | ||
|
|
2499822106 | ||
|
|
9fe9e8989d | ||
|
|
311d3e1c18 | ||
|
|
5e444553b1 | ||
|
|
16f011a47f | ||
|
|
488049e695 | ||
|
|
d23e5e15ba | ||
|
|
5ad52192fe | ||
|
|
937dc7b7c3 | ||
|
|
7fa5e8706e | ||
|
|
2f27d5d108 | ||
|
|
56f23db878 | ||
|
|
264e3928c2 | ||
|
|
ef629ba0d0 | ||
|
|
aacdbc360b | ||
|
|
e2e37c8cfb | ||
|
|
c307433900 | ||
|
|
97e6a6669f | ||
|
|
e8f5cc67f8 | ||
|
|
8f9c1dd781 | ||
|
|
60634366c1 | ||
|
|
78bd280666 | ||
|
|
217540296f | ||
|
|
7eaabd4e00 | ||
|
|
ff59f3dbb4 | ||
|
|
9c8da1d4d3 | ||
|
|
ffc9f67751 | ||
|
|
bf1a0a0b83 | ||
|
|
f864687a96 | ||
|
|
030d6e5962 | ||
|
|
f609be6ec3 | ||
|
|
aa4a4c9fd0 | ||
|
|
269d12d1be | ||
|
|
23a1ae0337 | ||
|
|
4571899664 | ||
|
|
6d9b50b938 | ||
|
|
cd763be05b | ||
|
|
4e6b24d67d | ||
|
|
42a7194e93 | ||
|
|
01e063f6f5 | ||
|
|
81e3f6e7d9 | ||
|
|
9f1753cc4f | ||
|
|
39eafc3255 | ||
|
|
d342968211 | ||
|
|
c5968e8896 | ||
|
|
8e6f4d4ecb | ||
|
|
f80177cbd3 | ||
|
|
32b0314990 | ||
|
|
665e43fecc | ||
|
|
b5fb96dca0 | ||
|
|
73722ce186 | ||
|
|
638ed7b4f2 | ||
|
|
b5b12216d6 | ||
|
|
d2867a2ed8 | ||
|
|
e290995999 | ||
|
|
9ae8907b3e | ||
|
|
a80f3e8190 | ||
|
|
b3d1ca6cb2 | ||
|
|
0290b1ed3c | ||
|
|
869209389e | ||
|
|
c6530e352f | ||
|
|
706f588b36 | ||
|
|
eb20dfbc94 | ||
|
|
f69ba3ea1d | ||
|
|
88ff807700 | ||
|
|
e76e75cdff | ||
|
|
083c61754b | ||
|
|
146bbda33f | ||
|
|
c9f90e6770 | ||
|
|
6a2a8579ae | ||
|
|
29dd2c2138 | ||
|
|
4e5aef0a8a | ||
|
|
039c42b1fe | ||
|
|
1e45349890 | ||
|
|
d64bbfa9c0 | ||
|
|
d5605a29b4 | ||
|
|
4c28fa6009 | ||
|
|
ad9ae6a143 | ||
|
|
a5b0bc04cc | ||
|
|
f491e99bf9 | ||
|
|
402c44b547 | ||
|
|
ac4086b273 | ||
|
|
f00769f758 | ||
|
|
6ceb4dfc4f | ||
|
|
3a2941b719 | ||
|
|
99826a6b51 | ||
|
|
4a9a7434f6 | ||
|
|
dbb721cb5e | ||
|
|
2a93bb2cee | ||
|
|
7dfb4d9dc0 | ||
|
|
22eca8e0d5 | ||
|
|
ecb46643e2 | ||
|
|
73d959a259 | ||
|
|
a95b179a60 | ||
|
|
2e4a83547d | ||
|
|
fd30294ca0 | ||
|
|
9b16a2736a | ||
|
|
ea7aa4ccef | ||
|
|
d81845e1ab | ||
|
|
f9d07229b4 | ||
|
|
2d15c10e0f | ||
|
|
5bd6a1c028 | ||
|
|
356e666e61 | ||
|
|
bdf12bca0f | ||
|
|
c44ae06d54 | ||
|
|
c7de9e6561 | ||
|
|
00c9f89213 | ||
|
|
8f2a92c3ec | ||
|
|
69e67784d3 | ||
|
|
cd7f73a31c | ||
|
|
98cfe7ed37 | ||
|
|
449617d717 | ||
|
|
a25042db72 | ||
|
|
049caabdae | ||
|
|
81b1cccb0b | ||
|
|
2911bb3a81 | ||
|
|
45412a2ace | ||
|
|
f4cedd7b63 | ||
|
|
3e3d34b3ce | ||
|
|
12fb27e2cf | ||
|
|
a1e8c1353f | ||
|
|
c01c035269 | ||
|
|
eeb8bbe5bc | ||
|
|
f85aba5d21 | ||
|
|
f8bf8fddd9 | ||
|
|
7459677fd5 | ||
|
|
c0b0628d59 | ||
|
|
59e8fdb9ed | ||
|
|
5142a406b0 | ||
|
|
3cc8b19ca0 | ||
|
|
f8865b1498 | ||
|
|
969821296f | ||
|
|
a877b1d269 | ||
|
|
9cea70b77c | ||
|
|
d2d501c821 | ||
|
|
a5089638ea | ||
|
|
17f82280d0 | ||
|
|
c78d800392 | ||
|
|
8bef964f68 | ||
|
|
4da37baf8c | ||
|
|
33e7a54c29 | ||
|
|
1d4c8dda96 | ||
|
|
b633b593ad | ||
|
|
8dbb83f99b | ||
|
|
f24e4f6462 | ||
|
|
2e001677df | ||
|
|
be253808d4 | ||
|
|
e07cbe858b | ||
|
|
271a12dcca | ||
|
|
06c70a7cd9 | ||
|
|
dccf7f9ae7 | ||
|
|
aa1f0077d8 | ||
|
|
348916040c | ||
|
|
014c80f15d | ||
|
|
6adba6dad4 | ||
|
|
b346507975 | ||
|
|
fb5b873524 | ||
|
|
a6f381403c | ||
|
|
5d0fd2dc8e | ||
|
|
1ad6b5504c | ||
|
|
222fcfae87 | ||
|
|
5a2c3d8396 | ||
|
|
687617de25 | ||
|
|
a682ae3299 | ||
|
|
2e6523aa10 | ||
|
|
29591609f5 | ||
|
|
b15da20f9c | ||
|
|
8f2f3d73df | ||
|
|
7d7459100b | ||
|
|
8a0c8d9709 | ||
|
|
8592561b7a | ||
|
|
7ff465053b | ||
|
|
c62ac89081 | ||
|
|
1c58e28124 | ||
|
|
96ee721d21 | ||
|
|
de7ed2b968 | ||
|
|
4fb3086c1c | ||
|
|
5ab17fcd46 | ||
|
|
ff1849b63b | ||
|
|
9db3fb280e | ||
|
|
06e105821a | ||
|
|
a0046e325c | ||
|
|
e84bad4eca | ||
|
|
fc5b339f04 | ||
|
|
96cfdda9a1 | ||
|
|
3b4b230cab | ||
|
|
6163d27f14 | ||
|
|
f3f75fb788 | ||
|
|
d07a806123 | ||
|
|
ef522f6404 | ||
|
|
763691fa4b | ||
|
|
2491149d61 | ||
|
|
9bc13813ba | ||
|
|
3edaebb4cf | ||
|
|
558c524e2a | ||
|
|
d6582de09b | ||
|
|
d32df84ca5 | ||
|
|
8a13e0febd | ||
|
|
028b335bac | ||
|
|
d7d09159c1 | ||
|
|
ffec421408 | ||
|
|
d0df824599 | ||
|
|
4dec063472 | ||
|
|
86e25a13e3 | ||
|
|
91b50f1ac8 | ||
|
|
8ef3e2ec14 | ||
|
|
e9e747f0d1 | ||
|
|
3a75f39935 | ||
|
|
529f394c02 | ||
|
|
e3422979d1 | ||
|
|
bf248caa47 | ||
|
|
aa3dc75434 | ||
|
|
118b2e4a68 | ||
|
|
f1827e925e | ||
|
|
b8762ed428 | ||
|
|
38d20ea5f4 | ||
|
|
1fbbae1e4a | ||
|
|
caa2da8bb3 | ||
|
|
66734c7d3f | ||
|
|
a066f9a49c | ||
|
|
99d995fdab | ||
|
|
381e907ca0 | ||
|
|
9126504c76 | ||
|
|
d0f88c6068 | ||
|
|
a789316bbb | ||
|
|
f9bbdeeff9 | ||
|
|
a4d35065d9 | ||
|
|
901f1a7ab1 | ||
|
|
450b9ec19a | ||
|
|
a556070b42 | ||
|
|
05421057ae | ||
|
|
c3fd5835c3 | ||
|
|
cf48a34065 | ||
|
|
6245f86d7c | ||
|
|
84ebf9d372 | ||
|
|
2d5a7b6aa8 | ||
|
|
e9b51b7baa | ||
|
|
84d7eb05f3 | ||
|
|
41e374f0d9 | ||
|
|
c53fa07d2b | ||
|
|
8791261220 | ||
|
|
c7d2639010 | ||
|
|
c529770d38 | ||
|
|
64fb4f265b | ||
|
|
ca9a3063d8 | ||
|
|
33f6b91146 | ||
|
|
ada99a6dd1 | ||
|
|
7d1be2d234 | ||
|
|
2b87a10cf2 | ||
|
|
d224c0e7d8 | ||
|
|
921abd4623 | ||
|
|
6e7b440630 | ||
|
|
cd723e32e8 | ||
|
|
b13d9a04eb | ||
|
|
258f936272 | ||
|
|
997f90dae7 | ||
|
|
5d559971ca | ||
|
|
8102526abc | ||
|
|
af30f8cd4b | ||
|
|
4418ee743a | ||
|
|
fa18a75177 | ||
|
|
0e7c0e2903 | ||
|
|
f3c1435b01 | ||
|
|
fb28b931cc | ||
|
|
dd980fde49 | ||
|
|
ca77fda511 | ||
|
|
e3f726796b | ||
|
|
3953568a0e | ||
|
|
f9bc3fb09b | ||
|
|
0497ab072b | ||
|
|
5431601cef | ||
|
|
aeb2c6e8ec | ||
|
|
79f4685d9a | ||
|
|
5fa7a743f5 | ||
|
|
9124ed9348 | ||
|
|
55133d03cf | ||
|
|
77eb79ced5 | ||
|
|
9d24d181d7 | ||
|
|
b011b935b4 | ||
|
|
d807ba27a6 | ||
|
|
2847c814d2 | ||
|
|
f77c4c67f2 | ||
|
|
13d256e737 | ||
|
|
ed4cfd55ac | ||
|
|
f965fd5a8c | ||
|
|
472ec1a0e6 | ||
|
|
74d62c92cd | ||
|
|
7e47b04676 | ||
|
|
d19c152d9a | ||
|
|
2abea46a87 | ||
|
|
e450e62b40 | ||
|
|
e6afd12d4f | ||
|
|
2ba19c9827 | ||
|
|
426bc8f0c4 | ||
|
|
f9f7567b17 | ||
|
|
d2b3ffc710 | ||
|
|
ed2f2c5a60 | ||
|
|
c235145121 | ||
|
|
f8d1488e33 | ||
|
|
0013e610d5 | ||
|
|
2c9b034c08 | ||
|
|
455cdf96f0 | ||
|
|
5519e97e6e | ||
|
|
4c4a674a4b | ||
|
|
239aecb0bb | ||
|
|
b1e23b46dd | ||
|
|
9d679462ed | ||
|
|
be31811920 | ||
|
|
26ed6254dc | ||
|
|
1cb4d73fe3 | ||
|
|
f110b5000b | ||
|
|
83f437f979 | ||
|
|
175a7b06b7 | ||
|
|
9d580693db | ||
|
|
3bdf7111ce | ||
|
|
23ebcfb2db | ||
|
|
b1eac17d60 | ||
|
|
9dfa38f1e7 | ||
|
|
80fd0f9fab | ||
|
|
58174e5e91 | ||
|
|
ab7f0cb4cc | ||
|
|
f6f480264e | ||
|
|
8cd265c38c | ||
|
|
99fe304c1f | ||
|
|
7889634b40 | ||
|
|
0e224abb0a | ||
|
|
c9f7cbae09 | ||
|
|
2e537013a2 | ||
|
|
7cb9b92347 | ||
|
|
bb2cc0deb7 | ||
|
|
d4a3024996 | ||
|
|
77d5b73724 | ||
|
|
ec717f27b5 | ||
|
|
0fc215c457 | ||
|
|
534a764023 | ||
|
|
dc705d88ab | ||
|
|
6e9fd5a430 | ||
|
|
e3f37bc2f9 | ||
|
|
f6d58c7d46 | ||
|
|
48545c5916 | ||
|
|
f7dcfffdb1 | ||
|
|
52281906c6 | ||
|
|
487b2a3655 | ||
|
|
71ee145f70 | ||
|
|
da20d74145 | ||
|
|
c29fa62260 | ||
|
|
5613912ec4 | ||
|
|
b77c5428f9 | ||
|
|
2012ce384e | ||
|
|
6b40ede2bc | ||
|
|
128c5f67ad | ||
|
|
578bebb04d | ||
|
|
5611249af7 | ||
|
|
a56febcd13 | ||
|
|
0ad992985c | ||
|
|
1a66c3f1a1 | ||
|
|
a2ef2fd9d9 | ||
|
|
5c02cb50da | ||
|
|
998c55030a | ||
|
|
079de97fab | ||
|
|
432addab33 | ||
|
|
10d292092a | ||
|
|
a02ee96651 | ||
|
|
d783febad6 | ||
|
|
ea6d9073b7 | ||
|
|
83a5923568 | ||
|
|
9e2b63890c | ||
|
|
ed08895d4a | ||
|
|
5b4026694d | ||
|
|
c9798ba2e9 | ||
|
|
3752551e53 | ||
|
|
a62f6f9552 | ||
|
|
e9d2e194f3 | ||
|
|
6009fffa7b | ||
|
|
fad1e5fb3c | ||
|
|
228f02c361 | ||
|
|
72c45d882b | ||
|
|
4dc7a8103b | ||
|
|
71108e1bde | ||
|
|
72b7d934f6 | ||
|
|
08e9e834b9 | ||
|
|
c26c4ce714 | ||
|
|
61ab47cc95 | ||
|
|
7db7b3727d | ||
|
|
1d03b942a5 | ||
|
|
ee87f73d5e | ||
|
|
bb7bff9115 | ||
|
|
1e5fdde9ba | ||
|
|
2b29a4c20f | ||
|
|
119e7ea7bf | ||
|
|
58c81be1f1 | ||
|
|
d3b137c817 | ||
|
|
9dce868fb9 | ||
|
|
c4170fbb86 | ||
|
|
2dc4ceae29 | ||
|
|
0e0a26f644 | ||
|
|
68d77b02d7 | ||
|
|
c13c83b902 | ||
|
|
72c9d94390 | ||
|
|
9101469308 | ||
|
|
759573ace3 | ||
|
|
0a1836e5a8 | ||
|
|
8af1075c98 | ||
|
|
91498ec690 | ||
|
|
59b62dcb77 | ||
|
|
10f9b29e03 | ||
|
|
d5af5cf8f8 | ||
|
|
05928ccc25 | ||
|
|
ad6dc876b3 | ||
|
|
207dae418d | ||
|
|
7508411faf | ||
|
|
f34031a984 | ||
|
|
d1aadc2e3b | ||
|
|
6d8cf91568 | ||
|
|
96b2560f79 | ||
|
|
923d47fff0 | ||
|
|
542a27a032 | ||
|
|
a7e8ac6cf8 | ||
|
|
42fd146c2b | ||
|
|
34468782cd | ||
|
|
3badeb56a0 | ||
|
|
bc18b5d0be | ||
|
|
158d2e4302 | ||
|
|
f60118ee79 | ||
|
|
6bc217e985 | ||
|
|
3560b6a3c2 | ||
|
|
77eecdd2c2 | ||
|
|
f4943b77f3 | ||
|
|
c908ef2489 | ||
|
|
d21155f3c6 | ||
|
|
da39ed2ce0 | ||
|
|
06500761fb | ||
|
|
919a6c0cc4 | ||
|
|
467e5115b0 | ||
|
|
c495802f64 | ||
|
|
66e48ed2d7 | ||
|
|
ac4cd3eb9b | ||
|
|
5d73402651 | ||
|
|
166d8dd53c | ||
|
|
680081b93b | ||
|
|
e66eeefb14 | ||
|
|
4453727754 | ||
|
|
5b7f1fe853 | ||
|
|
4c357d2d60 | ||
|
|
0eb5588454 | ||
|
|
5ba8b43fb8 | ||
|
|
0eb754d76e | ||
|
|
7c463849cc | ||
|
|
daed23422e | ||
|
|
43f26dcd76 | ||
|
|
82aaa89ab6 | ||
|
|
aac384f54f | ||
|
|
ffccaa8817 | ||
|
|
bd488a6182 | ||
|
|
41ec1b4cb2 | ||
|
|
18bf9d3d95 | ||
|
|
56e070b3d1 | ||
|
|
88a9f8d892 | ||
|
|
0f367ab117 | ||
|
|
838f078fa5 | ||
|
|
d6f0555771 | ||
|
|
3ee3d13f0f | ||
|
|
6267ecc3dc | ||
|
|
1487a037ed | ||
|
|
1bba25e080 | ||
|
|
c6096c3c34 | ||
|
|
2604705bab | ||
|
|
5f948d0d96 | ||
|
|
3e42fa28df | ||
|
|
d9dc6a396f | ||
|
|
bdb72684b0 | ||
|
|
0f05936e63 | ||
|
|
290493e485 | ||
|
|
637301d340 | ||
|
|
c7e4815d79 | ||
|
|
54d73b7ac5 | ||
|
|
cbdf1e6c09 | ||
|
|
2e49930b94 | ||
|
|
9da0cb2ad1 | ||
|
|
dc686bd1bf | ||
|
|
e002dbf57e | ||
|
|
38f4f4f695 | ||
|
|
a4bc548fe5 | ||
|
|
6e45ab599e | ||
|
|
e55fb68a29 | ||
|
|
7158514d48 | ||
|
|
3445f47482 | ||
|
|
5b33443607 | ||
|
|
e5c75fa2f7 | ||
|
|
40e8bfe443 | ||
|
|
ed11c0a6da | ||
|
|
365667ee0a | ||
|
|
1cfd5f0735 | ||
|
|
e8ee091e5a | ||
|
|
133cd30b2e | ||
|
|
e3fcb99d84 | ||
|
|
e8acb8a2a9 | ||
|
|
2a107cc463 | ||
|
|
d8b07570a3 | ||
|
|
95c960574a | ||
|
|
8266cd893b | ||
|
|
cb07469f4a | ||
|
|
e2fb6dd288 | ||
|
|
5b1613997a | ||
|
|
7bec469948 | ||
|
|
cc10a9cb4d | ||
|
|
8a69c23646 | ||
|
|
bee01544c5 | ||
|
|
9e22c2609c | ||
|
|
6eba700ecf | ||
|
|
6f5d175d12 | ||
|
|
66fd532ee6 | ||
|
|
29f605e8ae | ||
|
|
1013c23f46 | ||
|
|
8d61374311 | ||
|
|
9399491a64 | ||
|
|
5a91552060 | ||
|
|
bd1ffa56dc | ||
|
|
046eb4d9fd | ||
|
|
ad7141fe21 | ||
|
|
7f0891a0f0 | ||
|
|
04a4a6cadc | ||
|
|
db79911c4b | ||
|
|
82595ee256 | ||
|
|
95daab4bc0 | ||
|
|
4c90f9960e | ||
|
|
ff89ec660c | ||
|
|
29790da63d | ||
|
|
859626cbe3 | ||
|
|
3d3a32087f | ||
|
|
002fd008a6 | ||
|
|
d9adf14551 | ||
|
|
62f086f607 | ||
|
|
9dc2525ce1 | ||
|
|
0e362f38bc | ||
|
|
1ad30d50a6 | ||
|
|
e7b2b4fc3d | ||
|
|
13daf095d9 | ||
|
|
57f82f7504 | ||
|
|
b9e15389ca | ||
|
|
9b6ab55936 | ||
|
|
235cda1051 | ||
|
|
28d1eaf8da | ||
|
|
fc4f43ac7f | ||
|
|
eef5d91606 | ||
|
|
e2d2591281 | ||
|
|
138304ff51 | ||
|
|
fdaa0b7ba1 | ||
|
|
10d2c0285c | ||
|
|
b541960611 | ||
|
|
ce3e2401cb | ||
|
|
96f3df3929 | ||
|
|
71329718e4 | ||
|
|
b755218837 | ||
|
|
aa294ff066 | ||
|
|
fcfb738ded | ||
|
|
82696000e4 | ||
|
|
ec1839d580 | ||
|
|
47b8cb6044 | ||
|
|
27e862da62 | ||
|
|
2a5110aa04 | ||
|
|
4a5e185973 | ||
|
|
4f1d4695cd | ||
|
|
d27990b273 | ||
|
|
cf123b7d88 | ||
|
|
2a07bc4ef3 | ||
|
|
797d90c4dd | ||
|
|
55e12fb34b | ||
|
|
92bc46f232 | ||
|
|
ebdf650450 | ||
|
|
fac7f8d56e | ||
|
|
ed7216575c | ||
|
|
166a68244e | ||
|
|
476e5dcb18 | ||
|
|
d8d173db4d | ||
|
|
d89404ee6d | ||
|
|
fe9d2a0e1d | ||
|
|
bd07f1d455 | ||
|
|
1d4d62afb7 | ||
|
|
deec6cf51e | ||
|
|
5a738af607 | ||
|
|
d5f57c35e2 | ||
|
|
eda05edd6d | ||
|
|
f9f04e4b2e | ||
|
|
36da54b8ce | ||
|
|
a9103dd1ae | ||
|
|
d219840650 | ||
|
|
3d9cef24cd |
26
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
26
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Required data**
|
||||
- Miner log as text or screenshot
|
||||
- Config file or command line (without wallets)
|
||||
- OS: [e.g. Windows]
|
||||
- For GPU related issues: information about GPUs and driver version.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
/build
|
||||
/CMakeLists.txt.user
|
||||
/.idea
|
||||
/src/backend/opencl/cl/cn/cryptonight_gen.cl
|
||||
|
||||
192
CHANGELOG.md
192
CHANGELOG.md
@@ -1,54 +1,154 @@
|
||||
# v3.2.0
|
||||
- Added per pool option `coin` with single possible value `monero` for pools without algorithm negotiation, for upcoming Monero fork.
|
||||
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
|
||||
# v5.11.0
|
||||
- **[#1632](https://github.com/xmrig/xmrig/pull/1632) Added AstroBWT CUDA support ([CUDA plugin](https://github.com/xmrig/xmrig-cuda) v3.0.0 or newer required).**
|
||||
- [#1605](https://github.com/xmrig/xmrig/pull/1605) Fixed AstroBWT OpenCL for NVIDIA GPUs.
|
||||
- [#1635](https://github.com/xmrig/xmrig/pull/1635) Added pooled memory allocation of RandomX VMs (+0.5% speedup on Zen2).
|
||||
- [#1641](https://github.com/xmrig/xmrig/pull/1641) RandomX JIT refactoring, smaller memory footprint and a bit faster overall.
|
||||
- [#1643](https://github.com/xmrig/xmrig/issues/1643) Fixed build on CentOS 7.
|
||||
|
||||
# v3.1.3
|
||||
- [#1180](https://github.com/xmrig/xmrig/issues/1180) Fixed possible duplicated shares after algorithm switching.
|
||||
- Fixed wrong config file permissions after write (only gcc builds on recent Windows 10 affected).
|
||||
# v5.10.0
|
||||
- [#1602](https://github.com/xmrig/xmrig/pull/1602) Added AMD GPUs support for AstroBWT algorithm.
|
||||
- [#1590](https://github.com/xmrig/xmrig/pull/1590) MSR mod automatically deactivated after switching from RandomX algorithms.
|
||||
- [#1592](https://github.com/xmrig/xmrig/pull/1592) Added AVX2 optimized code for AstroBWT algorithm.
|
||||
- Added new config option `astrobwt-avx2` in `cpu` object and command line option `--astrobwt-avx2`.
|
||||
- [#1596](https://github.com/xmrig/xmrig/issues/1596) Major TLS (Transport Layer Security) subsystem update.
|
||||
- Added new TLS options, please check [xmrig-proxy documentation](https://xmrig.com/docs/proxy/tls) for details.
|
||||
- `cn/gpu` algorithm now disabled by default and will be removed in next major (v6.x.x) release, no ETA for it right now.
|
||||
- Added command line option `--data-dir`.
|
||||
|
||||
# v3.1.2
|
||||
- Many RandomX optimizations and fixes.
|
||||
- [#1132](https://github.com/xmrig/xmrig/issues/1132) Fixed build on CentOS 7.
|
||||
- [#1163](https://github.com/xmrig/xmrig/pull/1163) Optimized soft AES code, up to +30% hashrate on CPU without AES support and other optimizations.
|
||||
- [#1166](https://github.com/xmrig/xmrig/pull/1166) Fixed crash when initialize dataset with big threads count (eg 272).
|
||||
- [#1168](https://github.com/xmrig/xmrig/pull/1168) Optimized loading from scratchpad.
|
||||
- [#1128](https://github.com/xmrig/xmrig/issues/1128) Fixed CMake 2.8 compatibility.
|
||||
# v5.9.0
|
||||
- [#1578](https://github.com/xmrig/xmrig/pull/1578) Added new RandomKEVA algorithm for upcoming Kevacoin fork, as `"algo": "rx/keva"` or `"coin": "keva"`.
|
||||
- [#1584](https://github.com/xmrig/xmrig/pull/1584) Fixed invalid AstroBWT hashes after algorithm switching.
|
||||
- [#1585](https://github.com/xmrig/xmrig/issues/1585) Fixed build without HTTP support.
|
||||
- Added command line option `--astrobwt-max-size`.
|
||||
|
||||
# v3.1.1
|
||||
- [#1133](https://github.com/xmrig/xmrig/issues/1133) Fixed syslog regression.
|
||||
- [#1138](https://github.com/xmrig/xmrig/issues/1138) Fixed multiple network bugs.
|
||||
- [#1141](https://github.com/xmrig/xmrig/issues/1141) Fixed log in background mode.
|
||||
- [#1142](https://github.com/xmrig/xmrig/pull/1142) RandomX hashrate improved by 0.5-1.5% depending on variant and CPU.
|
||||
- [#1146](https://github.com/xmrig/xmrig/pull/1146) Fixed race condition in RandomX thread init.
|
||||
- [#1148](https://github.com/xmrig/xmrig/pull/1148) Fixed, on Linux linker marking entire executable as having an executable stack.
|
||||
- Fixed, for Argon2 algorithms command line options like `--threads` was ignored.
|
||||
- Fixed command line options for single pool, free order allowed again.
|
||||
# v5.8.2
|
||||
- [#1580](https://github.com/xmrig/xmrig/pull/1580) AstroBWT algorithm 20-50% speedup.
|
||||
- Added new option `astrobwt-max-size`.
|
||||
- [#1581](https://github.com/xmrig/xmrig/issues/1581) Fixed macOS build.
|
||||
|
||||
# v3.1.0
|
||||
- [#1107](https://github.com/xmrig/xmrig/issues/1107#issuecomment-522235892) Added Argon2 algorithm family: `argon2/chukwa` and `argon2/wrkz`.
|
||||
# v5.8.1
|
||||
- [#1575](https://github.com/xmrig/xmrig/pull/1575) Fixed new block detection for DERO solo mining.
|
||||
|
||||
# v3.0.0
|
||||
- **[#1111](https://github.com/xmrig/xmrig/pull/1111) Added RandomX (`rx/test`) algorithm for testing and benchmarking.**
|
||||
- **[#1036](https://github.com/xmrig/xmrig/pull/1036) Added RandomWOW (`rx/wow`) algorithm for [Wownero](http://wownero.org/).**
|
||||
- **[#1050](https://github.com/xmrig/xmrig/pull/1050) Added RandomXL (`rx/loki`) algorithm for [Loki](https://loki.network/).**
|
||||
- **[#1077](https://github.com/xmrig/xmrig/issues/1077) Added NUMA support via hwloc**.
|
||||
- **Added flexible [multi algorithm](doc/CPU.md) configuration.**
|
||||
- **Added unlimited switching between incompatible algorithms, all mining options can be changed in runtime.**
|
||||
- [#257](https://github.com/xmrig/xmrig-nvidia/pull/257) New logging subsystem, file and syslog now always without colors.
|
||||
- [#314](https://github.com/xmrig/xmrig-proxy/issues/314) Added donate over proxy feature.
|
||||
- [#1007](https://github.com/xmrig/xmrig/issues/1007) Old HTTP API backend based on libmicrohttpd, replaced to custom HTTP server (libuv + http_parser).
|
||||
- [#1010](https://github.com/xmrig/xmrig/pull/1010#issuecomment-482632107) Added daemon support (solo mining).
|
||||
- [#1066](https://github.com/xmrig/xmrig/issues/1066#issuecomment-518080529) Added error message if pool not ready for RandomX.
|
||||
- [#1105](https://github.com/xmrig/xmrig/issues/1105) Improved auto configuration for `cn-pico` algorithm.
|
||||
- Added commands `pause` and `resume` via JSON RPC 2.0 API (`POST /json_rpc`).
|
||||
- Added command line option `--export-topology` for export hwloc topology to a XML file.
|
||||
- Breaked backward compatibility with previous configs and command line, `variant` option replaced to `algo`, global option `algo` removed, all CPU related settings moved to `cpu` object.
|
||||
- Options `av`, `safe` and `max-cpu-usage` removed.
|
||||
- Algorithm `cn/msr` renamed to `cn/fast`.
|
||||
- Algorithm `cn/xtl` removed.
|
||||
- API endpoint `GET /1/threads` replaced to `GET /2/backends`.
|
||||
- Added global uptime and extended connection information in API.
|
||||
- API now return current algorithm.
|
||||
# v5.8.0
|
||||
- [#1573](https://github.com/xmrig/xmrig/pull/1573) Added new AstroBWT algorithm for upcoming DERO fork, as `"algo": "astrobwt"` or `"coin": "dero"`.
|
||||
|
||||
# v5.7.0
|
||||
- **Added SOCKS5 proxies support for Tor https://xmrig.com/docs/miner/tor.**
|
||||
- [#377](https://github.com/xmrig/xmrig-proxy/issues/377) Fixed duplicate jobs in daemon (solo) mining client.
|
||||
- [#1560](https://github.com/xmrig/xmrig/pull/1560) RandomX 0.3-0.4% speedup depending on CPU.
|
||||
- Fixed possible crashes in HTTP client.
|
||||
|
||||
# v5.6.0
|
||||
- [#1536](https://github.com/xmrig/xmrig/pull/1536) Added workaround for new AMD GPU drivers.
|
||||
- [#1546](https://github.com/xmrig/xmrig/pull/1546) Fixed generic OpenCL code for AMD Navi GPUs.
|
||||
- [#1551](https://github.com/xmrig/xmrig/pull/1551) Added RandomX JIT for AMD Navi GPUs.
|
||||
- Added health information for AMD GPUs (clocks/power/fan/temperature) via ADL (Windows) and sysfs (Linux).
|
||||
- Fixed possible nicehash nonce overflow in some conditions.
|
||||
- Fixed wrong OpenCL platform on macOS, option `platform` now ignored on this OS.
|
||||
|
||||
# v5.5.3
|
||||
- [#1529](https://github.com/xmrig/xmrig/pull/1529) Fixed crash on Bulldozer CPUs.
|
||||
|
||||
# v5.5.2
|
||||
- [#1500](https://github.com/xmrig/xmrig/pull/1500) Removed unnecessary code from RandomX JIT compiler.
|
||||
- [#1502](https://github.com/xmrig/xmrig/pull/1502) Optimizations for AMD Bulldozer.
|
||||
- [#1508](https://github.com/xmrig/xmrig/pull/1508) Added support for BMI2 instructions.
|
||||
- [#1510](https://github.com/xmrig/xmrig/pull/1510) Optimized `CFROUND` instruction for RandomX.
|
||||
- [#1520](https://github.com/xmrig/xmrig/pull/1520) Fixed thread affinity.
|
||||
|
||||
# v5.5.1
|
||||
- [#1469](https://github.com/xmrig/xmrig/issues/1469) Fixed build with gcc 4.8.
|
||||
- [#1473](https://github.com/xmrig/xmrig/pull/1473) Added RandomX auto-config for mobile Ryzen APUs.
|
||||
- [#1477](https://github.com/xmrig/xmrig/pull/1477) Fixed build with Clang.
|
||||
- [#1489](https://github.com/xmrig/xmrig/pull/1489) RandomX JIT compiler tweaks.
|
||||
- [#1493](https://github.com/xmrig/xmrig/pull/1493) Default value for Intel MSR preset changed to `15`.
|
||||
- Fixed unwanted resume after RandomX dataset change.
|
||||
|
||||
# v5.5.0
|
||||
- [#179](https://github.com/xmrig/xmrig/issues/179) Added support for [environment variables](https://xmrig.com/docs/miner/environment-variables) in config file.
|
||||
- [#1445](https://github.com/xmrig/xmrig/pull/1445) Removed `rx/v` algorithm.
|
||||
- [#1453](https://github.com/xmrig/xmrig/issues/1453) Fixed crash on 32bit systems.
|
||||
- [#1459](https://github.com/xmrig/xmrig/issues/1459) Fixed crash on very low memory systems.
|
||||
- [#1465](https://github.com/xmrig/xmrig/pull/1465) Added fix for 1st-gen Ryzen crashes.
|
||||
- [#1466](https://github.com/xmrig/xmrig/pull/1466) Added `cn-pico/tlo` algorithm.
|
||||
- Added `--randomx-no-rdmsr` command line option.
|
||||
- Added console title for Windows with miner name and version.
|
||||
- On Windows `priority` option now also change base priority.
|
||||
|
||||
# v5.4.0
|
||||
- [#1434](https://github.com/xmrig/xmrig/pull/1434) Added RandomSFX (`rx/sfx`) algorithm for Safex Cash.
|
||||
- [#1445](https://github.com/xmrig/xmrig/pull/1445) Added RandomV (`rx/v`) algorithm for *new* MoneroV.
|
||||
- [#1419](https://github.com/xmrig/xmrig/issues/1419) Added reverting MSR changes on miner exit, use `"rdmsr": false,` in `"randomx"` object to disable this feature.
|
||||
- [#1423](https://github.com/xmrig/xmrig/issues/1423) Fixed conflicts with exists WinRing0 driver service.
|
||||
- [#1425](https://github.com/xmrig/xmrig/issues/1425) Fixed crash on first generation Zen CPUs (MSR mod accidentally enable Opcache), additionally now you can disable Opcache and enable MSR mod via config `"wrmsr": ["0xc0011020:0x0", "0xc0011021:0x60", "0xc0011022:0x510000", "0xc001102b:0x1808cc16"],`.
|
||||
- Added advanced usage for `wrmsr` option, for example: `"wrmsr": ["0x1a4:0x6"],` (Intel) and `"wrmsr": ["0xc0011020:0x0", "0xc0011021:0x40:0xffffffffffffffdf", "0xc0011022:0x510000", "0xc001102b:0x1808cc16"],` (Ryzen).
|
||||
- Added new config option `"verbose"` and command line option `--verbose`.
|
||||
|
||||
# v5.3.0
|
||||
- [#1414](https://github.com/xmrig/xmrig/pull/1414) Added native MSR support for Windows, by using signed **WinRing0 driver** (© 2007-2009 OpenLibSys.org).
|
||||
- Added new [MSR documentation](https://xmrig.com/docs/miner/randomx-optimization-guide/msr).
|
||||
- [#1418](https://github.com/xmrig/xmrig/pull/1418) Increased stratum send buffer size.
|
||||
|
||||
# v5.2.1
|
||||
- [#1408](https://github.com/xmrig/xmrig/pull/1408) Added RandomX boost script for Linux (if you don't like run miner with root privileges).
|
||||
- Added support for [AMD Ryzen MSR registers](https://www.reddit.com/r/MoneroMining/comments/e962fu/9526_hs_on_ryzen_7_3700x_xmrig_520_1gb_pages_msr/) (Linux only).
|
||||
- Fixed command line option `--randomx-wrmsr` option without parameters.
|
||||
|
||||
# v5.2.0
|
||||
- **[#1388](https://github.com/xmrig/xmrig/pull/1388) Added [1GB huge pages support](https://xmrig.com/docs/miner/hugepages#onegb-huge-pages) for Linux.**
|
||||
- Added new option `1gb-pages` in `randomx` object with command line equivalent `--randomx-1gb-pages`.
|
||||
- Added automatic huge pages configuration on Linux if use the miner with root privileges.
|
||||
- **Added [automatic Intel prefetchers configuration](https://xmrig.com/docs/miner/randomx-optimization-guide#intel-specific-optimizations) on Linux.**
|
||||
- Added new option `wrmsr` in `randomx` object with command line equivalent `--randomx-wrmsr=6`.
|
||||
- [#1396](https://github.com/xmrig/xmrig/pull/1396) [#1401](https://github.com/xmrig/xmrig/pull/1401) New performance optimizations for Ryzen CPUs.
|
||||
- [#1385](https://github.com/xmrig/xmrig/issues/1385) Added `max-threads-hint` option support for RandomX dataset initialization threads.
|
||||
- [#1386](https://github.com/xmrig/xmrig/issues/1386) Added `priority` option support for RandomX dataset initialization threads.
|
||||
- For official builds all dependencies (libuv, hwloc, openssl) updated to recent versions.
|
||||
- Windows `msvc` builds now use Visual Studio 2019 instead of 2017.
|
||||
|
||||
# v5.1.1
|
||||
- [#1365](https://github.com/xmrig/xmrig/issues/1365) Fixed various system response/stability issues.
|
||||
- Added new CPU option `yield` and command line equivalent `--cpu-no-yield`.
|
||||
- [#1363](https://github.com/xmrig/xmrig/issues/1363) Fixed wrong priority of main miner thread.
|
||||
|
||||
# v5.1.0
|
||||
- [#1351](https://github.com/xmrig/xmrig/pull/1351) RandomX optimizations and fixes.
|
||||
- Improved RandomX performance (up to +6-7% on Intel CPUs, +2-3% on Ryzen CPUs)
|
||||
- Added workaround for Intel JCC erratum bug see https://www.phoronix.com/scan.php?page=article&item=intel-jcc-microcode&num=1 for details.
|
||||
- Note! Always disable "Hardware prefetcher" and "Adjacent cacheline prefetch" in BIOS for Intel CPUs to get the optimal RandomX performance.
|
||||
- [#1307](https://github.com/xmrig/xmrig/issues/1307) Fixed mining resume after donation round for pools with `self-select` feature.
|
||||
- [#1318](https://github.com/xmrig/xmrig/issues/1318#issuecomment-559676080) Added option `"mode"` (or `--randomx-mode`) for RandomX.
|
||||
- Added memory information on miner startup.
|
||||
- Added `resources` field to summary API with memory information and load average.
|
||||
|
||||
# v5.0.1
|
||||
- [#1234](https://github.com/xmrig/xmrig/issues/1234) Fixed compatibility with some AMD GPUs.
|
||||
- [#1284](https://github.com/xmrig/xmrig/issues/1284) Fixed build without RandomX.
|
||||
- [#1285](https://github.com/xmrig/xmrig/issues/1285) Added command line options `--cuda-bfactor-hint` and `--cuda-bsleep-hint`.
|
||||
- [#1290](https://github.com/xmrig/xmrig/pull/1290) Fixed 32-bit ARM compilation.
|
||||
|
||||
# v5.0.0
|
||||
This version is first stable unified 3 in 1 GPU+CPU release, OpenCL support built in in miner and not require additional external dependencies on compile time, NVIDIA CUDA available as external [CUDA plugin](https://github.com/xmrig/xmrig-cuda), for convenient, 3 in 1 downloads with recent CUDA version also provided.
|
||||
|
||||
This release based on 4.x.x series and include all features from v4.6.2-beta, changelog below include only the most important changes, [full changelog](doc/CHANGELOG_OLD.md) available separately.
|
||||
|
||||
- [#1272](https://github.com/xmrig/xmrig/pull/1272) Optimized hashrate calculation.
|
||||
- [#1263](https://github.com/xmrig/xmrig/pull/1263) Added new option `dataset_host` for NVIDIA GPUs with less than 4 GB memory (RandomX only).
|
||||
- [#1068](https://github.com/xmrig/xmrig/pull/1068) Added support for `self-select` stratum protocol extension.
|
||||
- [#1227](https://github.com/xmrig/xmrig/pull/1227) Added new algorithm `rx/arq`, RandomX variant for upcoming ArQmA fork.
|
||||
- [#808](https://github.com/xmrig/xmrig/issues/808#issuecomment-539297156) Added experimental support for persistent memory for CPU mining threads.
|
||||
- [#1221](https://github.com/xmrig/xmrig/issues/1221) Improved RandomX dataset memory usage and initialization speed for NUMA machines.
|
||||
- [#1175](https://github.com/xmrig/xmrig/issues/1175) Fixed support for systems where total count of NUMA nodes not equal usable nodes count.
|
||||
- Added config option `cpu/max-threads-hint` and command line option `--cpu-max-threads-hint`.
|
||||
- [#1185](https://github.com/xmrig/xmrig/pull/1185) Added JIT compiler for RandomX on ARMv8.
|
||||
- Improved API endpoint `GET /2/backends` and added support for this endpoint to [workers.xmrig.info](http://workers.xmrig.info).
|
||||
- Added command line option `--no-cpu` to disable CPU backend.
|
||||
- Added OpenCL specific command line options: `--opencl`, `--opencl-devices`, `--opencl-platform`, `--opencl-loader` and `--opencl-no-cache`.
|
||||
- Added CUDA specific command line options: `--cuda`, `--cuda-loader` and `--no-nvml`.
|
||||
- Removed command line option `--http-enabled`, HTTP API enabled automatically if any other `--http-*` option provided.
|
||||
- [#1172](https://github.com/xmrig/xmrig/issues/1172) **Added OpenCL mining backend.**
|
||||
- [#268](https://github.com/xmrig/xmrig-amd/pull/268) [#270](https://github.com/xmrig/xmrig-amd/pull/270) [#271](https://github.com/xmrig/xmrig-amd/pull/271) [#273](https://github.com/xmrig/xmrig-amd/pull/273) [#274](https://github.com/xmrig/xmrig-amd/pull/274) [#1171](https://github.com/xmrig/xmrig/pull/1171) Added RandomX support for OpenCL, thanks [@SChernykh](https://github.com/SChernykh).
|
||||
- Algorithm `cn/wow` removed, as no longer alive.
|
||||
|
||||
# Previous versions
|
||||
[doc/CHANGELOG_OLD.md](doc/CHANGELOG_OLD.md)
|
||||
|
||||
@@ -6,14 +6,23 @@ option(WITH_HWLOC "Enable hwloc support" ON)
|
||||
option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON)
|
||||
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON)
|
||||
option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
|
||||
option(WITH_CN_GPU "Enable CryptoNight-GPU algorithm" ON)
|
||||
option(WITH_CN_GPU "Enable CryptoNight-GPU algorithm" OFF)
|
||||
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
|
||||
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
|
||||
option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON)
|
||||
option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
|
||||
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
|
||||
option(WITH_TLS "Enable OpenSSL support" ON)
|
||||
option(WITH_ASM "Enable ASM PoW implementations" ON)
|
||||
option(WITH_MSR "Enable MSR mod & 1st-gen Ryzen fix" ON)
|
||||
option(WITH_ENV_VARS "Enable environment variables support in config file" ON)
|
||||
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
||||
option(WITH_OPENCL "Enable OpenCL backend" ON)
|
||||
option(WITH_CUDA "Enable CUDA backend" ON)
|
||||
option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (only if CUDA backend enabled)" ON)
|
||||
option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON)
|
||||
option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON)
|
||||
option(WITH_INTERLEAVE_DEBUG_LOG "Enable debug log for threads interleave" OFF)
|
||||
|
||||
option(BUILD_STATIC "Build static binary" OFF)
|
||||
option(ARM_TARGET "Force use specific ARM target 8 or 7" 0)
|
||||
@@ -25,6 +34,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include (CheckIncludeFile)
|
||||
include (cmake/cpu.cmake)
|
||||
include (cmake/os.cmake)
|
||||
include (src/base/base.cmake)
|
||||
include (src/backend/backend.cmake)
|
||||
|
||||
@@ -45,19 +55,18 @@ set(HEADERS
|
||||
src/net/JobResult.h
|
||||
src/net/JobResults.h
|
||||
src/net/Network.h
|
||||
src/net/NetworkState.h
|
||||
src/net/strategies/DonateStrategy.h
|
||||
src/Summary.h
|
||||
src/version.h
|
||||
)
|
||||
|
||||
set(HEADERS_CRYPTO
|
||||
src/backend/common/interfaces/IMemoryPool.h
|
||||
src/crypto/cn/asm/CryptonightR_template.h
|
||||
src/crypto/cn/c_blake256.h
|
||||
src/crypto/cn/c_groestl.h
|
||||
src/crypto/cn/c_jh.h
|
||||
src/crypto/cn/c_skein.h
|
||||
src/crypto/cn/CnAlgo.h
|
||||
src/crypto/cn/CnCtx.h
|
||||
src/crypto/cn/CnHash.h
|
||||
src/crypto/cn/CryptoNight_monero.h
|
||||
@@ -67,9 +76,8 @@ set(HEADERS_CRYPTO
|
||||
src/crypto/cn/hash.h
|
||||
src/crypto/cn/skein_port.h
|
||||
src/crypto/cn/soft_aes.h
|
||||
src/crypto/common/Algorithm.h
|
||||
src/crypto/common/Coin.h
|
||||
src/crypto/common/keccak.h
|
||||
src/crypto/common/HugePagesInfo.h
|
||||
src/crypto/common/MemoryPool.h
|
||||
src/crypto/common/Nonce.h
|
||||
src/crypto/common/portable/mm_malloc.h
|
||||
src/crypto/common/VirtualMemory.h
|
||||
@@ -92,7 +100,6 @@ set(SOURCES
|
||||
src/core/Miner.cpp
|
||||
src/net/JobResults.cpp
|
||||
src/net/Network.cpp
|
||||
src/net/NetworkState.cpp
|
||||
src/net/strategies/DonateStrategy.cpp
|
||||
src/Summary.cpp
|
||||
src/xmrig.cpp
|
||||
@@ -105,47 +112,53 @@ set(SOURCES_CRYPTO
|
||||
src/crypto/cn/c_skein.c
|
||||
src/crypto/cn/CnCtx.cpp
|
||||
src/crypto/cn/CnHash.cpp
|
||||
src/crypto/common/Algorithm.cpp
|
||||
src/crypto/common/Coin.cpp
|
||||
src/crypto/common/keccak.cpp
|
||||
src/crypto/common/HugePagesInfo.cpp
|
||||
src/crypto/common/MemoryPool.cpp
|
||||
src/crypto/common/Nonce.cpp
|
||||
src/crypto/common/VirtualMemory.cpp
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
set(SOURCES_OS
|
||||
"${SOURCES_OS}"
|
||||
if (WITH_HWLOC)
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/common/NUMAMemoryPool.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/common/NUMAMemoryPool.cpp
|
||||
src/crypto/common/VirtualMemory_hwloc.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if (XMRIG_OS_WIN)
|
||||
list(APPEND SOURCES_OS
|
||||
res/app.rc
|
||||
src/App_win.cpp
|
||||
src/crypto/common/VirtualMemory_win.cpp
|
||||
)
|
||||
|
||||
add_definitions(/DWIN32)
|
||||
set(EXTRA_LIBS ws2_32 psapi iphlpapi userenv)
|
||||
elseif (APPLE)
|
||||
set(SOURCES_OS
|
||||
"${SOURCES_OS}"
|
||||
elseif (XMRIG_OS_APPLE)
|
||||
list(APPEND SOURCES_OS
|
||||
src/App_unix.cpp
|
||||
src/crypto/common/VirtualMemory_unix.cpp
|
||||
)
|
||||
else()
|
||||
set(SOURCES_OS
|
||||
"${SOURCES_OS}"
|
||||
list(APPEND SOURCES_OS
|
||||
src/App_unix.cpp
|
||||
src/crypto/common/VirtualMemory_unix.cpp
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||
set(EXTRA_LIBS kvm pthread)
|
||||
else()
|
||||
set(EXTRA_LIBS pthread rt dl)
|
||||
endif()
|
||||
endif()
|
||||
if (XMRIG_OS_ANDROID)
|
||||
set(EXTRA_LIBS pthread rt dl log)
|
||||
elseif (XMRIG_OS_LINUX)
|
||||
list(APPEND SOURCES_OS
|
||||
src/crypto/common/LinuxMemory.h
|
||||
src/crypto/common/LinuxMemory.cpp
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
EXECUTE_PROCESS(COMMAND uname -o COMMAND tr -d '\n' OUTPUT_VARIABLE OPERATING_SYSTEM)
|
||||
if (OPERATING_SYSTEM MATCHES "Android")
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} log)
|
||||
set(EXTRA_LIBS pthread rt dl)
|
||||
elseif (XMRIG_OS_FREEBSD)
|
||||
set(EXTRA_LIBS kvm pthread)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -157,6 +170,7 @@ find_package(UV REQUIRED)
|
||||
include(cmake/flags.cmake)
|
||||
include(cmake/randomx.cmake)
|
||||
include(cmake/argon2.cmake)
|
||||
include(cmake/astrobwt.cmake)
|
||||
include(cmake/OpenSSL.cmake)
|
||||
include(cmake/asm.cmake)
|
||||
include(cmake/cn-gpu.cmake)
|
||||
@@ -191,3 +205,8 @@ endif()
|
||||
|
||||
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_CPUID} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${TLS_SOURCES} ${XMRIG_ASM_SOURCES} ${CN_GPU_SOURCES})
|
||||
target_link_libraries(${CMAKE_PROJECT_NAME} ${XMRIG_ASM_LIBRARY} ${OPENSSL_LIBRARIES} ${UV_LIBRARIES} ${EXTRA_LIBS} ${CPUID_LIB} ${ARGON2_LIBRARY})
|
||||
|
||||
if (WIN32)
|
||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/bin/WinRing0/WinRing0x64.sys" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||
endif()
|
||||
|
||||
118
README.md
118
README.md
@@ -7,18 +7,14 @@
|
||||
[](https://github.com/xmrig/xmrig/stargazers)
|
||||
[](https://github.com/xmrig/xmrig/network)
|
||||
|
||||
XMRig is a high performance RandomX and CryptoNight CPU miner, with official support for Windows.
|
||||
XMRig High performance, open source, cross platform RandomX, CryptoNight, AstroBWT and Argon2 CPU/GPU miner, with official support for Windows.
|
||||
|
||||
* This is the **CPU-mining** version, there is also a [NVIDIA GPU version](https://github.com/xmrig/xmrig-nvidia) and [AMD GPU version]( https://github.com/xmrig/xmrig-amd).
|
||||
## Mining backends
|
||||
- **CPU** (x64/x86/ARM)
|
||||
- **OpenCL** for AMD GPUs.
|
||||
- **CUDA** for NVIDIA GPUs via external [CUDA plugin](https://github.com/xmrig/xmrig-cuda).
|
||||
|
||||
<img src="doc/screenshot.png" width="808" >
|
||||
|
||||
#### Table of contents
|
||||
* [Download](#download)
|
||||
* [Usage](#usage)
|
||||
* [Build](https://github.com/xmrig/xmrig/wiki/Build)
|
||||
* [Donations](#donations)
|
||||
* [Contacts](#contacts)
|
||||
<img src="doc/screenshot_v5_2_0.png" width="833" >
|
||||
|
||||
## Download
|
||||
* Binary releases: https://github.com/xmrig/xmrig/releases
|
||||
@@ -28,54 +24,100 @@ XMRig is a high performance RandomX and CryptoNight CPU miner, with official sup
|
||||
## Usage
|
||||
The preferred way to configure the miner is the [JSON config file](src/config.json) as it is more flexible and human friendly. The command line interface does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing API calls.
|
||||
|
||||
### Options
|
||||
* **[xmrig.com/wizard](https://xmrig.com/wizard)** helps you create initial configuration for the miner.
|
||||
* **[workers.xmrig.info](http://workers.xmrig.info)** helps manage your miners via HTTP API.
|
||||
|
||||
### Command line options
|
||||
```
|
||||
-a, --algo=ALGO specify the algorithm to use
|
||||
cn/r, cn/2, cn/1, cn/0, cn/double, cn/half, cn/fast,
|
||||
cn/rwz, cn/zls, cn/xao, cn/rto, cn/gpu,
|
||||
cn-lite/1,
|
||||
cn-heavy/xhv, cn-heavy/tube, cn-heavy/0,
|
||||
cn-pico,
|
||||
rx/wow, rx/loki
|
||||
Network:
|
||||
-o, --url=URL URL of mining server
|
||||
-O, --userpass=U:P username:password pair for mining server
|
||||
-a, --algo=ALGO mining algorithm https://xmrig.com/docs/algorithms
|
||||
--coin=COIN specify coin instead of algorithm
|
||||
-u, --user=USERNAME username for mining server
|
||||
-p, --pass=PASSWORD password for mining server
|
||||
--rig-id=ID rig identifier for pool-side statistics (needs pool support)
|
||||
-t, --threads=N number of miner threads
|
||||
-v, --av=N algorithm variation, 0 auto select
|
||||
-k, --keepalive send keepalived packet for prevent timeout (needs pool support)
|
||||
-O, --userpass=U:P username:password pair for mining server
|
||||
-x, --proxy=HOST:PORT connect through a SOCKS5 proxy
|
||||
-k, --keepalive send keepalive packet for prevent timeout (needs pool support)
|
||||
--nicehash enable nicehash.com support
|
||||
--rig-id=ID rig identifier for pool-side statistics (needs pool support)
|
||||
--tls enable SSL/TLS support (needs pool support)
|
||||
--tls-fingerprint=F pool TLS certificate fingerprint, if set enable strict certificate pinning
|
||||
--tls-fingerprint=HEX pool TLS certificate fingerprint for strict certificate pinning
|
||||
--daemon use daemon RPC instead of pool for solo mining
|
||||
--daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)
|
||||
-r, --retries=N number of times to retry before switch to backup server (default: 5)
|
||||
-R, --retry-pause=N time to pause between retries (default: 5)
|
||||
--user-agent set custom user-agent string for pool
|
||||
--donate-level=N donate level, default 5%% (5 minutes in 100 minutes)
|
||||
--donate-over-proxy=N control donate over xmrig-proxy feature
|
||||
|
||||
CPU backend:
|
||||
--no-cpu disable CPU mining backend
|
||||
-t, --threads=N number of CPU threads
|
||||
-v, --av=N algorithm variation, 0 auto select
|
||||
--cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1
|
||||
--cpu-priority set process priority (0 idle, 2 normal to 5 highest)
|
||||
--cpu-max-threads-hint=N maximum CPU threads count (in percentage) hint for autoconfig
|
||||
--cpu-memory-pool=N number of 2 MB pages for persistent memory pool, -1 (auto), 0 (disable)
|
||||
--cpu-no-yield prefer maximum hashrate rather than system response/stability
|
||||
--no-huge-pages disable huge pages support
|
||||
--no-color disable colored output
|
||||
--donate-level=N donate level, default 5% (5 minutes in 100 minutes)
|
||||
--user-agent set custom user-agent string for pool
|
||||
-B, --background run the miner in the background
|
||||
-c, --config=FILE load a JSON-format configuration file
|
||||
-l, --log-file=FILE log all output to a file
|
||||
--asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer.
|
||||
--print-time=N print hashrate report every N seconds
|
||||
--asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer
|
||||
--randomx-init=N thread count to initialize RandomX dataset
|
||||
--randomx-no-numa disable NUMA support for RandomX
|
||||
--randomx-mode=MODE RandomX mode: auto, fast, light
|
||||
--randomx-1gb-pages use 1GB hugepages for dataset (Linux only)
|
||||
--randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1)
|
||||
--randomx-no-rdmsr disable reverting initial MSR values on exit
|
||||
--astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200
|
||||
--astrobwt-avx2 enable AVX2 optimizations for AstroBWT algorithm
|
||||
|
||||
API:
|
||||
--api-worker-id=ID custom worker-id for API
|
||||
--api-id=ID custom instance ID for API
|
||||
--http-enabled enable HTTP API
|
||||
--http-host=HOST bind host for HTTP API (default: 127.0.0.1)
|
||||
--http-port=N bind port for HTTP API
|
||||
--http-access-token=T access token for HTTP API
|
||||
--http-no-restricted enable full remote access to HTTP API (only if access token set)
|
||||
--randomx-init=N threads count to initialize RandomX dataset
|
||||
--randomx-no-numa disable NUMA support for RandomX
|
||||
--export-topology export hwloc topology to a XML file and exit
|
||||
--dry-run test configuration and exit
|
||||
-h, --help display this help and exit
|
||||
|
||||
OpenCL backend:
|
||||
--opencl enable OpenCL mining backend
|
||||
--opencl-devices=N comma separated list of OpenCL devices to use
|
||||
--opencl-platform=N OpenCL platform index or name
|
||||
--opencl-loader=PATH path to OpenCL-ICD-Loader (OpenCL.dll or libOpenCL.so)
|
||||
--opencl-no-cache disable OpenCL cache
|
||||
--print-platforms print available OpenCL platforms and exit
|
||||
|
||||
CUDA backend:
|
||||
--cuda enable CUDA mining backend
|
||||
--cuda-loader=PATH path to CUDA plugin (xmrig-cuda.dll or libxmrig-cuda.so)
|
||||
--cuda-devices=N comma separated list of CUDA devices to use
|
||||
--cuda-bfactor-hint=N bfactor hint for autoconfig (0-12)
|
||||
--cuda-bsleep-hint=N bsleep hint for autoconfig
|
||||
--no-nvml disable NVML (NVIDIA Management Library) support
|
||||
|
||||
TLS:
|
||||
--tls-gen=HOSTNAME generate TLS certificate for specific hostname
|
||||
--tls-cert=FILE load TLS certificate chain from a file in the PEM format
|
||||
--tls-cert-key=FILE load TLS certificate private key from a file in the PEM format
|
||||
--tls-dhparam=FILE load DH parameters for DHE ciphers from a file in the PEM format
|
||||
--tls-protocols=N enable specified TLS protocols, example: "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3"
|
||||
--tls-ciphers=S set list of available ciphers (TLSv1.2 and below)
|
||||
--tls-ciphersuites=S set list of available TLSv1.3 ciphersuites
|
||||
|
||||
Logging:
|
||||
-S, --syslog use system log for output messages
|
||||
-l, --log-file=FILE log all output to a file
|
||||
--print-time=N print hashrate report every N seconds
|
||||
--health-print-time=N print health report every N seconds
|
||||
--no-color disable colored output
|
||||
--verbose verbose output
|
||||
|
||||
Misc:
|
||||
-c, --config=FILE load a JSON-format configuration file
|
||||
-B, --background run the miner in the background
|
||||
-V, --version output version information and exit
|
||||
-h, --help display this help and exit
|
||||
--dry-run test configuration and exit
|
||||
--export-topology export hwloc topology to a XML file and exit
|
||||
```
|
||||
|
||||
## Donations
|
||||
|
||||
21
bin/WinRing0/LICENSE
Normal file
21
bin/WinRing0/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2007-2009 OpenLibSys.org. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
BIN
bin/WinRing0/WinRing0x64.sys
Normal file
BIN
bin/WinRing0/WinRing0x64.sys
Normal file
Binary file not shown.
@@ -6,16 +6,37 @@ if (WITH_TLS)
|
||||
set(OPENSSL_MSVC_STATIC_RT TRUE)
|
||||
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} Crypt32)
|
||||
elseif (APPLE)
|
||||
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
||||
endif()
|
||||
|
||||
find_package(OpenSSL)
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
set(TLS_SOURCES src/base/net/stratum/Tls.h src/base/net/stratum/Tls.cpp)
|
||||
set(TLS_SOURCES
|
||||
src/base/net/stratum/Tls.cpp
|
||||
src/base/net/stratum/Tls.h
|
||||
src/base/net/tls/ServerTls.cpp
|
||||
src/base/net/tls/ServerTls.h
|
||||
src/base/net/tls/TlsConfig.cpp
|
||||
src/base/net/tls/TlsConfig.h
|
||||
src/base/net/tls/TlsContext.cpp
|
||||
src/base/net/tls/TlsContext.h
|
||||
src/base/net/tls/TlsGen.cpp
|
||||
src/base/net/tls/TlsGen.h
|
||||
)
|
||||
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
if (WITH_HTTP)
|
||||
set(TLS_SOURCES ${TLS_SOURCES} src/base/net/http/HttpsClient.h src/base/net/http/HttpsClient.cpp)
|
||||
set(TLS_SOURCES ${TLS_SOURCES}
|
||||
src/base/net/https/HttpsClient.cpp
|
||||
src/base/net/https/HttpsClient.h
|
||||
src/base/net/https/HttpsContext.cpp
|
||||
src/base/net/https/HttpsContext.h
|
||||
src/base/net/https/HttpsServer.cpp
|
||||
src/base/net/https/HttpsServer.h
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "OpenSSL NOT found: use `-DWITH_TLS=OFF` to build without TLS support")
|
||||
@@ -27,5 +48,12 @@ else()
|
||||
set(OPENSSL_LIBRARIES "")
|
||||
remove_definitions(/DXMRIG_FEATURE_TLS)
|
||||
|
||||
if (WITH_HTTP)
|
||||
set(TLS_SOURCES ${TLS_SOURCES}
|
||||
src/base/net/http/HttpServer.cpp
|
||||
src/base/net/http/HttpServer.h
|
||||
)
|
||||
endif()
|
||||
|
||||
set(CMAKE_PROJECT_NAME "${CMAKE_PROJECT_NAME}-notls")
|
||||
endif()
|
||||
|
||||
47
cmake/astrobwt.cmake
Normal file
47
cmake/astrobwt.cmake
Normal file
@@ -0,0 +1,47 @@
|
||||
if (WITH_ASTROBWT)
|
||||
add_definitions(/DXMRIG_ALGO_ASTROBWT)
|
||||
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/astrobwt/AstroBWT.h
|
||||
src/crypto/astrobwt/sha3.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/astrobwt/AstroBWT.cpp
|
||||
src/crypto/astrobwt/sha3.cpp
|
||||
)
|
||||
|
||||
if (XMRIG_ARM)
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/astrobwt/salsa20_ref/ecrypt-config.h
|
||||
src/crypto/astrobwt/salsa20_ref/ecrypt-machine.h
|
||||
src/crypto/astrobwt/salsa20_ref/ecrypt-portable.h
|
||||
src/crypto/astrobwt/salsa20_ref/ecrypt-sync.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/astrobwt/salsa20_ref/salsa20.c
|
||||
)
|
||||
else()
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
add_definitions(/DASTROBWT_AVX2)
|
||||
if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
||||
enable_language(ASM_MASM)
|
||||
list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/sha3_256_avx2.asm)
|
||||
else()
|
||||
enable_language(ASM)
|
||||
list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/sha3_256_avx2.S)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/astrobwt/Salsa20.hpp
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/astrobwt/Salsa20.cpp
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
remove_definitions(/DXMRIG_ALGO_ASTROBWT)
|
||||
endif()
|
||||
@@ -54,10 +54,12 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
|
||||
#set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -gdwarf-2")
|
||||
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
add_definitions(/DHAVE_BUILTIN_CLEAR_CACHE)
|
||||
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Oi /DNDEBUG /GL")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Oi /DNDEBUG /GL")
|
||||
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Ox /Ot /Oi /MT /GL")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox /Ot /Oi /MT /GL")
|
||||
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(/D_CRT_NONSTDC_NO_WARNINGS)
|
||||
add_definitions(/DNOMINMAX)
|
||||
|
||||
45
cmake/os.cmake
Normal file
45
cmake/os.cmake
Normal file
@@ -0,0 +1,45 @@
|
||||
if (WIN32)
|
||||
set(XMRIG_OS_WIN ON)
|
||||
elseif (APPLE)
|
||||
set(XMRIG_OS_APPLE ON)
|
||||
|
||||
if (IOS OR CMAKE_SYSTEM_NAME STREQUAL iOS)
|
||||
set(XMRIG_OS_IOS ON)
|
||||
else()
|
||||
set(XMRIG_OS_MACOS ON)
|
||||
endif()
|
||||
else()
|
||||
set(XMRIG_OS_UNIX ON)
|
||||
|
||||
if (ANDROID OR CMAKE_SYSTEM_NAME MATCHES "Android")
|
||||
set(XMRIG_OS_ANDROID ON)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(XMRIG_OS_LINUX ON)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||
set(XMRIG_OS_FREEBSD ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (XMRIG_OS_WIN)
|
||||
add_definitions(/DWIN32)
|
||||
add_definitions(/DXMRIG_OS_WIN)
|
||||
elseif(XMRIG_OS_APPLE)
|
||||
add_definitions(/DXMRIG_OS_APPLE)
|
||||
|
||||
if (XMRIG_OS_IOS)
|
||||
add_definitions(/DXMRIG_OS_IOS)
|
||||
else()
|
||||
add_definitions(/DXMRIG_OS_MACOS)
|
||||
endif()
|
||||
elseif(XMRIG_OS_UNIX)
|
||||
add_definitions(/DXMRIG_OS_UNIX)
|
||||
|
||||
if (XMRIG_OS_ANDROID)
|
||||
add_definitions(/DXMRIG_OS_ANDROID)
|
||||
elseif (XMRIG_OS_LINUX)
|
||||
add_definitions(/DXMRIG_OS_LINUX)
|
||||
elseif (XMRIG_OS_FREEBSD)
|
||||
add_definitions(/DXMRIG_OS_FREEBSD)
|
||||
endif()
|
||||
endif()
|
||||
@@ -4,9 +4,12 @@ if (WITH_RANDOMX)
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/rx/Rx.h
|
||||
src/crypto/rx/RxAlgo.h
|
||||
src/crypto/rx/RxBasicStorage.h
|
||||
src/crypto/rx/RxCache.h
|
||||
src/crypto/rx/RxConfig.h
|
||||
src/crypto/rx/RxDataset.h
|
||||
src/crypto/rx/RxQueue.h
|
||||
src/crypto/rx/RxSeed.h
|
||||
src/crypto/rx/RxVm.h
|
||||
)
|
||||
|
||||
@@ -32,9 +35,11 @@ if (WITH_RANDOMX)
|
||||
src/crypto/randomx/vm_interpreted.cpp
|
||||
src/crypto/rx/Rx.cpp
|
||||
src/crypto/rx/RxAlgo.cpp
|
||||
src/crypto/rx/RxBasicStorage.cpp
|
||||
src/crypto/rx/RxCache.cpp
|
||||
src/crypto/rx/RxConfig.cpp
|
||||
src/crypto/rx/RxDataset.cpp
|
||||
src/crypto/rx/RxQueue.cpp
|
||||
src/crypto/rx/RxVm.cpp
|
||||
)
|
||||
|
||||
@@ -51,6 +56,46 @@ if (WITH_RANDOMX)
|
||||
)
|
||||
# cheat because cmake and ccache hate each other
|
||||
set_property(SOURCE src/crypto/randomx/jit_compiler_x86_static.S PROPERTY LANGUAGE C)
|
||||
elseif (XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/randomx/jit_compiler_a64_static.S
|
||||
src/crypto/randomx/jit_compiler_a64.cpp
|
||||
)
|
||||
# cheat because cmake and ccache hate each other
|
||||
set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE C)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
set_source_files_properties(src/crypto/randomx/jit_compiler_x86.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-const-variable)
|
||||
endif()
|
||||
|
||||
if (WITH_HWLOC)
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/rx/RxNUMAStorage.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/rx/RxNUMAStorage.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WITH_MSR AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (XMRIG_OS_WIN OR XMRIG_OS_LINUX))
|
||||
add_definitions(/DXMRIG_FEATURE_MSR)
|
||||
add_definitions(/DXMRIG_FIX_RYZEN)
|
||||
message("-- WITH_MSR=ON")
|
||||
|
||||
if (XMRIG_OS_WIN)
|
||||
list(APPEND SOURCES_CRYPTO src/crypto/rx/Rx_win.cpp)
|
||||
elseif (XMRIG_OS_LINUX)
|
||||
list(APPEND SOURCES_CRYPTO src/crypto/rx/Rx_linux.cpp)
|
||||
endif()
|
||||
|
||||
list(APPEND HEADERS_CRYPTO src/crypto/rx/msr/MsrItem.h)
|
||||
list(APPEND SOURCES_CRYPTO src/crypto/rx/msr/MsrItem.cpp)
|
||||
else()
|
||||
remove_definitions(/DXMRIG_FEATURE_MSR)
|
||||
remove_definitions(/DXMRIG_FIX_RYZEN)
|
||||
message("-- WITH_MSR=OFF")
|
||||
endif()
|
||||
else()
|
||||
remove_definitions(/DXMRIG_ALGO_RANDOMX)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Algorithm can be defined in 3 ways:
|
||||
|
||||
1. By pool, using algorithm negotiation, in this case no need specify algorithm on miner side.
|
||||
2. Per pool `coin` option, currently only usable value for this option is `monero`.
|
||||
2. Per pool `coin` option, currently only usable values for this option is `monero` and `arqma`.
|
||||
3. Per pool `algo` option.
|
||||
|
||||
Option `coin` useful for pools without algorithm negotiation support or daemon to allow automatically switch algorithm in next hard fork.
|
||||
@@ -12,17 +12,19 @@ Option `coin` useful for pools without algorithm negotiation support or daemon t
|
||||
|
||||
| Name | Memory | Version | Notes |
|
||||
|------|--------|---------|-------|
|
||||
| `rx/sfx` | 2 MB | 5.4.0+ | RandomSFX (RandomX variant for Safex). |
|
||||
| `rx/v` | 2 MB | 5.4.0+ | RandomV (RandomX variant for new MoneroV). |
|
||||
| `rx/arq` | 256 KB | 4.3.0+ | RandomARQ (RandomX variant for ArQmA). |
|
||||
| `rx/0` | 2 MB | 3.2.0+ | RandomX (Monero). |
|
||||
| `argon2/chukwa` | 512 KB | 3.1.0+ | Argon2id (Chukwa). |
|
||||
| `argon2/wrkz` | 256 KB | 3.1.0+ | Argon2id (WRKZ) |
|
||||
| `rx/wow` | 1 MB | 3.0.0+ | RandomWOW. |
|
||||
| `rx/loki` | 2 MB | 3.0.0+ | RandomXL. |
|
||||
| `rx/wow` | 1 MB | 3.0.0+ | RandomWOW (RandomX variant for Wownero). |
|
||||
| `rx/loki` | 2 MB | 3.0.0+ | RandomXL (RandomX variant for Loki). |
|
||||
| `cn/fast` | 2 MB | 3.0.0+ | CryptoNight variant 1 with half iterations. |
|
||||
| `cn/rwz` | 2 MB | 2.14.0+ | CryptoNight variant 2 with 3/4 iterations and reversed shuffle operation. |
|
||||
| `cn/zls` | 2 MB | 2.14.0+ | CryptoNight variant 2 with 3/4 iterations. |
|
||||
| `cn/double` | 2 MB | 2.14.0+ | CryptoNight variant 2 with double iterations. |
|
||||
| `cn/r` | 2 MB | 2.13.0+ | CryptoNightR (Monero's variant 4). |
|
||||
| `cn/wow` | 2 MB | 2.12.0+ | CryptoNightR (Wownero). |
|
||||
| `cn/gpu` | 2 MB | 2.11.0+ | CryptoNight-GPU. |
|
||||
| `cn-pico` | 256 KB | 2.10.0+ | CryptoNight-Pico. |
|
||||
| `cn/half` | 2 MB | 2.9.0+ | CryptoNight variant 2 with half iterations. |
|
||||
|
||||
@@ -1,3 +1,116 @@
|
||||
# v4.6.2-beta
|
||||
- [#1274](https://github.com/xmrig/xmrig/issues/1274) Added `--cuda-devices` command line option.
|
||||
- [#1277](https://github.com/xmrig/xmrig/pull/1277) Fixed function names for clang on Apple.
|
||||
|
||||
# v4.6.1-beta
|
||||
- [#1272](https://github.com/xmrig/xmrig/pull/1272) Optimized hashrate calculation.
|
||||
- [#1273](https://github.com/xmrig/xmrig/issues/1273) Fixed crash when use `GET /2/backends` API endpoint with disabled CUDA.
|
||||
|
||||
# v4.6.0-beta
|
||||
- [#1263](https://github.com/xmrig/xmrig/pull/1263) Added new option `dataset_host` for NVIDIA GPUs with less than 4 GB memory (RandomX only).
|
||||
|
||||
# v4.5.0-beta
|
||||
- Added NVIDIA CUDA support via external [CUDA plugun](https://github.com/xmrig/xmrig-cuda). XMRig now is unified 3 in 1 miner.
|
||||
|
||||
# v4.4.0-beta
|
||||
- [#1068](https://github.com/xmrig/xmrig/pull/1068) Added support for `self-select` stratum protocol extension.
|
||||
- [#1240](https://github.com/xmrig/xmrig/pull/1240) Sync with the latest RandomX code.
|
||||
- [#1241](https://github.com/xmrig/xmrig/issues/1241) Fixed regression with colors on old Windows systems.
|
||||
- [#1243](https://github.com/xmrig/xmrig/pull/1243) Fixed incorrect OpenCL memory size detection in some cases.
|
||||
- [#1247](https://github.com/xmrig/xmrig/pull/1247) Fixed ARM64 RandomX code alignment.
|
||||
- [#1248](https://github.com/xmrig/xmrig/pull/1248) Fixed RandomX code cache cleanup on iOS/Darwin.
|
||||
|
||||
# v4.3.1-beta
|
||||
- Fixed regression in v4.3.0, miner didn't create `cn` mining profile with default config example.
|
||||
|
||||
# v4.3.0-beta
|
||||
- [#1227](https://github.com/xmrig/xmrig/pull/1227) Added new algorithm `rx/arq`, RandomX variant for upcoming ArQmA fork.
|
||||
- [#808](https://github.com/xmrig/xmrig/issues/808#issuecomment-539297156) Added experimental support for persistent memory for CPU mining threads.
|
||||
- [#1221](https://github.com/xmrig/xmrig/issues/1221) Improved RandomX dataset memory usage and initialization speed for NUMA machines.
|
||||
|
||||
# v4.2.1-beta
|
||||
- [#1150](https://github.com/xmrig/xmrig/issues/1150) Fixed build on FreeBSD.
|
||||
- [#1175](https://github.com/xmrig/xmrig/issues/1175) Fixed support for systems where total count of NUMA nodes not equal usable nodes count.
|
||||
- [#1199](https://github.com/xmrig/xmrig/issues/1199) Fixed excessive memory allocation for OpenCL threads with low intensity.
|
||||
- [#1212](https://github.com/xmrig/xmrig/issues/1212) Fixed low RandomX performance after fast algorithm switching.
|
||||
|
||||
# v4.2.0-beta
|
||||
- [#1202](https://github.com/xmrig/xmrig/issues/1202) Fixed algorithm verification in donate strategy.
|
||||
- Added per pool option `coin` with single possible value `monero` for pools without algorithm negotiation, for upcoming Monero fork.
|
||||
- Added config option `cpu/max-threads-hint` and command line option `--cpu-max-threads-hint`.
|
||||
|
||||
# v4.1.0-beta
|
||||
- **OpenCL backend disabled by default.**.
|
||||
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
|
||||
- [#1185](https://github.com/xmrig/xmrig/pull/1185) Added JIT compiler for RandomX on ARMv8.
|
||||
- Improved API endpoint `GET /2/backends` and added support for this endpoint to [workers.xmrig.info](http://workers.xmrig.info).
|
||||
- Added command line option `--no-cpu` to disable CPU backend.
|
||||
- Added OpenCL specific command line options: `--opencl`, `--opencl-devices`, `--opencl-platform`, `--opencl-loader` and `--opencl-no-cache`.
|
||||
- Removed command line option `--http-enabled`, HTTP API enabled automatically if any other `--http-*` option provided.
|
||||
|
||||
# v4.0.1-beta
|
||||
- [#1177](https://github.com/xmrig/xmrig/issues/1177) Fixed compatibility with old AMD drivers.
|
||||
- [#1180](https://github.com/xmrig/xmrig/issues/1180) Fixed possible duplicated shares after algorithm switching.
|
||||
- Added support for case if not all backend threads successfully started.
|
||||
- Fixed wrong config file permissions after write (only gcc builds on recent Windows 10 affected).
|
||||
|
||||
# v4.0.0-beta
|
||||
- [#1172](https://github.com/xmrig/xmrig/issues/1172) **Added OpenCL mining backend.**
|
||||
- [#268](https://github.com/xmrig/xmrig-amd/pull/268) [#270](https://github.com/xmrig/xmrig-amd/pull/270) [#271](https://github.com/xmrig/xmrig-amd/pull/271) [#273](https://github.com/xmrig/xmrig-amd/pull/273) [#274](https://github.com/xmrig/xmrig-amd/pull/274) [#1171](https://github.com/xmrig/xmrig/pull/1171) Added RandomX support for OpenCL, thanks [@SChernykh](https://github.com/SChernykh).
|
||||
- Algorithm `cn/wow` removed, as no longer alive.
|
||||
|
||||
# v3.2.0
|
||||
- Added per pool option `coin` with single possible value `monero` for pools without algorithm negotiation, for upcoming Monero fork.
|
||||
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
|
||||
|
||||
# v3.1.3
|
||||
- [#1180](https://github.com/xmrig/xmrig/issues/1180) Fixed possible duplicated shares after algorithm switching.
|
||||
- Fixed wrong config file permissions after write (only gcc builds on recent Windows 10 affected).
|
||||
|
||||
# v3.1.2
|
||||
- Many RandomX optimizations and fixes.
|
||||
- [#1132](https://github.com/xmrig/xmrig/issues/1132) Fixed build on CentOS 7.
|
||||
- [#1163](https://github.com/xmrig/xmrig/pull/1163) Optimized soft AES code, up to +30% hashrate on CPU without AES support and other optimizations.
|
||||
- [#1166](https://github.com/xmrig/xmrig/pull/1166) Fixed crash when initialize dataset with big threads count (eg 272).
|
||||
- [#1168](https://github.com/xmrig/xmrig/pull/1168) Optimized loading from scratchpad.
|
||||
- [#1128](https://github.com/xmrig/xmrig/issues/1128) Fixed CMake 2.8 compatibility.
|
||||
|
||||
# v3.1.1
|
||||
- [#1133](https://github.com/xmrig/xmrig/issues/1133) Fixed syslog regression.
|
||||
- [#1138](https://github.com/xmrig/xmrig/issues/1138) Fixed multiple network bugs.
|
||||
- [#1141](https://github.com/xmrig/xmrig/issues/1141) Fixed log in background mode.
|
||||
- [#1142](https://github.com/xmrig/xmrig/pull/1142) RandomX hashrate improved by 0.5-1.5% depending on variant and CPU.
|
||||
- [#1146](https://github.com/xmrig/xmrig/pull/1146) Fixed race condition in RandomX thread init.
|
||||
- [#1148](https://github.com/xmrig/xmrig/pull/1148) Fixed, on Linux linker marking entire executable as having an executable stack.
|
||||
- Fixed, for Argon2 algorithms command line options like `--threads` was ignored.
|
||||
- Fixed command line options for single pool, free order allowed again.
|
||||
|
||||
# v3.1.0
|
||||
- [#1107](https://github.com/xmrig/xmrig/issues/1107#issuecomment-522235892) Added Argon2 algorithm family: `argon2/chukwa` and `argon2/wrkz`.
|
||||
|
||||
# v3.0.0
|
||||
- **[#1111](https://github.com/xmrig/xmrig/pull/1111) Added RandomX (`rx/test`) algorithm for testing and benchmarking.**
|
||||
- **[#1036](https://github.com/xmrig/xmrig/pull/1036) Added RandomWOW (`rx/wow`) algorithm for [Wownero](http://wownero.org/).**
|
||||
- **[#1050](https://github.com/xmrig/xmrig/pull/1050) Added RandomXL (`rx/loki`) algorithm for [Loki](https://loki.network/).**
|
||||
- **[#1077](https://github.com/xmrig/xmrig/issues/1077) Added NUMA support via hwloc**.
|
||||
- **Added flexible [multi algorithm](doc/CPU.md) configuration.**
|
||||
- **Added unlimited switching between incompatible algorithms, all mining options can be changed in runtime.**
|
||||
- [#257](https://github.com/xmrig/xmrig-nvidia/pull/257) New logging subsystem, file and syslog now always without colors.
|
||||
- [#314](https://github.com/xmrig/xmrig-proxy/issues/314) Added donate over proxy feature.
|
||||
- [#1007](https://github.com/xmrig/xmrig/issues/1007) Old HTTP API backend based on libmicrohttpd, replaced to custom HTTP server (libuv + http_parser).
|
||||
- [#1010](https://github.com/xmrig/xmrig/pull/1010#issuecomment-482632107) Added daemon support (solo mining).
|
||||
- [#1066](https://github.com/xmrig/xmrig/issues/1066#issuecomment-518080529) Added error message if pool not ready for RandomX.
|
||||
- [#1105](https://github.com/xmrig/xmrig/issues/1105) Improved auto configuration for `cn-pico` algorithm.
|
||||
- Added commands `pause` and `resume` via JSON RPC 2.0 API (`POST /json_rpc`).
|
||||
- Added command line option `--export-topology` for export hwloc topology to a XML file.
|
||||
- Breaked backward compatibility with previous configs and command line, `variant` option replaced to `algo`, global option `algo` removed, all CPU related settings moved to `cpu` object.
|
||||
- Options `av`, `safe` and `max-cpu-usage` removed.
|
||||
- Algorithm `cn/msr` renamed to `cn/fast`.
|
||||
- Algorithm `cn/xtl` removed.
|
||||
- API endpoint `GET /1/threads` replaced to `GET /2/backends`.
|
||||
- Added global uptime and extended connection information in API.
|
||||
- API now return current algorithm.
|
||||
|
||||
# v2.99.6-beta
|
||||
- Added commands `pause` and `resume` via JSON RPC 2.0 API (`POST /json_rpc`).
|
||||
- Fixed autoconfig regression (since 2.99.5), mostly `rx/wow` was affected by this bug.
|
||||
|
||||
@@ -94,3 +94,12 @@ Enable/configure or disable ASM optimizations. Possible values: `true`, `false`,
|
||||
|
||||
#### `argon2-impl` (since v3.1.0)
|
||||
Allow override automatically detected Argon2 implementation, this option added mostly for debug purposes, default value `null` means autodetect. Other possible values: `"x86_64"`, `"SSE2"`, `"SSSE3"`, `"XOP"`, `"AVX2"`, `"AVX-512F"`. Manual selection has no safe guards, if you CPU not support required instuctions, miner will crash.
|
||||
|
||||
#### `max-threads-hint` (since v4.2.0)
|
||||
Maximum CPU threads count (in percentage) hint for autoconfig. [CPU_MAX_USAGE.md](CPU_MAX_USAGE.md)
|
||||
|
||||
#### `memory-pool` (since v4.3.0)
|
||||
Use continuous, persistent memory block for mining threads, useful for preserve huge pages allocation while algorithm swithing. Possible values `false` (feature disabled, by default) or `true` or specific count of 2 MB huge pages.
|
||||
|
||||
#### `yield` (since v5.1.1)
|
||||
Prefer system better system response/stability `true` (default value) or maximum hashrate `false`.
|
||||
|
||||
26
doc/CPU_MAX_USAGE.md
Normal file
26
doc/CPU_MAX_USAGE.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Maximum CPU usage
|
||||
|
||||
Please read this document carefully, `max-threads-hint` (was known as `max-cpu-usage`) option is most confusing option in the miner with many myth and legends.
|
||||
This option is just hint for automatic configuration and can't precise define CPU usage.
|
||||
|
||||
### Option definition
|
||||
#### Config file:
|
||||
```json
|
||||
{
|
||||
...
|
||||
"cpu": {
|
||||
"max-threads-hint": 100,
|
||||
...
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
#### Command line
|
||||
`--cpu-max-threads-hint 100`
|
||||
|
||||
### Known issues and usage
|
||||
|
||||
* This option has no effect if miner already generated CPU configuration, to prevent config generation use `"autosave":false,`.
|
||||
* Only threads count can be changed, for 1 core CPU this option has no effect, for 2 core CPU only 2 values possible 50% and 100%, for 4 cores: 25%, 50%, 75%, 100%. etc.
|
||||
* You CPU may limited by other factors, eg cache.
|
||||
9
doc/PERSISTENT_OPTIONS.md
Normal file
9
doc/PERSISTENT_OPTIONS.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Persistent options
|
||||
|
||||
Options in list below can't changed in runtime by watching config file or via API.
|
||||
|
||||
* `background`
|
||||
* `donate-level`
|
||||
* `cpu/argon2-impl`
|
||||
* `opencl/loader`
|
||||
* `opencl/platform`
|
||||
6
doc/build/CMAKE_OPTIONS.md
vendored
6
doc/build/CMAKE_OPTIONS.md
vendored
@@ -1,5 +1,5 @@
|
||||
# CMake options
|
||||
This document contains list of useful cmake options.
|
||||
**Recent version of this document: https://xmrig.com/docs/miner/cmake-options**
|
||||
|
||||
## Algorithms
|
||||
|
||||
@@ -21,6 +21,8 @@ This feature add external dependency to libhwloc (1.10.0+) (except MSVC builds).
|
||||
* **`-DWITH_TLS=OFF`** disable SSL/TLS support (secure connections to pool). This feature add external dependency to OpenSSL.
|
||||
* **`-DWITH_ASM=OFF`** disable assembly optimizations for modern CryptoNight algorithms.
|
||||
* **`-DWITH_EMBEDDED_CONFIG=ON`** Enable [embedded](https://github.com/xmrig/xmrig/issues/957) config support.
|
||||
* **`-DWITH_OPENCL=OFF`** Disable OpenCL backend.
|
||||
* **`-DWITH_CUDA=OFF`** Disable CUDA backend.
|
||||
|
||||
## Debug options
|
||||
|
||||
@@ -30,7 +32,7 @@ This feature add external dependency to libhwloc (1.10.0+) (except MSVC builds).
|
||||
|
||||
## Special build options
|
||||
|
||||
* **`-DXMRIG_DEPS=<path>`** path to precompiled dependensices https://github.com/xmrig/xmrig-deps
|
||||
* **`-DXMRIG_DEPS=<path>`** path to precompiled dependencies https://github.com/xmrig/xmrig-deps
|
||||
* **`-DARM_TARGET=<number>`** override ARM target, possible values `7` (ARMv7) and `8` (ARMv8).
|
||||
* **`-DUV_INCLUDE_DIR=<path>`** custom path to libuv headers.
|
||||
* **`-DUV_LIBRARY=<path>`** custom path to libuv library.
|
||||
|
||||
30
doc/gpg_keys/xmrig.asc
Normal file
30
doc/gpg_keys/xmrig.asc
Normal file
@@ -0,0 +1,30 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBF3VSRIBCADfFjDUbq0WLGulFeSou0A+jTvweNllPyLNOn3SNCC0XLEYyEcu
|
||||
JiEBK80DlvR06TVr8Aw1rT5S2iH0i5Tl8DqShH2mmcN1rBp1M0Y95D89KVj3BIhE
|
||||
nxmgmD4N3Wgm+5FmEH4W/RpG1xdYWJx3eJhtWPdFJqpg083E2D5P30wIQem+EnTR
|
||||
5YrtTZPh5cPj2KRY+UmsDE3ahmxCgP7LYgnnpZQlWBBiMV932s7MvYBPJQc1wecS
|
||||
0wi1zxyS81xHc3839EkA7wueCeNo+5jha+KH66tMKsfrI2WvfPHTCPjK9v7WJc/O
|
||||
/eRp9d+wacn09D1L6CoRO0ers5p10GO84VhTABEBAAG0GVhNUmlnIDxzdXBwb3J0
|
||||
QHhtcmlnLmNvbT6JAU4EEwEIADgWIQSaxM6o5m41pcfN3BtEalNji+lECQUCXdVJ
|
||||
EgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRBEalNji+lECbkQB/9nRou0
|
||||
tOlBwYn8xVgBu7IiDWNVETRWfrjrtdTvSahgbbo6lWgjA/vBLkjN9fISdBQ/n/Mt
|
||||
hNDJbEtxHHt2baJhvT8du1eWcIHHXCV/rmv+iY/hTXa1gKqHiHDJrtYSVBG3BMme
|
||||
1rdsUHTiKf3t5yRHOXAfY2C+XNblKAV7mhlxQBiKxdFDIkFEQKNrHNUvnzkOqoCT
|
||||
2kTZZ2tPUMQdOn1eek6zG/+C7SwcBpJnakJ8jce4yA/xZbOVKetNWO3Ufu3TE34k
|
||||
OdA+H4PU9+fV77XfOY8DtXeS3boUI97ei+4s/mwX/NFC0i8CPXyefxl3WRUBGDOI
|
||||
w//kPNQVh4HobOCeuQENBF3VSRIBCADl29WorEi+vRA/3kg9VUXtxSU6caibFS3N
|
||||
VXANiFRjrOmICdfrIgOSGNrYCQFsXu0Xe0udDYVX8yX6WJk+CT02Pdg0gkXiKoze
|
||||
KrnK15mo3xXbb2tr1o9ROPgwY/o2AwQHj0o1JhdS2cybfuRiUQRoGgBX7a9X0cTY
|
||||
r4ZJvOjzgAajl3ciwB3yWUmDiRlzZpO7YWESXbOhGVzyCnP5MlMEJ/fPRw9h38vK
|
||||
HNKLhzcRfsLpXk34ghY3SxIv4NWUfuZXFWqpSdC9JgNc5zA72lJEQcF4DHJCKl7B
|
||||
ddmrfsr9mdiIpo+/ZZFPPngdeZ2kvkJ2YKaZNVu2XooJARPQ8B8tABEBAAGJATYE
|
||||
GAEIACAWIQSaxM6o5m41pcfN3BtEalNji+lECQUCXdVJEgIbDAAKCRBEalNji+lE
|
||||
CdPUB/4nH1IdhHGmfko2kxdaHqQgCGLqh3pcrQXD9mBv/LYVnoHZpVRHsIDgg2Z4
|
||||
lQYrIRRqe69FjVxo7sA2eMIlV0GRDlUrw+HeURFpEhKPEdwFy6i/cti2MY0YxOrB
|
||||
TvQoRutUoMnyjM4TBJWaaqccbTsavMdLmG3JHdAkiHtUis/fUwVctmEQwN+d/J2b
|
||||
wJAtliqw3nXchUfdIfwHF/7hg8seUuYUaifzkazBZhVWvRkTVLVanzZ51HRfuzwD
|
||||
ntaa7kfYGdE+4TKOylAPh+8E6WnR19RRTpsaW0dVBgOiBTE0uc7rUv2HWS/u6RUR
|
||||
t7ldSBzkuDTlM2V59Iq2hXoSC6dT
|
||||
=cIG9
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
5
doc/releases/5_0_1/SHA256SUMS
Normal file
5
doc/releases/5_0_1/SHA256SUMS
Normal file
@@ -0,0 +1,5 @@
|
||||
6bb1a2e3a0fbca5195be6022f2a9fbff8a353c37c7542e7ab89420cb45b64505 xmrig-5.0.1-gcc-win32.zip
|
||||
24dba9ec281acfb2ea2c401ebd0e4e2d1f1ee5fd557da5ff3c7049020c1f78b6 xmrig-5.0.1-gcc-win64.zip
|
||||
86d65c6693ec9e35cd7547329580638b85c9eb0cf8383892a1c15199de5b556f xmrig-5.0.1-msvc-cuda10_1-win64.zip
|
||||
0fbfe518b1c4b6993b0f66ff01302626375b15620ccf8f64d6fb97845068ffca xmrig-5.0.1-msvc-win64.zip
|
||||
aa34890738a3494de2fa0e44db346937fea7339852f5f10b5d4655f95e2d8f1f xmrig-5.0.1-xenial-x64.tar.gz
|
||||
11
doc/releases/5_0_1/SHA256SUMS.sig
Normal file
11
doc/releases/5_0_1/SHA256SUMS.sig
Normal file
@@ -0,0 +1,11 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEzBAABCgAdFiEEmsTOqOZuNaXHzdwbRGpTY4vpRAkFAl3VcsoACgkQRGpTY4vp
|
||||
RAm9vQgA1MyTUU2jley2TCYLUzQy2Fffc8fbXYv64r44jbWOjC/6qo2iIlRgPhIc
|
||||
oVyPKr5TYS3QjDzCEm8IvozS0YudS6soESbPzqDonboK8pd0K4bsML9TQY2feV7A
|
||||
NL5vln0rfVHp1wxLLrQpfBqAgvJUXEyaHece6gFQN79JOGhEo2bHL2NyrOl+FViS
|
||||
b2BaMtXq410Fh+XT6ShnOaG/2EuO8ZqSGdCO6A/2LHQw1UY+mZiCvue6P6B06HmB
|
||||
WD/urOv38V389v+V+Sp4UlEW6VpBOOjvtChoVWtLt+tKzydrnt2EmoWWWg475pka
|
||||
4G6whHuMWS8CTt5/PDhJpvVXNQTIOw==
|
||||
=C764
|
||||
-----END PGP SIGNATURE-----
|
||||
BIN
doc/screenshot_v5_2_0.png
Normal file
BIN
doc/screenshot_v5_2_0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
262
doc/topology/AMD_Opteron_6344_x2_N4_win7_2_0_4_bug.xml
Normal file
262
doc/topology/AMD_Opteron_6344_x2_N4_win7_2_0_4_bug.xml
Normal file
@@ -0,0 +1,262 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topology SYSTEM "hwloc2.dtd">
|
||||
<topology version="2.0">
|
||||
<object type="Machine" os_index="0" cpuset="0x00ffffff" complete_cpuset="0x00ffffff" allowed_cpuset="0x00ffffff" nodeset="0x0000000f" complete_nodeset="0x0000000f" allowed_nodeset="0x0000000f" gp_index="1">
|
||||
<info name="Backend" value="Windows"/>
|
||||
<info name="hwlocVersion" value="2.0.4"/>
|
||||
<object type="Package" cpuset="0x00000fff" complete_cpuset="0x00000fff" nodeset="0x00000003" complete_nodeset="0x00000003" gp_index="36">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="21"/>
|
||||
<info name="CPUModelNumber" value="2"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6344 "/>
|
||||
<info name="CPUStepping" value="0"/>
|
||||
<object type="L3Cache" cpuset="0x0000003f" complete_cpuset="0x0000003f" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="20" cache_size="12582912" depth="3" cache_linesize="64" cache_associativity="1" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="0" cpuset="0x0000003f" complete_cpuset="0x0000003f" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="80" local_memory="7009357824">
|
||||
<page_type size="4096" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="4" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="3" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="2">
|
||||
<object type="PU" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="85"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="7" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="6" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="5">
|
||||
<object type="PU" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="86"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="10" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="9" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="8">
|
||||
<object type="PU" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="87"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="13" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="12" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="11">
|
||||
<object type="PU" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="88"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="16" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="15" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="14">
|
||||
<object type="PU" os_index="4" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="89"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="19" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="18" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="17">
|
||||
<object type="PU" os_index="5" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="90"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x00000fc0" complete_cpuset="0x00000fc0" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="40" cache_size="12582912" depth="3" cache_linesize="64" cache_associativity="1" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="1" cpuset="0x00000fc0" complete_cpuset="0x00000fc0" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="81" local_memory="8018194432">
|
||||
<page_type size="4096" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="23" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="22" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="21">
|
||||
<object type="PU" os_index="6" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="91"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="26" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="25" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="24">
|
||||
<object type="PU" os_index="7" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="92"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="29" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="28" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="27">
|
||||
<object type="PU" os_index="8" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="93"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="32" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="31" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="30">
|
||||
<object type="PU" os_index="9" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="94"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="35" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="34" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="33">
|
||||
<object type="PU" os_index="10" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="95"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="39" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="38" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="37">
|
||||
<object type="PU" os_index="11" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="96"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="Package" cpuset="0x00fff000" complete_cpuset="0x00fff000" nodeset="0x0000000c" complete_nodeset="0x0000000c" gp_index="75">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="21"/>
|
||||
<info name="CPUModelNumber" value="2"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6344 "/>
|
||||
<info name="CPUStepping" value="0"/>
|
||||
<object type="L3Cache" cpuset="0x0003f000" complete_cpuset="0x0003f000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="59" cache_size="12582912" depth="3" cache_linesize="64" cache_associativity="1" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="2" cpuset="0x0003f000" complete_cpuset="0x0003f000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="82" local_memory="8035020800">
|
||||
<page_type size="4096" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="43" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="42" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="41">
|
||||
<object type="PU" os_index="12" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="97"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="46" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="45" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="44">
|
||||
<object type="PU" os_index="13" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="98"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="49" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="48" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="47">
|
||||
<object type="PU" os_index="14" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="99"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="52" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="51" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="50">
|
||||
<object type="PU" os_index="15" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="100"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="55" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="54" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="53">
|
||||
<object type="PU" os_index="16" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="101"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="58" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="57" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="56">
|
||||
<object type="PU" os_index="17" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="102"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x00fc0000" complete_cpuset="0x00fc0000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="79" cache_size="12582912" depth="3" cache_linesize="64" cache_associativity="1" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="3" cpuset="0x00fc0000" complete_cpuset="0x00fc0000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="83" local_memory="8097337344">
|
||||
<page_type size="4096" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="62" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="61" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="60">
|
||||
<object type="PU" os_index="18" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="103"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="65" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="64" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="63">
|
||||
<object type="PU" os_index="19" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="104"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="68" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="67" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="66">
|
||||
<object type="PU" os_index="20" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="105"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="71" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="70" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="69">
|
||||
<object type="PU" os_index="21" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="106"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="74" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="73" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="72">
|
||||
<object type="PU" os_index="22" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="107"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="78" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="77" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="76">
|
||||
<object type="PU" os_index="23" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="108"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</topology>
|
||||
399
doc/topology/AMD_Opteron_6348_x4_N8_linux_2_0_4.xml
Normal file
399
doc/topology/AMD_Opteron_6348_x4_N8_linux_2_0_4.xml
Normal file
@@ -0,0 +1,399 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topology SYSTEM "hwloc2.dtd">
|
||||
<topology version="2.0">
|
||||
<object type="Machine" os_index="0" cpuset="0xffffffff" complete_cpuset="0xffffffff" allowed_cpuset="0xffffffff" nodeset="0x00000066" complete_nodeset="0x000000ff" allowed_nodeset="0x00000066" gp_index="1">
|
||||
<info name="DMIProductName" value="H8QG6"/>
|
||||
<info name="DMIProductVersion" value="1234567890"/>
|
||||
<info name="DMIProductSerial" value="1234567890"/>
|
||||
<info name="DMIProductUUID" value="0"/>
|
||||
<info name="DMIBoardVendor" value="Supermicro"/>
|
||||
<info name="DMIBoardName" value="H8QG6"/>
|
||||
<info name="DMIBoardVersion" value="1234567890"/>
|
||||
<info name="DMIBoardSerial" value="0"/>
|
||||
<info name="DMIBoardAssetTag" value="1234567890"/>
|
||||
<info name="DMIChassisVendor" value="Supermicro"/>
|
||||
<info name="DMIChassisType" value="3"/>
|
||||
<info name="DMIChassisVersion" value="1234567890"/>
|
||||
<info name="DMIChassisSerial" value="1234567890."/>
|
||||
<info name="DMIChassisAssetTag" value="1234567890"/>
|
||||
<info name="DMIBIOSVendor" value="American Megatrends Inc."/>
|
||||
<info name="DMIBIOSVersion" value="080016 "/>
|
||||
<info name="DMIBIOSDate" value="10/11/2010"/>
|
||||
<info name="DMISysVendor" value="Supermicro"/>
|
||||
<info name="Backend" value="Linux"/>
|
||||
<info name="LinuxCgroup" value="/"/>
|
||||
<info name="OSName" value="Linux"/>
|
||||
<info name="OSRelease" value="4.15.0-20-generic"/>
|
||||
<info name="OSVersion" value="#21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018"/>
|
||||
<info name="HostName" value="host"/>
|
||||
<info name="Architecture" value="x86_64"/>
|
||||
<info name="hwlocVersion" value="2.0.4"/>
|
||||
<info name="ProcessName" value="xmrig"/>
|
||||
<object type="Package" os_index="0" cpuset="0x000000ff" complete_cpuset="0x000000ff" nodeset="0x00000002" complete_nodeset="0x00000003" gp_index="2">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="16"/>
|
||||
<info name="CPUModelNumber" value="9"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6128"/>
|
||||
<info name="CPUStepping" value="1"/>
|
||||
<object type="L3Cache" cpuset="0x0000000f" complete_cpuset="0x0000000f" nodeset="0x0" complete_nodeset="0x00000001" gp_index="7" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L2Cache" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x0" complete_nodeset="0x00000001" gp_index="6" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x0" complete_nodeset="0x00000001" gp_index="5" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x0" complete_nodeset="0x00000001" gp_index="3">
|
||||
<object type="PU" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x0" complete_nodeset="0x00000001" gp_index="4"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x0" complete_nodeset="0x00000001" gp_index="11" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x0" complete_nodeset="0x00000001" gp_index="10" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x0" complete_nodeset="0x00000001" gp_index="8">
|
||||
<object type="PU" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x0" complete_nodeset="0x00000001" gp_index="9"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x0" complete_nodeset="0x00000001" gp_index="15" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x0" complete_nodeset="0x00000001" gp_index="14" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x0" complete_nodeset="0x00000001" gp_index="12">
|
||||
<object type="PU" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x0" complete_nodeset="0x00000001" gp_index="13"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x0" complete_nodeset="0x00000001" gp_index="19" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x0" complete_nodeset="0x00000001" gp_index="18" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x0" complete_nodeset="0x00000001" gp_index="16">
|
||||
<object type="PU" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x0" complete_nodeset="0x00000001" gp_index="17"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x000000f0" complete_cpuset="0x000000f0" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="24" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="1" cpuset="0x000000f0" complete_cpuset="0x000000f0" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="143" local_memory="4156817408">
|
||||
<page_type size="4096" count="854592"/>
|
||||
<page_type size="2097152" count="313"/>
|
||||
<page_type size="1073741824" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="23" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="22" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="20">
|
||||
<object type="PU" os_index="4" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="21"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="28" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="27" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="25">
|
||||
<object type="PU" os_index="5" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="26"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="32" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="31" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="29">
|
||||
<object type="PU" os_index="6" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="30"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="36" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="35" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="33">
|
||||
<object type="PU" os_index="7" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="34"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="Package" os_index="1" cpuset="0x0000ff00" complete_cpuset="0x0000ff00" nodeset="0x00000004" complete_nodeset="0x0000000c" gp_index="37">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="16"/>
|
||||
<info name="CPUModelNumber" value="9"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6128"/>
|
||||
<info name="CPUStepping" value="1"/>
|
||||
<object type="L3Cache" cpuset="0x00000f00" complete_cpuset="0x00000f00" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="42" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="2" cpuset="0x00000f00" complete_cpuset="0x00000f00" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="144" local_memory="4204060672">
|
||||
<page_type size="4096" count="866126"/>
|
||||
<page_type size="2097152" count="313"/>
|
||||
<page_type size="1073741824" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="41" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="40" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="38">
|
||||
<object type="PU" os_index="8" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="39"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="46" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="45" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="43">
|
||||
<object type="PU" os_index="9" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="44"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="50" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="49" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="47">
|
||||
<object type="PU" os_index="10" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="48"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="54" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="53" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="51">
|
||||
<object type="PU" os_index="11" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="52"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x0000f000" complete_cpuset="0x0000f000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="59" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L2Cache" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="58" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="57" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="55">
|
||||
<object type="PU" os_index="12" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="56"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="63" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="62" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="60">
|
||||
<object type="PU" os_index="13" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="61"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="67" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="66" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="64">
|
||||
<object type="PU" os_index="14" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="65"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="71" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="70" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="68">
|
||||
<object type="PU" os_index="15" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="69"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="Package" os_index="2" cpuset="0x00ff0000" complete_cpuset="0x00ff0000" nodeset="0x00000020" complete_nodeset="0x00000030" gp_index="72">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="16"/>
|
||||
<info name="CPUModelNumber" value="9"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6128"/>
|
||||
<info name="CPUStepping" value="1"/>
|
||||
<object type="L3Cache" cpuset="0x000f0000" complete_cpuset="0x000f0000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="77" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L2Cache" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="76" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="75" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="73">
|
||||
<object type="PU" os_index="16" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="74"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="81" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="80" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="78">
|
||||
<object type="PU" os_index="17" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="79"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="85" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="84" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="82">
|
||||
<object type="PU" os_index="18" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="83"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="89" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="88" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="86">
|
||||
<object type="PU" os_index="19" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="87"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x00f00000" complete_cpuset="0x00f00000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="94" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="5" cpuset="0x00f00000" complete_cpuset="0x00f00000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="147" local_memory="4226170880">
|
||||
<page_type size="4096" count="872036"/>
|
||||
<page_type size="2097152" count="312"/>
|
||||
<page_type size="1073741824" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="93" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="92" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="90">
|
||||
<object type="PU" os_index="20" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="91"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="98" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="97" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="95">
|
||||
<object type="PU" os_index="21" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="96"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="102" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="101" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="99">
|
||||
<object type="PU" os_index="22" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="100"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="106" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="105" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="103">
|
||||
<object type="PU" os_index="23" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="104"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="Package" os_index="3" cpuset="0xff000000" complete_cpuset="0xff000000" nodeset="0x00000040" complete_nodeset="0x000000c0" gp_index="107">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="16"/>
|
||||
<info name="CPUModelNumber" value="9"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6128"/>
|
||||
<info name="CPUStepping" value="1"/>
|
||||
<object type="L3Cache" cpuset="0x0f000000" complete_cpuset="0x0f000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="112" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="6" cpuset="0x0f000000" complete_cpuset="0x0f000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="148" local_memory="4221870080">
|
||||
<page_type size="4096" count="870986"/>
|
||||
<page_type size="2097152" count="312"/>
|
||||
<page_type size="1073741824" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x01000000" complete_cpuset="0x01000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="111" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x01000000" complete_cpuset="0x01000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="110" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x01000000" complete_cpuset="0x01000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="108">
|
||||
<object type="PU" os_index="24" cpuset="0x01000000" complete_cpuset="0x01000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="109"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x02000000" complete_cpuset="0x02000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="116" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x02000000" complete_cpuset="0x02000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="115" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x02000000" complete_cpuset="0x02000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="113">
|
||||
<object type="PU" os_index="25" cpuset="0x02000000" complete_cpuset="0x02000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="114"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x04000000" complete_cpuset="0x04000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="120" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x04000000" complete_cpuset="0x04000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="119" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x04000000" complete_cpuset="0x04000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="117">
|
||||
<object type="PU" os_index="26" cpuset="0x04000000" complete_cpuset="0x04000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="118"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x08000000" complete_cpuset="0x08000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="124" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x08000000" complete_cpuset="0x08000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="123" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x08000000" complete_cpuset="0x08000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="121">
|
||||
<object type="PU" os_index="27" cpuset="0x08000000" complete_cpuset="0x08000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="122"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0xf0000000" complete_cpuset="0xf0000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="129" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L2Cache" cpuset="0x10000000" complete_cpuset="0x10000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="128" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x10000000" complete_cpuset="0x10000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="127" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x10000000" complete_cpuset="0x10000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="125">
|
||||
<object type="PU" os_index="28" cpuset="0x10000000" complete_cpuset="0x10000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="126"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x20000000" complete_cpuset="0x20000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="133" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x20000000" complete_cpuset="0x20000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="132" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x20000000" complete_cpuset="0x20000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="130">
|
||||
<object type="PU" os_index="29" cpuset="0x20000000" complete_cpuset="0x20000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="131"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x40000000" complete_cpuset="0x40000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="137" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x40000000" complete_cpuset="0x40000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="136" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x40000000" complete_cpuset="0x40000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="134">
|
||||
<object type="PU" os_index="30" cpuset="0x40000000" complete_cpuset="0x40000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="135"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x80000000" complete_cpuset="0x80000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="141" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x80000000" complete_cpuset="0x80000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="140" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x80000000" complete_cpuset="0x80000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="138">
|
||||
<object type="PU" os_index="31" cpuset="0x80000000" complete_cpuset="0x80000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="139"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<distances2 type="NUMANode" nbobjs="4" kind="5" indexing="os">
|
||||
<indexes length="8">1 2 5 6 </indexes>
|
||||
<u64values length="30">10 22 16 22 22 10 22 16 16 22 </u64values>
|
||||
<u64values length="18">10 22 22 16 22 10 </u64values>
|
||||
</distances2>
|
||||
</topology>
|
||||
|
||||
23
package.json
Normal file
23
package.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "xmrig",
|
||||
"version": "3.0.0",
|
||||
"description": "RandomX, CryptoNight and Argon2 miner",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "doc"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node scripts/generate_cl.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/xmrig/xmrig.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "GPLv3",
|
||||
"bugs": {
|
||||
"url": "https://github.com/xmrig/xmrig/issues"
|
||||
},
|
||||
"homepage": "https://github.com/xmrig/xmrig#readme"
|
||||
}
|
||||
43
scripts/build_deps.sh
Executable file
43
scripts/build_deps.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
UV_VERSION="1.34.0"
|
||||
OPENSSL_VERSION="1.1.1d"
|
||||
HWLOC_VERSION="2.1.0"
|
||||
|
||||
mkdir deps
|
||||
mkdir deps/include
|
||||
mkdir deps/lib
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
wget https://github.com/libuv/libuv/archive/v${UV_VERSION}.tar.gz
|
||||
tar -xzf v${UV_VERSION}.tar.gz
|
||||
|
||||
wget https://download.open-mpi.org/release/hwloc/v2.1/hwloc-${HWLOC_VERSION}.tar.bz2
|
||||
tar -xjf hwloc-${HWLOC_VERSION}.tar.bz2
|
||||
|
||||
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
|
||||
tar -xzf openssl-${OPENSSL_VERSION}.tar.gz
|
||||
|
||||
cd libuv-${UV_VERSION}
|
||||
sh autogen.sh
|
||||
./configure --disable-shared
|
||||
make -j$(nproc)
|
||||
cp -fr include/ ../../deps
|
||||
cp .libs/libuv.a ../../deps/lib
|
||||
cd ..
|
||||
|
||||
cd hwloc-${HWLOC_VERSION}
|
||||
./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2
|
||||
make -j$(nproc)
|
||||
cp -fr include/ ../../deps
|
||||
cp hwloc/.libs/libhwloc.a ../../deps/lib
|
||||
cd ..
|
||||
|
||||
cd openssl-${OPENSSL_VERSION}
|
||||
./config -no-shared -no-asm -no-zlib -no-comp -no-dgram -no-filenames -no-cms
|
||||
make -j$(nproc)
|
||||
cp -fr include/ ../../deps
|
||||
cp libcrypto.a ../../deps/lib
|
||||
cp libssl.a ../../deps/lib
|
||||
cd ../..
|
||||
12
scripts/enable_1gb_pages.sh
Executable file
12
scripts/enable_1gb_pages.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# https://xmrig.com/docs/miner/hugepages#onegb-huge-pages
|
||||
|
||||
sysctl -w vm.nr_hugepages=$(nproc)
|
||||
|
||||
for i in $(find /sys/devices/system/node/node* -maxdepth 0 -type d);
|
||||
do
|
||||
echo 3 > "$i/hugepages/hugepages-1048576kB/nr_hugepages";
|
||||
done
|
||||
|
||||
echo "1GB pages successfully enabled"
|
||||
102
scripts/generate_cl.js
Normal file
102
scripts/generate_cl.js
Normal file
@@ -0,0 +1,102 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { text2h, text2h_bundle, addIncludes } = require('./js/opencl');
|
||||
const { opencl_minify } = require('./js/opencl_minify');
|
||||
const cwd = process.cwd();
|
||||
|
||||
|
||||
function cn()
|
||||
{
|
||||
const cn = opencl_minify(addIncludes('cryptonight.cl', [
|
||||
'algorithm.cl',
|
||||
'wolf-aes.cl',
|
||||
'wolf-skein.cl',
|
||||
'jh.cl',
|
||||
'blake256.cl',
|
||||
'groestl256.cl',
|
||||
'fast_int_math_v2.cl',
|
||||
'fast_div_heavy.cl',
|
||||
'keccak.cl'
|
||||
]));
|
||||
|
||||
// fs.writeFileSync('cryptonight_gen.cl', cn);
|
||||
fs.writeFileSync('cryptonight_cl.h', text2h(cn, 'xmrig', 'cryptonight_cl'));
|
||||
}
|
||||
|
||||
|
||||
function cn_r()
|
||||
{
|
||||
const items = {};
|
||||
|
||||
items.cryptonight_r_defines_cl = opencl_minify(addIncludes('cryptonight_r_defines.cl', [ 'wolf-aes.cl' ]));
|
||||
items.cryptonight_r_cl = opencl_minify(fs.readFileSync('cryptonight_r.cl', 'utf8'));
|
||||
|
||||
// for (let key in items) {
|
||||
// fs.writeFileSync(key + '_gen.cl', items[key]);
|
||||
// }
|
||||
|
||||
fs.writeFileSync('cryptonight_r_cl.h', text2h_bundle('xmrig', items));
|
||||
}
|
||||
|
||||
|
||||
function cn_gpu()
|
||||
{
|
||||
const cn_gpu = opencl_minify(addIncludes('cryptonight_gpu.cl', [ 'wolf-aes.cl', 'keccak.cl' ]));
|
||||
|
||||
// fs.writeFileSync('cryptonight_gpu_gen.cl', cn_gpu);
|
||||
fs.writeFileSync('cryptonight_gpu_cl.h', text2h(cn_gpu, 'xmrig', 'cryptonight_gpu_cl'));
|
||||
}
|
||||
|
||||
|
||||
function rx()
|
||||
{
|
||||
let rx = addIncludes('randomx.cl', [
|
||||
'../cn/algorithm.cl',
|
||||
'randomx_constants_monero.h',
|
||||
'randomx_constants_wow.h',
|
||||
'randomx_constants_loki.h',
|
||||
'randomx_constants_arqma.h',
|
||||
'randomx_constants_keva.h',
|
||||
'aes.cl',
|
||||
'blake2b.cl',
|
||||
'randomx_vm.cl',
|
||||
'randomx_jit.cl'
|
||||
]);
|
||||
|
||||
rx = rx.replace(/(\t| )*#include "fillAes1Rx4.cl"/g, fs.readFileSync('fillAes1Rx4.cl', 'utf8'));
|
||||
rx = rx.replace(/(\t| )*#include "blake2b_double_block.cl"/g, fs.readFileSync('blake2b_double_block.cl', 'utf8'));
|
||||
rx = opencl_minify(rx);
|
||||
|
||||
//fs.writeFileSync('randomx_gen.cl', rx);
|
||||
fs.writeFileSync('randomx_cl.h', text2h(rx, 'xmrig', 'randomx_cl'));
|
||||
}
|
||||
|
||||
|
||||
function astrobwt()
|
||||
{
|
||||
const astrobwt = opencl_minify(addIncludes('astrobwt.cl', [ 'BWT.cl', 'salsa20.cl', 'sha3.cl' ]));
|
||||
|
||||
// fs.writeFileSync('astrobwt_gen.cl', astrobwt);
|
||||
fs.writeFileSync('astrobwt_cl.h', text2h(astrobwt, 'xmrig', 'astrobwt_cl'));
|
||||
}
|
||||
|
||||
|
||||
process.chdir(path.resolve('src/backend/opencl/cl/cn'));
|
||||
|
||||
cn();
|
||||
cn_r();
|
||||
cn_gpu();
|
||||
|
||||
process.chdir(cwd);
|
||||
process.chdir(path.resolve('src/backend/opencl/cl/rx'));
|
||||
|
||||
rx();
|
||||
|
||||
process.chdir(cwd);
|
||||
process.chdir(path.resolve('src/backend/opencl/cl/astrobwt'));
|
||||
|
||||
astrobwt();
|
||||
91
scripts/js/opencl.js
Normal file
91
scripts/js/opencl.js
Normal file
@@ -0,0 +1,91 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
|
||||
function bin2h(buf, namespace, name)
|
||||
{
|
||||
const size = buf.byteLength;
|
||||
let out = `#pragma once\n\nnamespace ${namespace} {\n\nstatic unsigned char ${name}[${size}] = {\n `;
|
||||
|
||||
let b = 32;
|
||||
for (let i = 0; i < size; i++) {
|
||||
out += `0x${buf.readUInt8(i).toString(16).padStart(2, '0')}${size - i > 1 ? ',' : ''}`;
|
||||
|
||||
if (--b === 0) {
|
||||
b = 32;
|
||||
out += '\n ';
|
||||
}
|
||||
}
|
||||
|
||||
out += `\n};\n\n} // namespace ${namespace}\n`;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
function text2h_internal(text, name)
|
||||
{
|
||||
const buf = Buffer.from(text);
|
||||
const size = buf.byteLength;
|
||||
let out = `\nstatic char ${name}[${size + 1}] = {\n `;
|
||||
|
||||
let b = 32;
|
||||
for (let i = 0; i < size; i++) {
|
||||
out += `0x${buf.readUInt8(i).toString(16).padStart(2, '0')},`;
|
||||
|
||||
if (--b === 0) {
|
||||
b = 32;
|
||||
out += '\n ';
|
||||
}
|
||||
}
|
||||
|
||||
out += '0x00';
|
||||
|
||||
out += '\n};\n';
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
function text2h(text, namespace, name)
|
||||
{
|
||||
return `#pragma once\n\nnamespace ${namespace} {\n` + text2h_internal(text, name) + `\n} // namespace ${namespace}\n`;
|
||||
}
|
||||
|
||||
|
||||
function text2h_bundle(namespace, items)
|
||||
{
|
||||
let out = `#pragma once\n\nnamespace ${namespace} {\n`;
|
||||
|
||||
for (let key in items) {
|
||||
out += text2h_internal(items[key], key);
|
||||
}
|
||||
|
||||
return out + `\n} // namespace ${namespace}\n`;
|
||||
}
|
||||
|
||||
|
||||
function addInclude(input, name)
|
||||
{
|
||||
return input.replace(`#include "${name}"`, fs.readFileSync(name, 'utf8'));
|
||||
}
|
||||
|
||||
|
||||
function addIncludes(inputFileName, names)
|
||||
{
|
||||
let data = fs.readFileSync(inputFileName, 'utf8');
|
||||
|
||||
for (let name of names) {
|
||||
data = addInclude(data, name);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
module.exports.bin2h = bin2h;
|
||||
module.exports.text2h = text2h;
|
||||
module.exports.text2h_bundle = text2h_bundle;
|
||||
module.exports.addInclude = addInclude;
|
||||
module.exports.addIncludes = addIncludes;
|
||||
51
scripts/js/opencl_minify.js
Normal file
51
scripts/js/opencl_minify.js
Normal file
@@ -0,0 +1,51 @@
|
||||
'use strict';
|
||||
|
||||
function opencl_minify(input)
|
||||
{
|
||||
let out = input.replace(/\r/g, '');
|
||||
out = out.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, ''); // comments
|
||||
out = out.replace(/^#\s+/gm, '#'); // macros with spaces
|
||||
out = out.replace(/\n{2,}/g, '\n'); // empty lines
|
||||
out = out.replace(/^\s+/gm, ''); // leading whitespace
|
||||
out = out.replace(/ {2,}/g, ' '); // extra whitespace
|
||||
|
||||
let array = out.split('\n').map(line => {
|
||||
if (line[0] === '#') {
|
||||
return line;
|
||||
}
|
||||
|
||||
line = line.replace(/, /g, ',');
|
||||
line = line.replace(/ \? /g, '?');
|
||||
line = line.replace(/ : /g, ':');
|
||||
line = line.replace(/ = /g, '=');
|
||||
line = line.replace(/ != /g, '!=');
|
||||
line = line.replace(/ >= /g, '>=');
|
||||
line = line.replace(/ <= /g, '<=');
|
||||
line = line.replace(/ == /g, '==');
|
||||
line = line.replace(/ \+= /g, '+=');
|
||||
line = line.replace(/ -= /g, '-=');
|
||||
line = line.replace(/ \|= /g, '|=');
|
||||
line = line.replace(/ \| /g, '|');
|
||||
line = line.replace(/ \|\| /g, '||');
|
||||
line = line.replace(/ & /g, '&');
|
||||
line = line.replace(/ && /g, '&&');
|
||||
line = line.replace(/ > /g, '>');
|
||||
line = line.replace(/ < /g, '<');
|
||||
line = line.replace(/ \+ /g, '+');
|
||||
line = line.replace(/ - /g, '-');
|
||||
line = line.replace(/ \* /g, '*');
|
||||
line = line.replace(/ \^ /g, '^');
|
||||
line = line.replace(/ & /g, '&');
|
||||
line = line.replace(/ \/ /g, '/');
|
||||
line = line.replace(/ << /g, '<<');
|
||||
line = line.replace(/ >> /g, '>>');
|
||||
line = line.replace(/if \(/g, 'if(');
|
||||
|
||||
return line;
|
||||
});
|
||||
|
||||
return array.join('\n');
|
||||
}
|
||||
|
||||
|
||||
module.exports.opencl_minify = opencl_minify;
|
||||
20
scripts/randomx_boost.sh
Executable file
20
scripts/randomx_boost.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
modprobe msr
|
||||
|
||||
if cat /proc/cpuinfo | grep "AMD Ryzen" > /dev/null;
|
||||
then
|
||||
echo "Detected Ryzen"
|
||||
wrmsr -a 0xc0011022 0x510000
|
||||
wrmsr -a 0xc001102b 0x1808cc16
|
||||
wrmsr -a 0xc0011020 0
|
||||
wrmsr -a 0xc0011021 0x40
|
||||
echo "MSR register values for Ryzen applied"
|
||||
elif cat /proc/cpuinfo | grep "Intel" > /dev/null;
|
||||
then
|
||||
echo "Detected Intel"
|
||||
wrmsr -a 0x1a4 0xf
|
||||
echo "MSR register values for Intel applied"
|
||||
else
|
||||
echo "No supported CPU detected"
|
||||
fi
|
||||
25
src/3rdparty/CL/LICENSE
vendored
Normal file
25
src/3rdparty/CL/LICENSE
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and/or associated documentation files (the
|
||||
"Materials"), to deal in the Materials without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
permit persons to whom the Materials are furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
https://www.khronos.org/registry/
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
50
src/3rdparty/CL/README.md
vendored
Normal file
50
src/3rdparty/CL/README.md
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# OpenCL<sup>TM</sup> API Headers
|
||||
|
||||
This repository contains C language headers for the OpenCL API.
|
||||
|
||||
The authoritative public repository for these headers is located at:
|
||||
|
||||
https://github.com/KhronosGroup/OpenCL-Headers
|
||||
|
||||
Issues, proposed fixes for issues, and other suggested changes should be
|
||||
created using Github.
|
||||
|
||||
## Branch Structure
|
||||
|
||||
The OpenCL API headers in this repository are Unified headers and are designed
|
||||
to work with all released OpenCL versions. This differs from previous OpenCL
|
||||
API headers, where version-specific API headers either existed in separate
|
||||
branches, or in separate folders in a branch.
|
||||
|
||||
## Compiling for a Specific OpenCL Version
|
||||
|
||||
By default, the OpenCL API headers in this repository are for the latest
|
||||
OpenCL version (currently OpenCL 2.2). To use these API headers to target
|
||||
a different OpenCL version, an application may `#define` the preprocessor
|
||||
value `CL_TARGET_OPENCL_VERSION` before including the OpenCL API headers.
|
||||
The `CL_TARGET_OPENCL_VERSION` is a three digit decimal value representing
|
||||
the OpenCL API version.
|
||||
|
||||
For example, to enforce usage of no more than the OpenCL 1.2 APIs, you may
|
||||
include the OpenCL API headers as follows:
|
||||
|
||||
```
|
||||
#define CL_TARGET_OPENCL_VERSION 120
|
||||
#include <CL/opencl.h>
|
||||
```
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
README.md This file
|
||||
LICENSE Source license for the OpenCL API headers
|
||||
CL/ Unified OpenCL API headers tree
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
See [LICENSE](LICENSE).
|
||||
|
||||
---
|
||||
|
||||
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.
|
||||
1804
src/3rdparty/CL/cl.h
vendored
Normal file
1804
src/3rdparty/CL/cl.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
131
src/3rdparty/CL/cl_d3d10.h
vendored
Normal file
131
src/3rdparty/CL/cl_d3d10.h
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_D3D10_H
|
||||
#define __OPENCL_CL_D3D10_H
|
||||
|
||||
#include <d3d10.h>
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* cl_khr_d3d10_sharing */
|
||||
#define cl_khr_d3d10_sharing 1
|
||||
|
||||
typedef cl_uint cl_d3d10_device_source_khr;
|
||||
typedef cl_uint cl_d3d10_device_set_khr;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_D3D10_DEVICE_KHR -1002
|
||||
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
|
||||
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
|
||||
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
|
||||
|
||||
/* cl_d3d10_device_source_nv */
|
||||
#define CL_D3D10_DEVICE_KHR 0x4010
|
||||
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
|
||||
|
||||
/* cl_d3d10_device_set_nv */
|
||||
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
|
||||
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
|
||||
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
|
||||
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_d3d10_device_source_khr d3d_device_source,
|
||||
void * d3d_object,
|
||||
cl_d3d10_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Buffer * resource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture2D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture3D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_D3D10_H */
|
||||
|
||||
131
src/3rdparty/CL/cl_d3d11.h
vendored
Normal file
131
src/3rdparty/CL/cl_d3d11.h
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_D3D11_H
|
||||
#define __OPENCL_CL_D3D11_H
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* cl_khr_d3d11_sharing */
|
||||
#define cl_khr_d3d11_sharing 1
|
||||
|
||||
typedef cl_uint cl_d3d11_device_source_khr;
|
||||
typedef cl_uint cl_d3d11_device_set_khr;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_D3D11_DEVICE_KHR -1006
|
||||
#define CL_INVALID_D3D11_RESOURCE_KHR -1007
|
||||
#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
|
||||
#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
|
||||
|
||||
/* cl_d3d11_device_source */
|
||||
#define CL_D3D11_DEVICE_KHR 0x4019
|
||||
#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
|
||||
|
||||
/* cl_d3d11_device_set */
|
||||
#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
|
||||
#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
|
||||
#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_D3D11_RESOURCE_KHR 0x401E
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
|
||||
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_d3d11_device_source_khr d3d_device_source,
|
||||
void * d3d_object,
|
||||
cl_d3d11_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Buffer * resource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture2D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture3D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_D3D11_H */
|
||||
|
||||
132
src/3rdparty/CL/cl_dx9_media_sharing.h
vendored
Normal file
132
src/3rdparty/CL/cl_dx9_media_sharing.h
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
/* cl_khr_dx9_media_sharing */
|
||||
#define cl_khr_dx9_media_sharing 1
|
||||
|
||||
typedef cl_uint cl_dx9_media_adapter_type_khr;
|
||||
typedef cl_uint cl_dx9_media_adapter_set_khr;
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <d3d9.h>
|
||||
typedef struct _cl_dx9_surface_info_khr
|
||||
{
|
||||
IDirect3DSurface9 *resource;
|
||||
HANDLE shared_handle;
|
||||
} cl_dx9_surface_info_khr;
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
|
||||
#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
|
||||
#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
|
||||
#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
|
||||
|
||||
/* cl_media_adapter_type_khr */
|
||||
#define CL_ADAPTER_D3D9_KHR 0x2020
|
||||
#define CL_ADAPTER_D3D9EX_KHR 0x2021
|
||||
#define CL_ADAPTER_DXVA_KHR 0x2022
|
||||
|
||||
/* cl_media_adapter_set_khr */
|
||||
#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
|
||||
#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
|
||||
#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
|
||||
#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
|
||||
#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
|
||||
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_uint num_media_adapters,
|
||||
cl_dx9_media_adapter_type_khr * media_adapter_type,
|
||||
void * media_adapters,
|
||||
cl_dx9_media_adapter_set_khr media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_dx9_media_adapter_type_khr adapter_type,
|
||||
void * surface_info,
|
||||
cl_uint plane,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */
|
||||
|
||||
182
src/3rdparty/CL/cl_dx9_media_sharing_intel.h
vendored
Normal file
182
src/3rdparty/CL/cl_dx9_media_sharing_intel.h
vendored
Normal file
@@ -0,0 +1,182 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE 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 INTEL OR ITS
|
||||
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 THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_dx9_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <d3d9.h>
|
||||
#include <dxvahd.h>
|
||||
#include <wtypes.h>
|
||||
#include <d3d9types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************
|
||||
* cl_intel_dx9_media_sharing extension *
|
||||
****************************************/
|
||||
|
||||
#define cl_intel_dx9_media_sharing 1
|
||||
|
||||
typedef cl_uint cl_dx9_device_source_intel;
|
||||
typedef cl_uint cl_dx9_device_set_intel;
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_DX9_DEVICE_INTEL -1010
|
||||
#define CL_INVALID_DX9_RESOURCE_INTEL -1011
|
||||
#define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -1012
|
||||
#define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -1013
|
||||
|
||||
/* cl_dx9_device_source_intel */
|
||||
#define CL_D3D9_DEVICE_INTEL 0x4022
|
||||
#define CL_D3D9EX_DEVICE_INTEL 0x4070
|
||||
#define CL_DXVA_DEVICE_INTEL 0x4071
|
||||
|
||||
/* cl_dx9_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x4024
|
||||
#define CL_ALL_DEVICES_FOR_DX9_INTEL 0x4025
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D9_DEVICE_INTEL 0x4026
|
||||
#define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x4072
|
||||
#define CL_CONTEXT_DXVA_DEVICE_INTEL 0x4073
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_DX9_RESOURCE_INTEL 0x4027
|
||||
#define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x4074
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_DX9_PLANE_INTEL 0x4075
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A
|
||||
#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B
|
||||
/******************************************************************************/
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromDX9INTEL(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromDX9MediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H */
|
||||
|
||||
132
src/3rdparty/CL/cl_egl.h
vendored
Normal file
132
src/3rdparty/CL/cl_egl.h
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_EGL_H
|
||||
#define __OPENCL_CL_EGL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
|
||||
#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
|
||||
#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
|
||||
#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
|
||||
|
||||
/* Error type for clCreateFromEGLImageKHR */
|
||||
#define CL_INVALID_EGL_OBJECT_KHR -1093
|
||||
#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
|
||||
|
||||
/* CLeglImageKHR is an opaque handle to an EGLImage */
|
||||
typedef void* CLeglImageKHR;
|
||||
|
||||
/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
|
||||
typedef void* CLeglDisplayKHR;
|
||||
|
||||
/* CLeglSyncKHR is an opaque handle to an EGLSync object */
|
||||
typedef void* CLeglSyncKHR;
|
||||
|
||||
/* properties passed to clCreateFromEGLImageKHR */
|
||||
typedef intptr_t cl_egl_image_properties_khr;
|
||||
|
||||
|
||||
#define cl_khr_egl_image 1
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromEGLImageKHR(cl_context context,
|
||||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr * properties,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
|
||||
cl_context context,
|
||||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr * properties,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
#define cl_khr_egl_event 1
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromEGLSyncKHR(cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
|
||||
cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_EGL_H */
|
||||
762
src/3rdparty/CL/cl_ext.h
vendored
Normal file
762
src/3rdparty/CL/cl_ext.h
vendored
Normal file
@@ -0,0 +1,762 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||
/* (OpenGL, D3D) dependencies. */
|
||||
|
||||
#ifndef __CL_EXT_H
|
||||
#define __CL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
/* cl_khr_fp64 extension - no extension #define since it has no functions */
|
||||
/* CL_DEVICE_DOUBLE_FP_CONFIG is defined in CL.h for OpenCL >= 120 */
|
||||
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110
|
||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||
#endif
|
||||
|
||||
/* cl_khr_fp16 extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||
|
||||
/* Memory object destruction
|
||||
*
|
||||
* Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
|
||||
*
|
||||
* Registers a user callback function that will be called when the memory object is deleted and its resources
|
||||
* freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
|
||||
* stack associated with memobj. The registered user callback functions are called in the reverse order in
|
||||
* which they were registered. The user callback functions are called and then the memory object is deleted
|
||||
* and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
|
||||
* notified when the memory referenced by host_ptr, specified when the memory object is created and used as
|
||||
* the storage bits for the memory object, can be reused or freed.
|
||||
*
|
||||
* The application may not call CL api's with the cl_mem object passed to the pfn_notify.
|
||||
*
|
||||
* Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*/
|
||||
#define cl_APPLE_SetMemObjectDestructor 1
|
||||
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem memobj,
|
||||
void (* pfn_notify)(cl_mem memobj, void * user_data),
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Context Logging Functions
|
||||
*
|
||||
* The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
|
||||
* Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*
|
||||
* clLogMessagesToSystemLog forwards on all log messages to the Apple System Logger
|
||||
*/
|
||||
#define cl_APPLE_ContextLoggingFunctions 1
|
||||
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
|
||||
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
|
||||
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/************************
|
||||
* cl_khr_icd extension *
|
||||
************************/
|
||||
#define cl_khr_icd 1
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_PLATFORM_NOT_FOUND_KHR -1001
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clIcdGetPlatformIDsKHR(cl_uint num_entries,
|
||||
cl_platform_id * platforms,
|
||||
cl_uint * num_platforms);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(cl_uint num_entries,
|
||||
cl_platform_id * platforms,
|
||||
cl_uint * num_platforms);
|
||||
|
||||
|
||||
/*******************************
|
||||
* cl_khr_il_program extension *
|
||||
*******************************/
|
||||
#define cl_khr_il_program 1
|
||||
|
||||
/* New property to clGetDeviceInfo for retrieving supported intermediate
|
||||
* languages
|
||||
*/
|
||||
#define CL_DEVICE_IL_VERSION_KHR 0x105B
|
||||
|
||||
/* New property to clGetProgramInfo for retrieving for retrieving the IL of a
|
||||
* program
|
||||
*/
|
||||
#define CL_PROGRAM_IL_KHR 0x1169
|
||||
|
||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||
clCreateProgramWithILKHR(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
typedef CL_API_ENTRY cl_program
|
||||
(CL_API_CALL *clCreateProgramWithILKHR_fn)(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/* Extension: cl_khr_image2d_from_buffer
|
||||
*
|
||||
* This extension allows a 2D image to be created from a cl_mem buffer without
|
||||
* a copy. The type associated with a 2D image created from a buffer in an
|
||||
* OpenCL program is image2d_t. Both the sampler and sampler-less read_image
|
||||
* built-in functions are supported for 2D images and 2D images created from
|
||||
* a buffer. Similarly, the write_image built-ins are also supported for 2D
|
||||
* images created from a buffer.
|
||||
*
|
||||
* When the 2D image from buffer is created, the client must specify the
|
||||
* width, height, image format (i.e. channel order and channel data type)
|
||||
* and optionally the row pitch.
|
||||
*
|
||||
* The pitch specified must be a multiple of
|
||||
* CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR pixels.
|
||||
* The base address of the buffer must be aligned to
|
||||
* CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR pixels.
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR 0x104A
|
||||
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR 0x104B
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_initialize_memory extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_terminate_context extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x2031
|
||||
#define CL_CONTEXT_TERMINATE_KHR 0x2032
|
||||
|
||||
#define cl_khr_terminate_context 1
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clTerminateContextKHR(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clTerminateContextKHR_fn)(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/*
|
||||
* Extension: cl_khr_spir
|
||||
*
|
||||
* This extension adds support to create an OpenCL program object from a
|
||||
* Standard Portable Intermediate Representation (SPIR) instance
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
||||
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
||||
|
||||
|
||||
/*****************************************
|
||||
* cl_khr_create_command_queue extension *
|
||||
*****************************************/
|
||||
#define cl_khr_create_command_queue 1
|
||||
|
||||
typedef cl_bitfield cl_queue_properties_khr;
|
||||
|
||||
extern CL_API_ENTRY cl_command_queue CL_API_CALL
|
||||
clCreateCommandQueueWithPropertiesKHR(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_command_queue
|
||||
(CL_API_CALL *clCreateCommandQueueWithPropertiesKHR_fn)(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_nv_device_attribute_query extension *
|
||||
******************************************/
|
||||
|
||||
/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
|
||||
#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
|
||||
#define CL_DEVICE_WARP_SIZE_NV 0x4003
|
||||
#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
|
||||
#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
|
||||
#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_amd_device_attribute_query *
|
||||
*********************************/
|
||||
|
||||
#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_arm_printf extension
|
||||
*********************************/
|
||||
|
||||
#define CL_PRINTF_CALLBACK_ARM 0x40B0
|
||||
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
|
||||
|
||||
|
||||
/***********************************
|
||||
* cl_ext_device_fission extension
|
||||
***********************************/
|
||||
#define cl_ext_device_fission 1
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clReleaseDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clRetainDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef cl_ulong cl_device_partition_property_ext;
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clCreateSubDevicesEXT(cl_device_id in_device,
|
||||
const cl_device_partition_property_ext * properties,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * out_devices,
|
||||
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL * clCreateSubDevicesEXT_fn)(cl_device_id in_device,
|
||||
const cl_device_partition_property_ext * properties,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * out_devices,
|
||||
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
/* cl_device_partition_property_ext */
|
||||
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
|
||||
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
||||
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
||||
|
||||
/* clDeviceGetInfo selectors */
|
||||
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
||||
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
||||
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
||||
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
||||
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
||||
|
||||
/* error codes */
|
||||
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
||||
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
||||
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
||||
|
||||
/* CL_AFFINITY_DOMAINs */
|
||||
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
||||
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
||||
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
|
||||
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||
|
||||
/* cl_device_partition_property_ext list terminators */
|
||||
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
|
||||
|
||||
|
||||
/***********************************
|
||||
* cl_ext_migrate_memobject extension definitions
|
||||
***********************************/
|
||||
#define cl_ext_migrate_memobject 1
|
||||
|
||||
typedef cl_bitfield cl_mem_migration_flags_ext;
|
||||
|
||||
#define CL_MIGRATE_MEM_OBJECT_HOST_EXT 0x1
|
||||
|
||||
#define CL_COMMAND_MIGRATE_MEM_OBJECT_EXT 0x4040
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMigrateMemObjectEXT(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ext_host_ptr extension
|
||||
*********************************/
|
||||
#define cl_qcom_ext_host_ptr 1
|
||||
|
||||
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
|
||||
|
||||
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
|
||||
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
|
||||
#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
|
||||
#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
|
||||
#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
|
||||
#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
|
||||
#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
|
||||
#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
|
||||
|
||||
typedef cl_uint cl_image_pitch_info_qcom;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceImageInfoQCOM(cl_device_id device,
|
||||
size_t image_width,
|
||||
size_t image_height,
|
||||
const cl_image_format *image_format,
|
||||
cl_image_pitch_info_qcom param_name,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
|
||||
typedef struct _cl_mem_ext_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Legal values will be defined in layered extensions. */
|
||||
cl_uint allocation_type;
|
||||
|
||||
/* Host cache policy for this external memory allocation. */
|
||||
cl_uint host_cache_policy;
|
||||
|
||||
} cl_mem_ext_host_ptr;
|
||||
|
||||
|
||||
/*******************************************
|
||||
* cl_qcom_ext_host_ptr_iocoherent extension
|
||||
********************************************/
|
||||
|
||||
/* Cache policy specifying io-coherence */
|
||||
#define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ion_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
|
||||
|
||||
typedef struct _cl_mem_ion_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* ION file descriptor */
|
||||
int ion_filedesc;
|
||||
|
||||
/* Host pointer to the ION allocated memory */
|
||||
void* ion_hostptr;
|
||||
|
||||
} cl_mem_ion_host_ptr;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_android_native_buffer_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM 0x40C6
|
||||
|
||||
typedef struct _cl_mem_android_native_buffer_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM for Android native buffers. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* Virtual pointer to the android native buffer */
|
||||
void* anb_ptr;
|
||||
|
||||
} cl_mem_android_native_buffer_host_ptr;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_yuv_image extension *
|
||||
******************************************/
|
||||
|
||||
/* Image formats used in clCreateImage */
|
||||
#define CL_NV21_IMG 0x40D0
|
||||
#define CL_YV12_IMG 0x40D1
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_cached_allocations extension *
|
||||
******************************************/
|
||||
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
|
||||
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_use_gralloc_ptr extension *
|
||||
******************************************/
|
||||
#define cl_img_use_gralloc_ptr 1
|
||||
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||
#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
|
||||
|
||||
/* Error code from clEnqueueReleaseGrallocObjectsIMG */
|
||||
#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_subgroups extension
|
||||
*********************************/
|
||||
#define cl_khr_subgroups 1
|
||||
|
||||
#if !defined(CL_VERSION_2_1)
|
||||
/* For OpenCL 2.1 and newer, cl_kernel_sub_group_info is declared in CL.h.
|
||||
In hindsight, there should have been a khr suffix on this type for
|
||||
the extension, but keeping it un-suffixed to maintain backwards
|
||||
compatibility. */
|
||||
typedef cl_uint cl_kernel_sub_group_info;
|
||||
#endif
|
||||
|
||||
/* cl_kernel_sub_group_info */
|
||||
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
||||
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetKernelSubGroupInfoKHR(cl_kernel in_kernel,
|
||||
cl_device_id in_device,
|
||||
cl_kernel_sub_group_info param_name,
|
||||
size_t input_value_size,
|
||||
const void * input_value,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel in_kernel,
|
||||
cl_device_id in_device,
|
||||
cl_kernel_sub_group_info param_name,
|
||||
size_t input_value_size,
|
||||
const void * input_value,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_mipmap_image extension
|
||||
*********************************/
|
||||
|
||||
/* cl_sampler_properties */
|
||||
#define CL_SAMPLER_MIP_FILTER_MODE_KHR 0x1155
|
||||
#define CL_SAMPLER_LOD_MIN_KHR 0x1156
|
||||
#define CL_SAMPLER_LOD_MAX_KHR 0x1157
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_priority_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_priority_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_priority_khr;
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_PRIORITY_KHR 0x1096
|
||||
|
||||
/* cl_queue_priority_khr */
|
||||
#define CL_QUEUE_PRIORITY_HIGH_KHR (1<<0)
|
||||
#define CL_QUEUE_PRIORITY_MED_KHR (1<<1)
|
||||
#define CL_QUEUE_PRIORITY_LOW_KHR (1<<2)
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_throttle_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_throttle_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_throttle_khr;
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_THROTTLE_KHR 0x1097
|
||||
|
||||
/* cl_queue_throttle_khr */
|
||||
#define CL_QUEUE_THROTTLE_HIGH_KHR (1<<0)
|
||||
#define CL_QUEUE_THROTTLE_MED_KHR (1<<1)
|
||||
#define CL_QUEUE_THROTTLE_LOW_KHR (1<<2)
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_subgroup_named_barrier
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_subgroup_named_barrier 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035
|
||||
|
||||
|
||||
/**********************************
|
||||
* cl_arm_import_memory extension *
|
||||
**********************************/
|
||||
#define cl_arm_import_memory 1
|
||||
|
||||
typedef intptr_t cl_import_properties_arm;
|
||||
|
||||
/* Default and valid proporties name for cl_arm_import_memory */
|
||||
#define CL_IMPORT_TYPE_ARM 0x40B2
|
||||
|
||||
/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
|
||||
|
||||
/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
|
||||
|
||||
/* Protected DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_PROTECTED_ARM 0x40B5
|
||||
|
||||
/* This extension adds a new function that allows for direct memory import into
|
||||
* OpenCL via the clImportMemoryARM function.
|
||||
*
|
||||
* Memory imported through this interface will be mapped into the device's page
|
||||
* tables directly, providing zero copy access. It will never fall back to copy
|
||||
* operations and aliased buffers.
|
||||
*
|
||||
* Types of memory supported for import are specified as additional extension
|
||||
* strings.
|
||||
*
|
||||
* This extension produces cl_mem allocations which are compatible with all other
|
||||
* users of cl_mem in the standard API.
|
||||
*
|
||||
* This extension maps pages with the same properties as the normal buffer creation
|
||||
* function clCreateBuffer.
|
||||
*/
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clImportMemoryARM( cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_import_properties_arm *properties,
|
||||
void *memory,
|
||||
size_t size,
|
||||
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_arm_shared_virtual_memory extension *
|
||||
******************************************/
|
||||
#define cl_arm_shared_virtual_memory 1
|
||||
|
||||
/* Used by clGetDeviceInfo */
|
||||
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||
|
||||
/* Used by clGetMemObjectInfo */
|
||||
#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
|
||||
|
||||
/* Used by clSetKernelExecInfoARM: */
|
||||
#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
|
||||
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_SVM_FREE_ARM 0x40BA
|
||||
#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
|
||||
#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
|
||||
#define CL_COMMAND_SVM_MAP_ARM 0x40BD
|
||||
#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
|
||||
|
||||
/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
|
||||
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
|
||||
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
|
||||
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
|
||||
#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
|
||||
|
||||
/* Flag values used by clSVMAllocARM: */
|
||||
#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
|
||||
#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
|
||||
|
||||
typedef cl_bitfield cl_svm_mem_flags_arm;
|
||||
typedef cl_uint cl_kernel_exec_info_arm;
|
||||
typedef cl_bitfield cl_device_svm_capabilities_arm;
|
||||
|
||||
extern CL_API_ENTRY void * CL_API_CALL
|
||||
clSVMAllocARM(cl_context context,
|
||||
cl_svm_mem_flags_arm flags,
|
||||
size_t size,
|
||||
cl_uint alignment) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY void CL_API_CALL
|
||||
clSVMFreeARM(cl_context context,
|
||||
void * svm_pointer) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMFreeARM(cl_command_queue command_queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void * svm_pointers[],
|
||||
void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void * svm_pointers[],
|
||||
void * user_data),
|
||||
void * user_data,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMemcpyARM(cl_command_queue command_queue,
|
||||
cl_bool blocking_copy,
|
||||
void * dst_ptr,
|
||||
const void * src_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMemFillARM(cl_command_queue command_queue,
|
||||
void * svm_ptr,
|
||||
const void * pattern,
|
||||
size_t pattern_size,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMapARM(cl_command_queue command_queue,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags flags,
|
||||
void * svm_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMUnmapARM(cl_command_queue command_queue,
|
||||
void * svm_ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelArgSVMPointerARM(cl_kernel kernel,
|
||||
cl_uint arg_index,
|
||||
const void * arg_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelExecInfoARM(cl_kernel kernel,
|
||||
cl_kernel_exec_info_arm param_name,
|
||||
size_t param_value_size,
|
||||
const void * param_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/********************************
|
||||
* cl_arm_get_core_id extension *
|
||||
********************************/
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
#define cl_arm_get_core_id 1
|
||||
|
||||
/* Device info property for bitfield of cores present */
|
||||
#define CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM 0x40BF
|
||||
|
||||
#endif /* CL_VERSION_1_2 */
|
||||
|
||||
/*********************************
|
||||
* cl_arm_job_slot_selection
|
||||
*********************************/
|
||||
|
||||
#define cl_arm_job_slot_selection 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_JOB_SLOTS_ARM 0x41E0
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_JOB_SLOT_ARM 0x41E1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __CL_EXT_H */
|
||||
423
src/3rdparty/CL/cl_ext_intel.h
vendored
Normal file
423
src/3rdparty/CL/cl_ext_intel.h
vendored
Normal file
@@ -0,0 +1,423 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE 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 INTEL OR ITS
|
||||
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 THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_ext_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __CL_EXT_INTEL_H
|
||||
#define __CL_EXT_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************
|
||||
* cl_intel_thread_local_exec extension *
|
||||
****************************************/
|
||||
|
||||
#define cl_intel_thread_local_exec 1
|
||||
|
||||
#define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL (((cl_bitfield)1) << 31)
|
||||
|
||||
/***********************************************
|
||||
* cl_intel_device_partition_by_names extension *
|
||||
************************************************/
|
||||
|
||||
#define cl_intel_device_partition_by_names 1
|
||||
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1
|
||||
|
||||
/************************************************
|
||||
* cl_intel_accelerator extension *
|
||||
* cl_intel_motion_estimation extension *
|
||||
* cl_intel_advanced_motion_estimation extension *
|
||||
*************************************************/
|
||||
|
||||
#define cl_intel_accelerator 1
|
||||
#define cl_intel_motion_estimation 1
|
||||
#define cl_intel_advanced_motion_estimation 1
|
||||
|
||||
typedef struct _cl_accelerator_intel* cl_accelerator_intel;
|
||||
typedef cl_uint cl_accelerator_type_intel;
|
||||
typedef cl_uint cl_accelerator_info_intel;
|
||||
|
||||
typedef struct _cl_motion_estimation_desc_intel {
|
||||
cl_uint mb_block_type;
|
||||
cl_uint subpixel_mode;
|
||||
cl_uint sad_adjust_mode;
|
||||
cl_uint search_path_type;
|
||||
} cl_motion_estimation_desc_intel;
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_ACCELERATOR_INTEL -1094
|
||||
#define CL_INVALID_ACCELERATOR_TYPE_INTEL -1095
|
||||
#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL -1096
|
||||
#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097
|
||||
|
||||
/* cl_accelerator_type_intel */
|
||||
#define CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL 0x0
|
||||
|
||||
/* cl_accelerator_info_intel */
|
||||
#define CL_ACCELERATOR_DESCRIPTOR_INTEL 0x4090
|
||||
#define CL_ACCELERATOR_REFERENCE_COUNT_INTEL 0x4091
|
||||
#define CL_ACCELERATOR_CONTEXT_INTEL 0x4092
|
||||
#define CL_ACCELERATOR_TYPE_INTEL 0x4093
|
||||
|
||||
/* cl_motion_detect_desc_intel flags */
|
||||
#define CL_ME_MB_TYPE_16x16_INTEL 0x0
|
||||
#define CL_ME_MB_TYPE_8x8_INTEL 0x1
|
||||
#define CL_ME_MB_TYPE_4x4_INTEL 0x2
|
||||
|
||||
#define CL_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CL_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CL_ME_SUBPIXEL_MODE_QPEL_INTEL 0x2
|
||||
|
||||
#define CL_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CL_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x1
|
||||
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_2_2_INTEL 0x0
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_4_4_INTEL 0x1
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_16_12_INTEL 0x5
|
||||
|
||||
#define CL_ME_SKIP_BLOCK_TYPE_16x16_INTEL 0x0
|
||||
#define CL_ME_CHROMA_INTRA_PREDICT_ENABLED_INTEL 0x1
|
||||
#define CL_ME_LUMA_INTRA_PREDICT_ENABLED_INTEL 0x2
|
||||
#define CL_ME_SKIP_BLOCK_TYPE_8x8_INTEL 0x4
|
||||
|
||||
#define CL_ME_FORWARD_INPUT_MODE_INTEL 0x1
|
||||
#define CL_ME_BACKWARD_INPUT_MODE_INTEL 0x2
|
||||
#define CL_ME_BIDIRECTION_INPUT_MODE_INTEL 0x3
|
||||
|
||||
#define CL_ME_BIDIR_WEIGHT_QUARTER_INTEL 16
|
||||
#define CL_ME_BIDIR_WEIGHT_THIRD_INTEL 21
|
||||
#define CL_ME_BIDIR_WEIGHT_HALF_INTEL 32
|
||||
#define CL_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 43
|
||||
#define CL_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 48
|
||||
|
||||
#define CL_ME_COST_PENALTY_NONE_INTEL 0x0
|
||||
#define CL_ME_COST_PENALTY_LOW_INTEL 0x1
|
||||
#define CL_ME_COST_PENALTY_NORMAL_INTEL 0x2
|
||||
#define CL_ME_COST_PENALTY_HIGH_INTEL 0x3
|
||||
|
||||
#define CL_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CL_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CL_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CL_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_ME_VERSION_INTEL 0x407E
|
||||
|
||||
#define CL_ME_VERSION_LEGACY_INTEL 0x0
|
||||
#define CL_ME_VERSION_ADVANCED_VER_1_INTEL 0x1
|
||||
#define CL_ME_VERSION_ADVANCED_VER_2_INTEL 0x2
|
||||
|
||||
extern CL_API_ENTRY cl_accelerator_intel CL_API_CALL
|
||||
clCreateAcceleratorINTEL(
|
||||
cl_context context,
|
||||
cl_accelerator_type_intel accelerator_type,
|
||||
size_t descriptor_size,
|
||||
const void* descriptor,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_accelerator_intel (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_accelerator_type_intel accelerator_type,
|
||||
size_t descriptor_size,
|
||||
const void* descriptor,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetAcceleratorInfoINTEL(
|
||||
cl_accelerator_intel accelerator,
|
||||
cl_accelerator_info_intel param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
|
||||
cl_accelerator_intel accelerator,
|
||||
cl_accelerator_info_intel param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainAcceleratorINTEL(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseAcceleratorINTEL(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/******************************************
|
||||
* cl_intel_simultaneous_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_simultaneous_sharing 1
|
||||
|
||||
#define CL_DEVICE_SIMULTANEOUS_INTEROPS_INTEL 0x4104
|
||||
#define CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL 0x4105
|
||||
|
||||
/***********************************
|
||||
* cl_intel_egl_image_yuv extension *
|
||||
************************************/
|
||||
|
||||
#define cl_intel_egl_image_yuv 1
|
||||
|
||||
#define CL_EGL_YUV_PLANE_INTEL 0x4107
|
||||
|
||||
/********************************
|
||||
* cl_intel_packed_yuv extension *
|
||||
*********************************/
|
||||
|
||||
#define cl_intel_packed_yuv 1
|
||||
|
||||
#define CL_YUYV_INTEL 0x4076
|
||||
#define CL_UYVY_INTEL 0x4077
|
||||
#define CL_YVYU_INTEL 0x4078
|
||||
#define CL_VYUY_INTEL 0x4079
|
||||
|
||||
/********************************************
|
||||
* cl_intel_required_subgroup_size extension *
|
||||
*********************************************/
|
||||
|
||||
#define cl_intel_required_subgroup_size 1
|
||||
|
||||
#define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108
|
||||
#define CL_KERNEL_SPILL_MEM_SIZE_INTEL 0x4109
|
||||
#define CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL 0x410A
|
||||
|
||||
/****************************************
|
||||
* cl_intel_driver_diagnostics extension *
|
||||
*****************************************/
|
||||
|
||||
#define cl_intel_driver_diagnostics 1
|
||||
|
||||
typedef cl_uint cl_diagnostics_verbose_level;
|
||||
|
||||
#define CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL 0x4106
|
||||
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL ( 0xff )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL ( 1 )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL ( 1 << 1 )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL ( 1 << 2 )
|
||||
|
||||
/********************************
|
||||
* cl_intel_planar_yuv extension *
|
||||
*********************************/
|
||||
|
||||
#define CL_NV12_INTEL 0x410E
|
||||
|
||||
#define CL_MEM_NO_ACCESS_INTEL ( 1 << 24 )
|
||||
#define CL_MEM_ACCESS_FLAGS_UNRESTRICTED_INTEL ( 1 << 25 )
|
||||
|
||||
#define CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL 0x417E
|
||||
#define CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL 0x417F
|
||||
|
||||
/*******************************************************
|
||||
* cl_intel_device_side_avc_motion_estimation extension *
|
||||
********************************************************/
|
||||
|
||||
#define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B
|
||||
#define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C
|
||||
#define CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL 0x410D
|
||||
|
||||
#define CL_AVC_ME_VERSION_0_INTEL 0x0; // No support.
|
||||
#define CL_AVC_ME_VERSION_1_INTEL 0x1; // First supported version.
|
||||
|
||||
#define CL_AVC_ME_MAJOR_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_MAJOR_16x8_INTEL 0x1
|
||||
#define CL_AVC_ME_MAJOR_8x16_INTEL 0x2
|
||||
#define CL_AVC_ME_MAJOR_8x8_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_MINOR_8x8_INTEL 0x0
|
||||
#define CL_AVC_ME_MINOR_8x4_INTEL 0x1
|
||||
#define CL_AVC_ME_MINOR_4x8_INTEL 0x2
|
||||
#define CL_AVC_ME_MINOR_4x4_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_MAJOR_FORWARD_INTEL 0x0
|
||||
#define CL_AVC_ME_MAJOR_BACKWARD_INTEL 0x1
|
||||
#define CL_AVC_ME_MAJOR_BIDIRECTIONAL_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_PARTITION_MASK_ALL_INTEL 0x0
|
||||
#define CL_AVC_ME_PARTITION_MASK_16x16_INTEL 0x7E
|
||||
#define CL_AVC_ME_PARTITION_MASK_16x8_INTEL 0x7D
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x16_INTEL 0x7B
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x8_INTEL 0x77
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x4_INTEL 0x6F
|
||||
#define CL_AVC_ME_PARTITION_MASK_4x8_INTEL 0x5F
|
||||
#define CL_AVC_ME_PARTITION_MASK_4x4_INTEL 0x3F
|
||||
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_EXHAUSTIVE_INTEL 0x0
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_SMALL_INTEL 0x1
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_TINY_INTEL 0x2
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_EXTRA_TINY_INTEL 0x3
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_DIAMOND_INTEL 0x4
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_LARGE_DIAMOND_INTEL 0x5
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_RESERVED0_INTEL 0x6
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_RESERVED1_INTEL 0x7
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_CUSTOM_INTEL 0x8
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_16x12_RADIUS_INTEL 0x9
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_4x4_RADIUS_INTEL 0x2
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_2x2_RADIUS_INTEL 0xa
|
||||
|
||||
#define CL_AVC_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CL_AVC_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_QPEL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CL_AVC_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CL_AVC_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CL_AVC_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_QUARTER_INTEL 0x10
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_THIRD_INTEL 0x15
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_HALF_INTEL 0x20
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 0x2B
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 0x30
|
||||
|
||||
#define CL_AVC_ME_BORDER_REACHED_LEFT_INTEL 0x0
|
||||
#define CL_AVC_ME_BORDER_REACHED_RIGHT_INTEL 0x2
|
||||
#define CL_AVC_ME_BORDER_REACHED_TOP_INTEL 0x4
|
||||
#define CL_AVC_ME_BORDER_REACHED_BOTTOM_INTEL 0x8
|
||||
|
||||
#define CL_AVC_ME_SKIP_BLOCK_PARTITION_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_SKIP_BLOCK_PARTITION_8x8_INTEL 0x4000
|
||||
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_DUAL_ENABLE_INTEL ( 0x3 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_FORWARD_ENABLE_INTEL ( 0x55 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_BACKWARD_ENABLE_INTEL ( 0xAA << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_DUAL_ENABLE_INTEL ( 0xFF << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_0_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_0_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_1_FORWARD_ENABLE_INTEL ( 0x1 << 26 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_1_BACKWARD_ENABLE_INTEL ( 0x2 << 26 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_2_FORWARD_ENABLE_INTEL ( 0x1 << 28 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_2_BACKWARD_ENABLE_INTEL ( 0x2 << 28 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_3_FORWARD_ENABLE_INTEL ( 0x1 << 30 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_3_BACKWARD_ENABLE_INTEL ( 0x2 << 30 )
|
||||
|
||||
#define CL_AVC_ME_BLOCK_BASED_SKIP_4x4_INTEL 0x00
|
||||
#define CL_AVC_ME_BLOCK_BASED_SKIP_8x8_INTEL 0x80
|
||||
|
||||
#define CL_AVC_ME_INTRA_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_INTRA_8x8_INTEL 0x1
|
||||
#define CL_AVC_ME_INTRA_4x4_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_16x16_INTEL 0x6
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_8x8_INTEL 0x5
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_4x4_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_LEFT_MASK_ENABLE_INTEL 0x60
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_MASK_ENABLE_INTEL 0x10
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_RIGHT_MASK_ENABLE_INTEL 0x8
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_LEFT_MASK_ENABLE_INTEL 0x4
|
||||
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_FRAME_FORWARD_INTEL 0x1
|
||||
#define CL_AVC_ME_FRAME_BACKWARD_INTEL 0x2
|
||||
#define CL_AVC_ME_FRAME_DUAL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_SLICE_TYPE_PRED_INTEL 0x0
|
||||
#define CL_AVC_ME_SLICE_TYPE_BPRED_INTEL 0x1
|
||||
#define CL_AVC_ME_SLICE_TYPE_INTRA_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_INTERLACED_SCAN_TOP_FIELD_INTEL 0x0
|
||||
#define CL_AVC_ME_INTERLACED_SCAN_BOTTOM_FIELD_INTEL 0x1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CL_EXT_INTEL_H */
|
||||
171
src/3rdparty/CL/cl_gl.h
vendored
Normal file
171
src/3rdparty/CL/cl_gl.h
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_H
|
||||
#define __OPENCL_CL_GL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef cl_uint cl_gl_object_type;
|
||||
typedef cl_uint cl_gl_texture_info;
|
||||
typedef cl_uint cl_gl_platform_info;
|
||||
typedef struct __GLsync *cl_GLsync;
|
||||
|
||||
/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */
|
||||
#define CL_GL_OBJECT_BUFFER 0x2000
|
||||
#define CL_GL_OBJECT_TEXTURE2D 0x2001
|
||||
#define CL_GL_OBJECT_TEXTURE3D 0x2002
|
||||
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
|
||||
#define CL_GL_OBJECT_TEXTURE1D 0x200F
|
||||
#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
|
||||
#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
|
||||
#endif
|
||||
|
||||
/* cl_gl_texture_info */
|
||||
#define CL_GL_TEXTURE_TARGET 0x2004
|
||||
#define CL_GL_MIPMAP_LEVEL 0x2005
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_NUM_SAMPLES 0x2012
|
||||
#endif
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLBuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint bufobj,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLRenderbuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint renderbuffer,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLObjectInfo(cl_mem memobj,
|
||||
cl_gl_object_type * gl_object_type,
|
||||
cl_GLuint * gl_object_name) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLTextureInfo(cl_mem memobj,
|
||||
cl_gl_texture_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGLObjects(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGLObjects(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Deprecated OpenCL 1.1 APIs */
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture2D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture3D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
/* cl_khr_gl_sharing extension */
|
||||
|
||||
#define cl_khr_gl_sharing 1
|
||||
|
||||
typedef cl_uint cl_gl_context_info;
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
|
||||
|
||||
/* cl_gl_context_info */
|
||||
#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
|
||||
#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
|
||||
|
||||
/* Additional cl_context_properties */
|
||||
#define CL_GL_CONTEXT_KHR 0x2008
|
||||
#define CL_EGL_DISPLAY_KHR 0x2009
|
||||
#define CL_GLX_DISPLAY_KHR 0x200A
|
||||
#define CL_WGL_HDC_KHR 0x200B
|
||||
#define CL_CGL_SHAREGROUP_KHR 0x200C
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLContextInfoKHR(const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
|
||||
const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_H */
|
||||
52
src/3rdparty/CL/cl_gl_ext.h
vendored
Normal file
52
src/3rdparty/CL/cl_gl_ext.h
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_EXT_H
|
||||
#define __OPENCL_CL_GL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl_gl.h>
|
||||
|
||||
/*
|
||||
* cl_khr_gl_event extension
|
||||
*/
|
||||
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromGLsyncKHR(cl_context context,
|
||||
cl_GLsync cl_GLsync,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_EXT_H */
|
||||
1384
src/3rdparty/CL/cl_platform.h
vendored
Normal file
1384
src/3rdparty/CL/cl_platform.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
172
src/3rdparty/CL/cl_va_api_media_sharing_intel.h
vendored
Normal file
172
src/3rdparty/CL/cl_va_api_media_sharing_intel.h
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE 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 INTEL OR ITS
|
||||
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 THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_va_api_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <va/va.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************
|
||||
* cl_intel_va_api_media_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_va_api_media_sharing 1
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
|
||||
#define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
|
||||
#define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
|
||||
#define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
|
||||
|
||||
/* cl_va_api_device_source_intel */
|
||||
#define CL_VA_API_DISPLAY_INTEL 0x4094
|
||||
|
||||
/* cl_va_api_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
|
||||
#define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
|
||||
#define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
|
||||
|
||||
typedef cl_uint cl_va_api_device_source_intel;
|
||||
typedef cl_uint cl_va_api_device_set_intel;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromVA_APIMediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */
|
||||
|
||||
86
src/3rdparty/CL/cl_version.h
vendored
Normal file
86
src/3rdparty/CL/cl_version.h
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2018 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __CL_VERSION_H
|
||||
#define __CL_VERSION_H
|
||||
|
||||
/* Detect which version to target */
|
||||
#if !defined(CL_TARGET_OPENCL_VERSION)
|
||||
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION != 100 && \
|
||||
CL_TARGET_OPENCL_VERSION != 110 && \
|
||||
CL_TARGET_OPENCL_VERSION != 120 && \
|
||||
CL_TARGET_OPENCL_VERSION != 200 && \
|
||||
CL_TARGET_OPENCL_VERSION != 210 && \
|
||||
CL_TARGET_OPENCL_VERSION != 220
|
||||
#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220). Defaulting to 220 (OpenCL 2.2)")
|
||||
#undef CL_TARGET_OPENCL_VERSION
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
|
||||
|
||||
/* OpenCL Version */
|
||||
#if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
|
||||
#define CL_VERSION_2_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
|
||||
#define CL_VERSION_2_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
|
||||
#define CL_VERSION_2_0 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
|
||||
#define CL_VERSION_1_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
|
||||
#define CL_VERSION_1_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
|
||||
#define CL_VERSION_1_0 1
|
||||
#endif
|
||||
|
||||
/* Allow deprecated APIs for older OpenCL versions. */
|
||||
#if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#endif
|
||||
|
||||
#endif /* __CL_VERSION_H */
|
||||
47
src/3rdparty/CL/opencl.h
vendored
Normal file
47
src/3rdparty/CL/opencl.h
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_H
|
||||
#define __OPENCL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_gl.h>
|
||||
#include <CL/cl_gl_ext.h>
|
||||
#include <CL/cl_ext.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_H */
|
||||
2342
src/3rdparty/adl/adl_defines.h
vendored
Normal file
2342
src/3rdparty/adl/adl_defines.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
44
src/3rdparty/adl/adl_sdk.h
vendored
Normal file
44
src/3rdparty/adl/adl_sdk.h
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// MIT LICENSE:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
/// \file adl_sdk.h
|
||||
/// \brief Contains the definition of the Memory Allocation Callback.\n <b>Included in ADL SDK</b>
|
||||
///
|
||||
/// \n\n
|
||||
/// This file contains the definition of the Memory Allocation Callback.\n
|
||||
/// It also includes definitions of the respective structures and constants.\n
|
||||
/// <b> This is the only header file to be included in a C/C++ project using ADL </b>
|
||||
|
||||
#ifndef ADL_SDK_H_
|
||||
#define ADL_SDK_H_
|
||||
|
||||
#include "adl_structures.h"
|
||||
|
||||
#if defined (LINUX)
|
||||
#define __stdcall
|
||||
#endif /* (LINUX) */
|
||||
|
||||
/// Memory Allocation Call back
|
||||
typedef void* ( __stdcall *ADL_MAIN_MALLOC_CALLBACK )( int );
|
||||
|
||||
|
||||
#endif /* ADL_SDK_H_ */
|
||||
3440
src/3rdparty/adl/adl_structures.h
vendored
Normal file
3440
src/3rdparty/adl/adl_structures.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
src/3rdparty/argon2/CMakeLists.txt
vendored
6
src/3rdparty/argon2/CMakeLists.txt
vendored
@@ -22,7 +22,7 @@ set(ARGON2_X86_64_SOURCES arch/x86_64/lib/argon2-arch.c arch/x86_64/lib/cpu-flag
|
||||
if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
||||
function(add_feature_impl FEATURE MSVC_FLAG DEF)
|
||||
add_library(argon2-${FEATURE} STATIC arch/x86_64/lib/argon2-${FEATURE}.c)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
set_target_properties(argon2-${FEATURE} PROPERTIES POSITION_INDEPENDENT_CODE True)
|
||||
|
||||
@@ -38,7 +38,7 @@ if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
||||
elseif (NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
function(add_feature_impl FEATURE GCC_FLAG DEF)
|
||||
add_library(argon2-${FEATURE} STATIC arch/x86_64/lib/argon2-${FEATURE}.c)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
set_target_properties(argon2-${FEATURE} PROPERTIES POSITION_INDEPENDENT_CODE True)
|
||||
|
||||
@@ -84,5 +84,5 @@ endif()
|
||||
add_library(argon2 STATIC ${ARGON2_SOURCES})
|
||||
target_link_libraries(argon2 ${ARGON2_LIBS})
|
||||
|
||||
target_include_directories(argon2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_include_directories(argon2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
target_include_directories(argon2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
|
||||
2
src/3rdparty/argon2/lib/argon2.c
vendored
2
src/3rdparty/argon2/lib/argon2.c
vendored
@@ -15,7 +15,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "argon2.h"
|
||||
#include "3rdparty/argon2.h"
|
||||
#include "encoding.h"
|
||||
#include "core.h"
|
||||
|
||||
|
||||
2
src/3rdparty/argon2/lib/core.h
vendored
2
src/3rdparty/argon2/lib/core.h
vendored
@@ -14,7 +14,7 @@
|
||||
#ifndef ARGON2_CORE_H
|
||||
#define ARGON2_CORE_H
|
||||
|
||||
#include "argon2.h"
|
||||
#include "3rdparty/argon2.h"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define ALIGN(n) __declspec(align(16))
|
||||
|
||||
2
src/3rdparty/argon2/lib/encoding.h
vendored
2
src/3rdparty/argon2/lib/encoding.h
vendored
@@ -1,6 +1,6 @@
|
||||
#ifndef ENCODING_H
|
||||
#define ENCODING_H
|
||||
#include "argon2.h"
|
||||
#include "3rdparty/argon2.h"
|
||||
|
||||
#define ARGON2_MAX_DECODED_LANES UINT32_C(255)
|
||||
#define ARGON2_MIN_DECODED_SALT_LEN UINT32_C(8)
|
||||
|
||||
2
src/3rdparty/argon2/lib/impl-select.c
vendored
2
src/3rdparty/argon2/lib/impl-select.c
vendored
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "impl-select.h"
|
||||
|
||||
#include "argon2.h"
|
||||
#include "3rdparty/argon2.h"
|
||||
|
||||
#define BENCH_SAMPLES 1024
|
||||
#define BENCH_MEM_BLOCKS 512
|
||||
|
||||
68
src/3rdparty/base32/base32.h
vendored
Normal file
68
src/3rdparty/base32/base32.h
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
// Base32 implementation
|
||||
//
|
||||
// Copyright 2010 Google Inc.
|
||||
// Author: Markus Gutschke
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Encode and decode from base32 encoding using the following alphabet:
|
||||
// ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
|
||||
// This alphabet is documented in RFC 4648/3548
|
||||
//
|
||||
// We allow white-space and hyphens, but all other characters are considered
|
||||
// invalid.
|
||||
//
|
||||
// All functions return the number of output bytes or -1 on error. If the
|
||||
// output buffer is too small, the result will silently be truncated.
|
||||
|
||||
#ifndef XMRIG_BASE32_H
|
||||
#define XMRIG_BASE32_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
int base32_encode(const uint8_t *data, int length, uint8_t *result, int bufSize) {
|
||||
if (length < 0 || length > (1 << 28)) {
|
||||
return -1;
|
||||
}
|
||||
int count = 0;
|
||||
if (length > 0) {
|
||||
int buffer = data[0];
|
||||
int next = 1;
|
||||
int bitsLeft = 8;
|
||||
while (count < bufSize && (bitsLeft > 0 || next < length)) {
|
||||
if (bitsLeft < 5) {
|
||||
if (next < length) {
|
||||
buffer <<= 8;
|
||||
buffer |= data[next++] & 0xFF;
|
||||
bitsLeft += 8;
|
||||
} else {
|
||||
int pad = 5 - bitsLeft;
|
||||
buffer <<= pad;
|
||||
bitsLeft += pad;
|
||||
}
|
||||
}
|
||||
int index = 0x1F & (buffer >> (bitsLeft - 5));
|
||||
bitsLeft -= 5;
|
||||
result[count++] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"[index];
|
||||
}
|
||||
}
|
||||
if (count < bufSize) {
|
||||
result[count] = '\000';
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
#endif /* XMRIG_BASE32_H */
|
||||
36
src/3rdparty/cl.h
vendored
Normal file
36
src/3rdparty/cl.h
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef XMRIG_CL_H
|
||||
#define XMRIG_CL_H
|
||||
|
||||
|
||||
#if defined(__APPLE__)
|
||||
# include <OpenCL/cl.h>
|
||||
#else
|
||||
# include "3rdparty/CL/cl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* XMRIG_CL_H */
|
||||
128
src/3rdparty/http-parser/http_parser.c
vendored
128
src/3rdparty/http-parser/http_parser.c
vendored
@@ -381,7 +381,10 @@ enum header_states
|
||||
, h_transfer_encoding
|
||||
, h_upgrade
|
||||
|
||||
, h_matching_transfer_encoding_token_start
|
||||
, h_matching_transfer_encoding_chunked
|
||||
, h_matching_transfer_encoding_token
|
||||
|
||||
, h_matching_connection_token_start
|
||||
, h_matching_connection_keep_alive
|
||||
, h_matching_connection_close
|
||||
@@ -1257,9 +1260,9 @@ reexecute:
|
||||
|
||||
switch (parser->header_state) {
|
||||
case h_general: {
|
||||
size_t limit = data + len - p;
|
||||
limit = MIN(limit, max_header_size);
|
||||
while (p+1 < data + limit && TOKEN(p[1])) {
|
||||
size_t left = data + len - p;
|
||||
const char* pe = p + MIN(left, max_header_size);
|
||||
while (p+1 < pe && TOKEN(p[1])) {
|
||||
p++;
|
||||
}
|
||||
break;
|
||||
@@ -1335,6 +1338,7 @@ reexecute:
|
||||
parser->header_state = h_general;
|
||||
} else if (parser->index == sizeof(TRANSFER_ENCODING)-2) {
|
||||
parser->header_state = h_transfer_encoding;
|
||||
parser->flags |= F_TRANSFER_ENCODING;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1416,10 +1420,14 @@ reexecute:
|
||||
if ('c' == c) {
|
||||
parser->header_state = h_matching_transfer_encoding_chunked;
|
||||
} else {
|
||||
parser->header_state = h_general;
|
||||
parser->header_state = h_matching_transfer_encoding_token;
|
||||
}
|
||||
break;
|
||||
|
||||
/* Multi-value `Transfer-Encoding` header */
|
||||
case h_matching_transfer_encoding_token_start:
|
||||
break;
|
||||
|
||||
case h_content_length:
|
||||
if (UNLIKELY(!IS_NUM(ch))) {
|
||||
SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
|
||||
@@ -1496,28 +1504,25 @@ reexecute:
|
||||
|
||||
switch (h_state) {
|
||||
case h_general:
|
||||
{
|
||||
const char* p_cr;
|
||||
const char* p_lf;
|
||||
size_t limit = data + len - p;
|
||||
{
|
||||
size_t left = data + len - p;
|
||||
const char* pe = p + MIN(left, max_header_size);
|
||||
|
||||
limit = MIN(limit, max_header_size);
|
||||
|
||||
p_cr = (const char*) memchr(p, CR, limit);
|
||||
p_lf = (const char*) memchr(p, LF, limit);
|
||||
if (p_cr != NULL) {
|
||||
if (p_lf != NULL && p_cr >= p_lf)
|
||||
p = p_lf;
|
||||
else
|
||||
p = p_cr;
|
||||
} else if (UNLIKELY(p_lf != NULL)) {
|
||||
p = p_lf;
|
||||
} else {
|
||||
p = data + len;
|
||||
for (; p != pe; p++) {
|
||||
ch = *p;
|
||||
if (ch == CR || ch == LF) {
|
||||
--p;
|
||||
break;
|
||||
}
|
||||
if (!lenient && !IS_HEADER_CHAR(ch)) {
|
||||
SET_ERRNO(HPE_INVALID_HEADER_TOKEN);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
if (p == data + len)
|
||||
--p;
|
||||
break;
|
||||
}
|
||||
--p;
|
||||
break;
|
||||
}
|
||||
|
||||
case h_connection:
|
||||
case h_transfer_encoding:
|
||||
@@ -1566,16 +1571,41 @@ reexecute:
|
||||
goto error;
|
||||
|
||||
/* Transfer-Encoding: chunked */
|
||||
case h_matching_transfer_encoding_token_start:
|
||||
/* looking for 'Transfer-Encoding: chunked' */
|
||||
if ('c' == c) {
|
||||
h_state = h_matching_transfer_encoding_chunked;
|
||||
} else if (STRICT_TOKEN(c)) {
|
||||
/* TODO(indutny): similar code below does this, but why?
|
||||
* At the very least it seems to be inconsistent given that
|
||||
* h_matching_transfer_encoding_token does not check for
|
||||
* `STRICT_TOKEN`
|
||||
*/
|
||||
h_state = h_matching_transfer_encoding_token;
|
||||
} else if (c == ' ' || c == '\t') {
|
||||
/* Skip lws */
|
||||
} else {
|
||||
h_state = h_general;
|
||||
}
|
||||
break;
|
||||
|
||||
case h_matching_transfer_encoding_chunked:
|
||||
parser->index++;
|
||||
if (parser->index > sizeof(CHUNKED)-1
|
||||
|| c != CHUNKED[parser->index]) {
|
||||
h_state = h_general;
|
||||
h_state = h_matching_transfer_encoding_token;
|
||||
} else if (parser->index == sizeof(CHUNKED)-2) {
|
||||
h_state = h_transfer_encoding_chunked;
|
||||
}
|
||||
break;
|
||||
|
||||
case h_matching_transfer_encoding_token:
|
||||
if (ch == ',') {
|
||||
h_state = h_matching_transfer_encoding_token_start;
|
||||
parser->index = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case h_matching_connection_token_start:
|
||||
/* looking for 'Connection: keep-alive' */
|
||||
if (c == 'k') {
|
||||
@@ -1634,7 +1664,7 @@ reexecute:
|
||||
break;
|
||||
|
||||
case h_transfer_encoding_chunked:
|
||||
if (ch != ' ') h_state = h_general;
|
||||
if (ch != ' ') h_state = h_matching_transfer_encoding_token;
|
||||
break;
|
||||
|
||||
case h_connection_keep_alive:
|
||||
@@ -1768,12 +1798,17 @@ reexecute:
|
||||
REEXECUTE();
|
||||
}
|
||||
|
||||
/* Cannot use chunked encoding and a content-length header together
|
||||
per the HTTP specification. */
|
||||
if ((parser->flags & F_CHUNKED) &&
|
||||
/* Cannot us transfer-encoding and a content-length header together
|
||||
per the HTTP specification. (RFC 7230 Section 3.3.3) */
|
||||
if ((parser->flags & F_TRANSFER_ENCODING) &&
|
||||
(parser->flags & F_CONTENTLENGTH)) {
|
||||
SET_ERRNO(HPE_UNEXPECTED_CONTENT_LENGTH);
|
||||
goto error;
|
||||
/* Allow it for lenient parsing as long as `Transfer-Encoding` is
|
||||
* not `chunked`
|
||||
*/
|
||||
if (!lenient || (parser->flags & F_CHUNKED)) {
|
||||
SET_ERRNO(HPE_UNEXPECTED_CONTENT_LENGTH);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
UPDATE_STATE(s_headers_done);
|
||||
@@ -1848,8 +1883,31 @@ reexecute:
|
||||
UPDATE_STATE(NEW_MESSAGE());
|
||||
CALLBACK_NOTIFY(message_complete);
|
||||
} else if (parser->flags & F_CHUNKED) {
|
||||
/* chunked encoding - ignore Content-Length header */
|
||||
/* chunked encoding - ignore Content-Length header,
|
||||
* prepare for a chunk */
|
||||
UPDATE_STATE(s_chunk_size_start);
|
||||
} else if (parser->flags & F_TRANSFER_ENCODING) {
|
||||
if (parser->type == HTTP_REQUEST && !lenient) {
|
||||
/* RFC 7230 3.3.3 */
|
||||
|
||||
/* If a Transfer-Encoding header field
|
||||
* is present in a request and the chunked transfer coding is not
|
||||
* the final encoding, the message body length cannot be determined
|
||||
* reliably; the server MUST respond with the 400 (Bad Request)
|
||||
* status code and then close the connection.
|
||||
*/
|
||||
SET_ERRNO(HPE_INVALID_TRANSFER_ENCODING);
|
||||
RETURN(p - data); /* Error */
|
||||
} else {
|
||||
/* RFC 7230 3.3.3 */
|
||||
|
||||
/* If a Transfer-Encoding header field is present in a response and
|
||||
* the chunked transfer coding is not the final encoding, the
|
||||
* message body length is determined by reading the connection until
|
||||
* it is closed by the server.
|
||||
*/
|
||||
UPDATE_STATE(s_body_identity_eof);
|
||||
}
|
||||
} else {
|
||||
if (parser->content_length == 0) {
|
||||
/* Content-Length header given but zero: Content-Length: 0\r\n */
|
||||
@@ -2103,6 +2161,12 @@ http_message_needs_eof (const http_parser *parser)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* RFC 7230 3.3.3, see `s_headers_almost_done` */
|
||||
if ((parser->flags & F_TRANSFER_ENCODING) &&
|
||||
(parser->flags & F_CHUNKED) == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
7
src/3rdparty/http-parser/http_parser.h
vendored
7
src/3rdparty/http-parser/http_parser.h
vendored
@@ -27,7 +27,7 @@ extern "C" {
|
||||
/* Also update SONAME in the Makefile whenever you change these. */
|
||||
#define HTTP_PARSER_VERSION_MAJOR 2
|
||||
#define HTTP_PARSER_VERSION_MINOR 9
|
||||
#define HTTP_PARSER_VERSION_PATCH 0
|
||||
#define HTTP_PARSER_VERSION_PATCH 3
|
||||
|
||||
#include <stddef.h>
|
||||
#if defined(_WIN32) && !defined(__MINGW32__) && \
|
||||
@@ -225,6 +225,7 @@ enum flags
|
||||
, F_UPGRADE = 1 << 5
|
||||
, F_SKIPBODY = 1 << 6
|
||||
, F_CONTENTLENGTH = 1 << 7
|
||||
, F_TRANSFER_ENCODING = 1 << 8
|
||||
};
|
||||
|
||||
|
||||
@@ -271,6 +272,8 @@ enum flags
|
||||
"unexpected content-length header") \
|
||||
XX(INVALID_CHUNK_SIZE, \
|
||||
"invalid character in chunk size header") \
|
||||
XX(INVALID_TRANSFER_ENCODING, \
|
||||
"request has invalid transfer-encoding") \
|
||||
XX(INVALID_CONSTANT, "invalid constant string") \
|
||||
XX(INVALID_INTERNAL_STATE, "encountered unexpected internal state")\
|
||||
XX(STRICT, "strict mode assertion failed") \
|
||||
@@ -293,11 +296,11 @@ enum http_errno {
|
||||
struct http_parser {
|
||||
/** PRIVATE **/
|
||||
unsigned int type : 2; /* enum http_parser_type */
|
||||
unsigned int flags : 8; /* F_* values from 'flags' enum; semi-public */
|
||||
unsigned int state : 7; /* enum state from http_parser.c */
|
||||
unsigned int header_state : 7; /* enum header_state from http_parser.c */
|
||||
unsigned int index : 7; /* index into current matcher */
|
||||
unsigned int lenient_http_headers : 1;
|
||||
unsigned int flags : 16; /* F_* values from 'flags' enum; semi-public */
|
||||
|
||||
uint32_t nread; /* # bytes read in various scenarios */
|
||||
uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */
|
||||
|
||||
1
src/3rdparty/hwloc/AUTHORS
vendored
1
src/3rdparty/hwloc/AUTHORS
vendored
@@ -21,6 +21,7 @@ Nathalie Furmento CNRS
|
||||
Bryon Gloden
|
||||
Brice Goglin Inria
|
||||
Gilles Gouaillardet RIST
|
||||
Valentin Hoyet Inria
|
||||
Joshua Hursey UWL
|
||||
Alexey Kardashevskiy IBM
|
||||
Rob Latham ANL
|
||||
|
||||
2
src/3rdparty/hwloc/CMakeLists.txt
vendored
2
src/3rdparty/hwloc/CMakeLists.txt
vendored
@@ -5,7 +5,7 @@ include_directories(include)
|
||||
include_directories(src)
|
||||
|
||||
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /DNDEBUG")
|
||||
|
||||
set(HEADERS
|
||||
include/hwloc.h
|
||||
|
||||
153
src/3rdparty/hwloc/NEWS
vendored
153
src/3rdparty/hwloc/NEWS
vendored
@@ -13,8 +13,96 @@ $HEADER$
|
||||
|
||||
This file contains the main features as well as overviews of specific
|
||||
bug fixes (and other actions) for each version of hwloc since version
|
||||
0.9 (as initially released as "libtopology", then re-branded to "hwloc"
|
||||
in v0.9.1).
|
||||
0.9.
|
||||
|
||||
|
||||
Version 2.1.0
|
||||
-------------
|
||||
* API
|
||||
+ Add a new "Die" object (HWLOC_OBJ_DIE) for upcoming x86 processors
|
||||
with multiple dies per package, in the x86 and Linux backends.
|
||||
+ Add the new HWLOC_OBJ_MEMCACHE object type for memory-side caches.
|
||||
- They are filtered-out by default, except in command-line tools.
|
||||
- They are only available on very recent platforms running Linux 5.2+
|
||||
and uptodate ACPI tables.
|
||||
- The KNL MCDRAM in cache mode is still exposed as a L3 unless
|
||||
HWLOC_KNL_MSCACHE_L3=0 in the environment.
|
||||
+ Add HWLOC_RESTRICT_FLAG_BYNODESET and _REMOVE_MEMLESS for restricting
|
||||
topologies based on some memory nodes.
|
||||
+ Add hwloc_topology_set_components() for blacklisting some components
|
||||
from being enabled in a topology.
|
||||
+ Add hwloc_bitmap_nr_ulongs() and hwloc_bitmap_from/to_ulongs(),
|
||||
thanks to Junchao Zhang for the suggestion.
|
||||
+ Improve the API for dealing with disallowed resources
|
||||
- HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM is replaced with FLAG_INCLUDE_DISALLOWED
|
||||
and --whole-system command-line options with --disallowed.
|
||||
. Former names are still accepted for backward compatibility.
|
||||
- Add hwloc_topology_allow() for changing allowed sets after load().
|
||||
- Add the HWLOC_ALLOW=all environment variable to totally ignore
|
||||
administrative restrictions such as Linux Cgroups.
|
||||
- Add disallowed_pu and disallowed_numa bits to the discovery support
|
||||
structure.
|
||||
+ Group objects have a new "dont_merge" attribute to prevent them from
|
||||
being automatically merged with identical parent or children.
|
||||
+ Add more distances-related features:
|
||||
- Add hwloc_distances_get_name() to retrieve a string describing
|
||||
what a distances structure contain.
|
||||
- Add hwloc_distances_get_by_name() to retrieve distances structures
|
||||
based on their name.
|
||||
- Add hwloc_distances_release_remove()
|
||||
- Distances may now cover objects of different types with new kind
|
||||
HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES.
|
||||
* Backends
|
||||
+ Add support for Linux 5.3 new sysfs cpu topology files with Die information.
|
||||
+ Add support for Intel v2 Extended Topology Enumeration in the x86 backend.
|
||||
+ Improve memory locality on Linux by using HMAT initiators (exposed
|
||||
since Linux 5.2+), and NUMA distances for CPU-less NUMA nodes.
|
||||
+ The x86 backend now properly handles offline CPUs.
|
||||
+ Detect the locality of NVIDIA GPU OpenCL devices.
|
||||
+ Ignore NUMA nodes that correspond to NVIDIA GPU by default.
|
||||
- They may be unignored if HWLOC_KEEP_NVIDIA_GPU_NUMA_NODES=1 in the environment.
|
||||
- Fix their CPU locality and add info attributes to identify them.
|
||||
Thanks to Max Katz and Edgar Leon for the help.
|
||||
+ Add support for IBM S/390 drawers.
|
||||
+ Rework the heuristics for discovering KNL Cluster and Memory modes
|
||||
to stop assuming all CPUs are online (required for mOS support).
|
||||
Thanks to Sharath K Bhat for testing patches.
|
||||
+ Ignore NUMA node information from AMD topoext in the x86 backend,
|
||||
unless HWLOC_X86_TOPOEXT_NUMANODES=1 is set in the environment.
|
||||
+ Expose Linux DAX devices as hwloc Block OS devices.
|
||||
+ Remove support for /proc/cpuinfo-only topology discovery in Linux
|
||||
kernel prior to 2.6.16.
|
||||
+ Disable POWER device-tree-based topology on Linux by default.
|
||||
- It may be reenabled by setting HWLOC_USE_DT=1 in the environment.
|
||||
+ Discovery components are now divided in phases that may be individually
|
||||
blacklisted.
|
||||
- The linuxio component has been merged back into the linux component.
|
||||
* Tools
|
||||
+ lstopo
|
||||
- lstopo factorizes objects by default in the graphical output when
|
||||
there are more than 4 identical children.
|
||||
. New options --no-factorize and --factorize may be used to configure this.
|
||||
. Hit the 'f' key to disable factorizing in interactive outputs.
|
||||
- Both logical and OS/physical indexes are now displayed by default
|
||||
for PU and NUMA nodes.
|
||||
- The X11 and Windows interactive outputs support many keyboard
|
||||
shortcuts to dynamically customize the attributes, legend, etc.
|
||||
- Add --linespacing and change default margins and linespacing.
|
||||
- Add --allow for changing allowed sets.
|
||||
- Add a native SVG backend. Its graphical output may be slightly less
|
||||
pretty than Cairo (still used by default if available) but the SVG
|
||||
code provides attributes to manipulate objects from HTML/JS.
|
||||
See dynamic_SVG_example.html for an example.
|
||||
+ Add --nodeset options to hwloc-calc for converting between cpusets and
|
||||
nodesets.
|
||||
+ Add --no-smt to lstopo, hwloc-bind and hwloc-calc to ignore multiple
|
||||
PU in SMT cores.
|
||||
+ hwloc-annotate may annotate multiple locations at once.
|
||||
+ Add a HTML/JS version of hwloc-ps. See contrib/hwloc-ps.www/README.
|
||||
+ Add bash completions.
|
||||
* Misc
|
||||
+ Add several FAQ entries in "Compatibility between hwloc versions"
|
||||
about API version, ABI, XML, Synthetic strings, and shmem topologies.
|
||||
|
||||
|
||||
Version 2.0.4 (also included in 1.11.13 when appropriate)
|
||||
@@ -214,6 +302,54 @@ Version 2.0.0
|
||||
+ hwloc now requires a C99 compliant compiler.
|
||||
|
||||
|
||||
Version 1.11.13 (also included in 2.0.4)
|
||||
---------------
|
||||
* Add support for Linux 5.3 new sysfs cpu topology files with Die information.
|
||||
* Add support for Intel v2 Extended Topology Enumeration in the x86 backend.
|
||||
* Tiles, Modules and Dies are exposed as Groups for now.
|
||||
+ HWLOC_DONT_MERGE_DIE_GROUPS=1 may be set in the environment to prevent
|
||||
Die groups from being automatically merged with identical parent or children.
|
||||
* Ignore NUMA node information from AMD topoext in the x86 backend,
|
||||
unless HWLOC_X86_TOPOEXT_NUMANODES=1 is set in the environment.
|
||||
* Group objects have a new "dont_merge" attribute to prevent them from
|
||||
being automatically merged with identical parent or children.
|
||||
|
||||
|
||||
Version 1.11.12 (also included in 2.0.3)
|
||||
---------------
|
||||
* Fix a corner case of hwloc_topology_restrict() where children would
|
||||
become out-of-order.
|
||||
* Fix the return length of export_xmlbuffer() functions to always
|
||||
include the ending \0.
|
||||
|
||||
|
||||
Version 1.11.11 (also included in 2.0.2)
|
||||
---------------
|
||||
* Add support for Hygon Dhyana processors in the x86 backend,
|
||||
thanks to Pu Wen for the patch.
|
||||
* Fix symbol renaming to also rename internal components,
|
||||
thanks to Evan Ramos for the patch.
|
||||
* Fix build on HP-UX, thanks to Richard Lloyd for reporting the issues.
|
||||
* Detect PCI link speed without being root on Linux >= 4.13.
|
||||
|
||||
|
||||
Version 1.11.10 (also included in 2.0.1)
|
||||
---------------
|
||||
* Fix detection of cores and hyperthreads on Mac OS X.
|
||||
* Serialize pciaccess discovery to fix concurrent topology loads in
|
||||
multiple threads.
|
||||
* Fix first touch area memory binding on Linux when thread memory
|
||||
binding is different.
|
||||
* Some minor fixes to memory binding.
|
||||
* Fix hwloc-dump-hwdata to only process SMBIOS information that correspond
|
||||
to the KNL and KNM configuration.
|
||||
* Add a heuristic for guessing KNL/KNM memory and cluster modes when
|
||||
hwloc-dump-hwdata could not run as root earlier.
|
||||
* Fix discovery of NVMe OS devices on Linux >= 4.0.
|
||||
* Add get_area_memlocation() on Windows.
|
||||
* Add CPUVendor, Model, ... attributes on Mac OS X.
|
||||
|
||||
|
||||
Version 1.11.9
|
||||
--------------
|
||||
* Add support for Zhaoxin ZX-C and ZX-D processors in the x86 backend,
|
||||
@@ -941,7 +1077,7 @@ Version 1.6.0
|
||||
+ Add a section about Synthetic topologies in the documentation.
|
||||
|
||||
|
||||
Version 1.5.2 (some of these changes are in v1.6.2 but not in v1.6)
|
||||
Version 1.5.2 (some of these changes are in 1.6.2 but not in 1.6)
|
||||
-------------
|
||||
* Use libpciaccess instead of pciutils/libpci by default for I/O discovery.
|
||||
pciutils/libpci is only used if --enable-libpci is given to configure
|
||||
@@ -1076,9 +1212,8 @@ Version 1.4.2
|
||||
for most of them.
|
||||
|
||||
|
||||
Version 1.4.1
|
||||
Version 1.4.1 (contains all 1.3.2 changes)
|
||||
-------------
|
||||
* This release contains all changes from v1.3.2.
|
||||
* Fix hwloc_alloc_membind, thanks Karl Napf for reporting the issue.
|
||||
* Fix memory leaks in some get_membind() functions.
|
||||
* Fix helpers converting from Linux libnuma to hwloc (hwloc/linux-libnuma.h)
|
||||
@@ -1091,7 +1226,7 @@ Version 1.4.1
|
||||
issues.
|
||||
|
||||
|
||||
Version 1.4.0 (does not contain all v1.3.2 changes)
|
||||
Version 1.4.0 (does not contain all 1.3.2 changes)
|
||||
-------------
|
||||
* Major features
|
||||
+ Add "custom" interface and "assembler" tools to build multi-node
|
||||
@@ -1536,7 +1671,7 @@ Version 1.0.0
|
||||
|
||||
|
||||
Version 0.9.4 (unreleased)
|
||||
--------------------------
|
||||
-------------
|
||||
|
||||
* Fix reseting colors to normal in lstopo -.txt output.
|
||||
* Fix Linux pthread_t binding error report.
|
||||
@@ -1593,7 +1728,7 @@ Version 0.9.1
|
||||
the physical location of IB devices.
|
||||
|
||||
|
||||
Version 0.9 (libtopology)
|
||||
-------------------------
|
||||
Version 0.9 (formerly named "libtopology")
|
||||
-----------
|
||||
|
||||
* First release.
|
||||
|
||||
8
src/3rdparty/hwloc/VERSION
vendored
8
src/3rdparty/hwloc/VERSION
vendored
@@ -8,8 +8,8 @@
|
||||
# Please update HWLOC_VERSION* in contrib/windows/hwloc_config.h too.
|
||||
|
||||
major=2
|
||||
minor=0
|
||||
release=4
|
||||
minor=1
|
||||
release=0
|
||||
|
||||
# greek is used for alpha or beta release tags. If it is non-empty,
|
||||
# it will be appended to the version number. It does not have to be
|
||||
@@ -22,7 +22,7 @@ greek=
|
||||
|
||||
# The date when this release was created
|
||||
|
||||
date="Jun 03, 2019"
|
||||
date="Sep 30, 2019"
|
||||
|
||||
# If snapshot=1, then use the value from snapshot_version as the
|
||||
# entire hwloc version (i.e., ignore major, minor, release, and
|
||||
@@ -41,7 +41,7 @@ snapshot_version=${major}.${minor}.${release}${greek}-git
|
||||
# 2. Version numbers are described in the Libtool current:revision:age
|
||||
# format.
|
||||
|
||||
libhwloc_so_version=15:3:0
|
||||
libhwloc_so_version=16:0:1
|
||||
libnetloc_so_version=0:0:0
|
||||
|
||||
# Please also update the <TargetName> lines in contrib/windows/libhwloc.vcxproj
|
||||
|
||||
188
src/3rdparty/hwloc/include/hwloc.h
vendored
188
src/3rdparty/hwloc/include/hwloc.h
vendored
@@ -53,7 +53,8 @@
|
||||
#ifndef HWLOC_H
|
||||
#define HWLOC_H
|
||||
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include "hwloc/autogen/config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -62,13 +63,13 @@
|
||||
/*
|
||||
* Symbol transforms
|
||||
*/
|
||||
#include <hwloc/rename.h>
|
||||
#include "hwloc/rename.h"
|
||||
|
||||
/*
|
||||
* Bitmap definitions
|
||||
*/
|
||||
|
||||
#include <hwloc/bitmap.h>
|
||||
#include "hwloc/bitmap.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -86,13 +87,13 @@ extern "C" {
|
||||
* actually modifies the API.
|
||||
*
|
||||
* Users may check for available features at build time using this number
|
||||
* (see \ref faq_upgrade).
|
||||
* (see \ref faq_version_api).
|
||||
*
|
||||
* \note This should not be confused with HWLOC_VERSION, the library version.
|
||||
* Two stable releases of the same series usually have the same ::HWLOC_API_VERSION
|
||||
* even if their HWLOC_VERSION are different.
|
||||
*/
|
||||
#define HWLOC_API_VERSION 0x00020000
|
||||
#define HWLOC_API_VERSION 0x00020100
|
||||
|
||||
/** \brief Indicate at runtime which hwloc API version was used at build time.
|
||||
*
|
||||
@@ -101,7 +102,7 @@ extern "C" {
|
||||
HWLOC_DECLSPEC unsigned hwloc_get_api_version(void);
|
||||
|
||||
/** \brief Current component and plugin ABI version (see hwloc/plugins.h) */
|
||||
#define HWLOC_COMPONENT_ABI 5
|
||||
#define HWLOC_COMPONENT_ABI 6
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -186,7 +187,8 @@ typedef enum {
|
||||
HWLOC_OBJ_PACKAGE, /**< \brief Physical package.
|
||||
* The physical package that usually gets inserted
|
||||
* into a socket on the motherboard.
|
||||
* A processor package usually contains multiple cores.
|
||||
* A processor package usually contains multiple cores,
|
||||
* and possibly some dies.
|
||||
*/
|
||||
HWLOC_OBJ_CORE, /**< \brief Core.
|
||||
* A computation unit (may be shared by several
|
||||
@@ -233,6 +235,10 @@ typedef enum {
|
||||
* It is usually close to some cores (the corresponding objects
|
||||
* are descendants of the NUMA node object in the hwloc tree).
|
||||
*
|
||||
* This is the smallest object representing Memory resources,
|
||||
* it cannot have any child except Misc objects.
|
||||
* However it may have Memory-side cache parents.
|
||||
*
|
||||
* There is always at least one such object in the topology
|
||||
* even if the machine is not NUMA.
|
||||
*
|
||||
@@ -279,6 +285,24 @@ typedef enum {
|
||||
* Misc objects have NULL CPU and node sets.
|
||||
*/
|
||||
|
||||
HWLOC_OBJ_MEMCACHE, /**< \brief Memory-side cache (filtered out by default).
|
||||
* A cache in front of a specific NUMA node.
|
||||
*
|
||||
* This object always has at least one NUMA node as a memory child.
|
||||
*
|
||||
* Memory objects are not listed in the main children list,
|
||||
* but rather in the dedicated Memory children list.
|
||||
*
|
||||
* Memory-side cache have a special depth ::HWLOC_TYPE_DEPTH_MEMCACHE
|
||||
* instead of a normal depth just like other objects in the
|
||||
* main tree.
|
||||
*/
|
||||
|
||||
HWLOC_OBJ_DIE, /**< \brief Die within a physical package.
|
||||
* A subpart of the physical package, that contains multiple cores.
|
||||
* \hideinitializer
|
||||
*/
|
||||
|
||||
HWLOC_OBJ_TYPE_MAX /**< \private Sentinel value */
|
||||
} hwloc_obj_type_t;
|
||||
|
||||
@@ -297,8 +321,8 @@ typedef enum hwloc_obj_bridge_type_e {
|
||||
|
||||
/** \brief Type of a OS device. */
|
||||
typedef enum hwloc_obj_osdev_type_e {
|
||||
HWLOC_OBJ_OSDEV_BLOCK, /**< \brief Operating system block device.
|
||||
* For instance "sda" on Linux. */
|
||||
HWLOC_OBJ_OSDEV_BLOCK, /**< \brief Operating system block device, or non-volatile memory device.
|
||||
* For instance "sda" or "dax2.0" on Linux. */
|
||||
HWLOC_OBJ_OSDEV_GPU, /**< \brief Operating system GPU device.
|
||||
* For instance ":0.0" for a GL display,
|
||||
* "card0" for a Linux DRM device. */
|
||||
@@ -434,9 +458,15 @@ struct hwloc_obj {
|
||||
* These children are listed in \p memory_first_child.
|
||||
*/
|
||||
struct hwloc_obj *memory_first_child; /**< \brief First Memory child.
|
||||
* NUMA nodes are listed here (\p memory_arity and \p memory_first_child)
|
||||
* NUMA nodes and Memory-side caches are listed here
|
||||
* (\p memory_arity and \p memory_first_child)
|
||||
* instead of in the normal children list.
|
||||
* See also hwloc_obj_type_is_memory().
|
||||
*
|
||||
* A memory hierarchy starts from a normal CPU-side object
|
||||
* (e.g. Package) and ends with NUMA nodes as leaves.
|
||||
* There might exist some memory-side caches between them
|
||||
* in the middle of the memory subtree.
|
||||
*/
|
||||
/**@}*/
|
||||
|
||||
@@ -471,7 +501,7 @@ struct hwloc_obj {
|
||||
* object and known how (the children path between this object and the PU
|
||||
* objects).
|
||||
*
|
||||
* If the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set,
|
||||
* If the ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED configuration flag is set,
|
||||
* some of these CPUs may not be allowed for binding,
|
||||
* see hwloc_topology_get_allowed_cpuset().
|
||||
*
|
||||
@@ -483,7 +513,7 @@ struct hwloc_obj {
|
||||
*
|
||||
* This may include not only the same as the cpuset field, but also some CPUs for
|
||||
* which topology information is unknown or incomplete, some offlines CPUs, and
|
||||
* the CPUs that are ignored when the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag
|
||||
* the CPUs that are ignored when the ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED flag
|
||||
* is not set.
|
||||
* Thus no corresponding PU object may be found in the topology, because the
|
||||
* precise position is undefined. It is however known that it would be somewhere
|
||||
@@ -501,7 +531,7 @@ struct hwloc_obj {
|
||||
*
|
||||
* In the end, these nodes are those that are close to the current object.
|
||||
*
|
||||
* If the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set,
|
||||
* If the ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED configuration flag is set,
|
||||
* some of these nodes may not be allowed for allocation,
|
||||
* see hwloc_topology_get_allowed_nodeset().
|
||||
*
|
||||
@@ -516,7 +546,7 @@ struct hwloc_obj {
|
||||
*
|
||||
* This may include not only the same as the nodeset field, but also some NUMA
|
||||
* nodes for which topology information is unknown or incomplete, some offlines
|
||||
* nodes, and the nodes that are ignored when the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM
|
||||
* nodes, and the nodes that are ignored when the ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED
|
||||
* flag is not set.
|
||||
* Thus no corresponding NUMA node object may be found in the topology, because the
|
||||
* precise position is undefined. It is however known that it would be
|
||||
@@ -770,7 +800,8 @@ enum hwloc_get_type_depth_e {
|
||||
HWLOC_TYPE_DEPTH_BRIDGE = -4, /**< \brief Virtual depth for bridge object level. \hideinitializer */
|
||||
HWLOC_TYPE_DEPTH_PCI_DEVICE = -5, /**< \brief Virtual depth for PCI device object level. \hideinitializer */
|
||||
HWLOC_TYPE_DEPTH_OS_DEVICE = -6, /**< \brief Virtual depth for software device object level. \hideinitializer */
|
||||
HWLOC_TYPE_DEPTH_MISC = -7 /**< \brief Virtual depth for Misc object. \hideinitializer */
|
||||
HWLOC_TYPE_DEPTH_MISC = -7, /**< \brief Virtual depth for Misc object. \hideinitializer */
|
||||
HWLOC_TYPE_DEPTH_MEMCACHE = -8 /**< \brief Virtual depth for MemCache object. \hideinitializer */
|
||||
};
|
||||
|
||||
/** \brief Return the depth of parents where memory objects are attached.
|
||||
@@ -1781,6 +1812,31 @@ HWLOC_DECLSPEC int hwloc_topology_set_xml(hwloc_topology_t __hwloc_restrict topo
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_topology_set_xmlbuffer(hwloc_topology_t __hwloc_restrict topology, const char * __hwloc_restrict buffer, int size);
|
||||
|
||||
/** \brief Flags to be passed to hwloc_topology_set_components()
|
||||
*/
|
||||
enum hwloc_topology_components_flag_e {
|
||||
/** \brief Blacklist the target component from being used.
|
||||
* \hideinitializer
|
||||
*/
|
||||
HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST = (1UL<<0)
|
||||
};
|
||||
|
||||
/** \brief Prevent a discovery component from being used for a topology.
|
||||
*
|
||||
* \p name is the name of the discovery component that should not be used
|
||||
* when loading topology \p topology. The name is a string such as "cuda".
|
||||
*
|
||||
* For components with multiple phases, it may also be suffixed with the name
|
||||
* of a phase, for instance "linux:io".
|
||||
*
|
||||
* \p flags should be ::HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST.
|
||||
*
|
||||
* This may be used to avoid expensive parts of the discovery process.
|
||||
* For instance, CUDA-specific discovery may be expensive and unneeded
|
||||
* while generic I/O discovery could still be useful.
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_topology_set_components(hwloc_topology_t __hwloc_restrict topology, unsigned long flags, const char * __hwloc_restrict name);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
@@ -1800,28 +1856,27 @@ HWLOC_DECLSPEC int hwloc_topology_set_xmlbuffer(hwloc_topology_t __hwloc_restric
|
||||
* They may also be returned by hwloc_topology_get_flags().
|
||||
*/
|
||||
enum hwloc_topology_flags_e {
|
||||
/** \brief Detect the whole system, ignore reservations.
|
||||
/** \brief Detect the whole system, ignore reservations, include disallowed objects.
|
||||
*
|
||||
* Gather all resources, even if some were disabled by the administrator.
|
||||
* For instance, ignore Linux Cgroup/Cpusets and gather all processors and memory nodes.
|
||||
*
|
||||
* When this flag is not set, PUs and NUMA nodes that are disallowed are not added to the topology.
|
||||
* Parent objects (package, core, cache, etc.) are added only if some of their children are allowed.
|
||||
* All existing PUs and NUMA nodes in the topology are allowed.
|
||||
* hwloc_topology_get_allowed_cpuset() and hwloc_topology_get_allowed_nodeset()
|
||||
* are equal to the root object cpuset and nodeset.
|
||||
*
|
||||
* When this flag is set, the actual sets of allowed PUs and NUMA nodes are given
|
||||
* by hwloc_topology_get_allowed_cpuset() and hwloc_topology_get_allowed_nodeset().
|
||||
* They may be smaller than the root object cpuset and nodeset.
|
||||
*
|
||||
* When this flag is not set, all existing PUs and NUMA nodes in the topology
|
||||
* are allowed. hwloc_topology_get_allowed_cpuset() and hwloc_topology_get_allowed_nodeset()
|
||||
* are equal to the root object cpuset and nodeset.
|
||||
*
|
||||
* If the current topology is exported to XML and reimported later, this flag
|
||||
* should be set again in the reimported topology so that disallowed resources
|
||||
* are reimported as well.
|
||||
* \hideinitializer
|
||||
*/
|
||||
HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM = (1UL<<0),
|
||||
HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED = (1UL<<0),
|
||||
|
||||
/** \brief Assume that the selected backend provides the topology for the
|
||||
* system on which we are running.
|
||||
@@ -1901,6 +1956,10 @@ struct hwloc_topology_discovery_support {
|
||||
unsigned char numa;
|
||||
/** \brief Detecting the amount of memory in NUMA nodes is supported. */
|
||||
unsigned char numa_memory;
|
||||
/** \brief Detecting and identifying PU objects that are not available to the current process is supported. */
|
||||
unsigned char disallowed_pu;
|
||||
/** \brief Detecting and identifying NUMA nodes that are not available to the current process is supported. */
|
||||
unsigned char disallowed_numa;
|
||||
};
|
||||
|
||||
/** \brief Flags describing actual PU binding support for this topology.
|
||||
@@ -1998,7 +2057,7 @@ HWLOC_DECLSPEC const struct hwloc_topology_support *hwloc_topology_get_support(h
|
||||
*
|
||||
* By default, most objects are kept (::HWLOC_TYPE_FILTER_KEEP_ALL).
|
||||
* Instruction caches, I/O and Misc objects are ignored by default (::HWLOC_TYPE_FILTER_KEEP_NONE).
|
||||
* Group levels are ignored unless they bring structure (::HWLOC_TYPE_FILTER_KEEP_STRUCTURE).
|
||||
* Die and Group levels are ignored unless they bring structure (::HWLOC_TYPE_FILTER_KEEP_STRUCTURE).
|
||||
*
|
||||
* Note that group objects are also ignored individually (without the entire level)
|
||||
* when they do not bring structure.
|
||||
@@ -2063,11 +2122,15 @@ HWLOC_DECLSPEC int hwloc_topology_get_type_filter(hwloc_topology_t topology, hwl
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_topology_set_all_types_filter(hwloc_topology_t topology, enum hwloc_type_filter_e filter);
|
||||
|
||||
/** \brief Set the filtering for all cache object types.
|
||||
/** \brief Set the filtering for all CPU cache object types.
|
||||
*
|
||||
* Memory-side caches are not involved since they are not CPU caches.
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_topology_set_cache_types_filter(hwloc_topology_t topology, enum hwloc_type_filter_e filter);
|
||||
|
||||
/** \brief Set the filtering for all instruction cache object types.
|
||||
/** \brief Set the filtering for all CPU instruction cache object types.
|
||||
*
|
||||
* Memory-side caches are not involved since they are not CPU caches.
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_topology_set_icache_types_filter(hwloc_topology_t topology, enum hwloc_type_filter_e filter);
|
||||
|
||||
@@ -2110,6 +2173,19 @@ enum hwloc_restrict_flags_e {
|
||||
*/
|
||||
HWLOC_RESTRICT_FLAG_REMOVE_CPULESS = (1UL<<0),
|
||||
|
||||
/** \brief Restrict by nodeset instead of CPU set.
|
||||
* Only keep objects whose nodeset is included or partially included in the given set.
|
||||
* This flag may not be used with ::HWLOC_RESTRICT_FLAG_BYNODESET.
|
||||
*/
|
||||
HWLOC_RESTRICT_FLAG_BYNODESET = (1UL<<3),
|
||||
|
||||
/** \brief Remove all objects that became Memory-less.
|
||||
* By default, only objects that contain no PU and no memory are removed.
|
||||
* This flag may only be used with ::HWLOC_RESTRICT_FLAG_BYNODESET.
|
||||
* \hideinitializer
|
||||
*/
|
||||
HWLOC_RESTRICT_FLAG_REMOVE_MEMLESS = (1UL<<4),
|
||||
|
||||
/** \brief Move Misc objects to ancestors if their parents are removed during restriction.
|
||||
* If this flag is not set, Misc objects are removed when their parents are removed.
|
||||
* \hideinitializer
|
||||
@@ -2123,28 +2199,70 @@ enum hwloc_restrict_flags_e {
|
||||
HWLOC_RESTRICT_FLAG_ADAPT_IO = (1UL<<2)
|
||||
};
|
||||
|
||||
/** \brief Restrict the topology to the given CPU set.
|
||||
/** \brief Restrict the topology to the given CPU set or nodeset.
|
||||
*
|
||||
* Topology \p topology is modified so as to remove all objects that
|
||||
* are not included (or partially included) in the CPU set \p cpuset.
|
||||
* are not included (or partially included) in the CPU set \p set.
|
||||
* All objects CPU and node sets are restricted accordingly.
|
||||
*
|
||||
* If ::HWLOC_RESTRICT_FLAG_BYNODESET is passed in \p flags,
|
||||
* \p set is considered a nodeset instead of a CPU set.
|
||||
*
|
||||
* \p flags is a OR'ed set of ::hwloc_restrict_flags_e.
|
||||
*
|
||||
* \note This call may not be reverted by restricting back to a larger
|
||||
* cpuset. Once dropped during restriction, objects may not be brought
|
||||
* set. Once dropped during restriction, objects may not be brought
|
||||
* back, except by loading another topology with hwloc_topology_load().
|
||||
*
|
||||
* \return 0 on success.
|
||||
*
|
||||
* \return -1 with errno set to EINVAL if the input cpuset is invalid.
|
||||
* \return -1 with errno set to EINVAL if the input set is invalid.
|
||||
* The topology is not modified in this case.
|
||||
*
|
||||
* \return -1 with errno set to ENOMEM on failure to allocate internal data.
|
||||
* The topology is reinitialized in this case. It should be either
|
||||
* destroyed with hwloc_topology_destroy() or configured and loaded again.
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_topology_restrict(hwloc_topology_t __hwloc_restrict topology, hwloc_const_cpuset_t cpuset, unsigned long flags);
|
||||
HWLOC_DECLSPEC int hwloc_topology_restrict(hwloc_topology_t __hwloc_restrict topology, hwloc_const_bitmap_t set, unsigned long flags);
|
||||
|
||||
/** \brief Flags to be given to hwloc_topology_allow(). */
|
||||
enum hwloc_allow_flags_e {
|
||||
/** \brief Mark all objects as allowed in the topology.
|
||||
*
|
||||
* \p cpuset and \p nođeset given to hwloc_topology_allow() must be \c NULL.
|
||||
* \hideinitializer */
|
||||
HWLOC_ALLOW_FLAG_ALL = (1UL<<0),
|
||||
|
||||
/** \brief Only allow objects that are available to the current process.
|
||||
*
|
||||
* The topology must have ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM so that the set
|
||||
* of available resources can actually be retrieved from the operating system.
|
||||
*
|
||||
* \p cpuset and \p nođeset given to hwloc_topology_allow() must be \c NULL.
|
||||
* \hideinitializer */
|
||||
HWLOC_ALLOW_FLAG_LOCAL_RESTRICTIONS = (1UL<<1),
|
||||
|
||||
/** \brief Allow a custom set of objects, given to hwloc_topology_allow() as \p cpuset and/or \p nodeset parameters.
|
||||
* \hideinitializer */
|
||||
HWLOC_ALLOW_FLAG_CUSTOM = (1UL<<2)
|
||||
};
|
||||
|
||||
/** \brief Change the sets of allowed PUs and NUMA nodes in the topology.
|
||||
*
|
||||
* This function only works if the ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED
|
||||
* was set on the topology. It does not modify any object, it only changes
|
||||
* the sets returned by hwloc_topology_get_allowed_cpuset() and
|
||||
* hwloc_topology_get_allowed_nodeset().
|
||||
*
|
||||
* It is notably useful when importing a topology from another process
|
||||
* running in a different Linux Cgroup.
|
||||
*
|
||||
* \p flags must be set to one flag among ::hwloc_allow_flags_e.
|
||||
*
|
||||
* \note Removing objects from a topology should rather be performed with
|
||||
* hwloc_topology_restrict().
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_topology_allow(hwloc_topology_t __hwloc_restrict topology, hwloc_const_cpuset_t cpuset, hwloc_const_nodeset_t nodeset, unsigned long flags);
|
||||
|
||||
/** \brief Add a MISC object as a leaf of the topology
|
||||
*
|
||||
@@ -2250,21 +2368,21 @@ HWLOC_DECLSPEC int hwloc_obj_add_other_obj_sets(hwloc_obj_t dst, hwloc_obj_t src
|
||||
|
||||
|
||||
/* high-level helpers */
|
||||
#include <hwloc/helper.h>
|
||||
#include "hwloc/helper.h"
|
||||
|
||||
/* inline code of some functions above */
|
||||
#include <hwloc/inlines.h>
|
||||
#include "hwloc/inlines.h"
|
||||
|
||||
/* exporting to XML or synthetic */
|
||||
#include <hwloc/export.h>
|
||||
#include "hwloc/export.h"
|
||||
|
||||
/* distances */
|
||||
#include <hwloc/distances.h>
|
||||
#include "hwloc/distances.h"
|
||||
|
||||
/* topology diffs */
|
||||
#include <hwloc/diff.h>
|
||||
#include "hwloc/diff.h"
|
||||
|
||||
/* deprecated headers */
|
||||
#include <hwloc/deprecated.h>
|
||||
#include "hwloc/deprecated.h"
|
||||
|
||||
#endif /* HWLOC_H */
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
#ifndef HWLOC_CONFIG_H
|
||||
#define HWLOC_CONFIG_H
|
||||
|
||||
#define HWLOC_VERSION "2.0.4"
|
||||
#define HWLOC_VERSION "2.1.0"
|
||||
#define HWLOC_VERSION_MAJOR 2
|
||||
#define HWLOC_VERSION_MINOR 0
|
||||
#define HWLOC_VERSION_RELEASE 4
|
||||
#define HWLOC_VERSION_MINOR 1
|
||||
#define HWLOC_VERSION_RELEASE 0
|
||||
#define HWLOC_VERSION_GREEK ""
|
||||
|
||||
#define __hwloc_restrict
|
||||
|
||||
29
src/3rdparty/hwloc/include/hwloc/bitmap.h
vendored
29
src/3rdparty/hwloc/include/hwloc/bitmap.h
vendored
@@ -13,7 +13,8 @@
|
||||
#ifndef HWLOC_BITMAP_H
|
||||
#define HWLOC_BITMAP_H
|
||||
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include "hwloc/autogen/config.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -198,6 +199,9 @@ HWLOC_DECLSPEC int hwloc_bitmap_from_ulong(hwloc_bitmap_t bitmap, unsigned long
|
||||
/** \brief Setup bitmap \p bitmap from unsigned long \p mask used as \p i -th subset */
|
||||
HWLOC_DECLSPEC int hwloc_bitmap_from_ith_ulong(hwloc_bitmap_t bitmap, unsigned i, unsigned long mask);
|
||||
|
||||
/** \brief Setup bitmap \p bitmap from unsigned longs \p masks used as first \p nr subsets */
|
||||
HWLOC_DECLSPEC int hwloc_bitmap_from_ulongs(hwloc_bitmap_t bitmap, unsigned nr, const unsigned long *masks);
|
||||
|
||||
|
||||
/*
|
||||
* Modifying bitmaps.
|
||||
@@ -256,6 +260,29 @@ HWLOC_DECLSPEC unsigned long hwloc_bitmap_to_ulong(hwloc_const_bitmap_t bitmap)
|
||||
/** \brief Convert the \p i -th subset of bitmap \p bitmap into unsigned long mask */
|
||||
HWLOC_DECLSPEC unsigned long hwloc_bitmap_to_ith_ulong(hwloc_const_bitmap_t bitmap, unsigned i) __hwloc_attribute_pure;
|
||||
|
||||
/** \brief Convert the first \p nr subsets of bitmap \p bitmap into the array of \p nr unsigned long \p masks
|
||||
*
|
||||
* \p nr may be determined earlier with hwloc_bitmap_nr_ulongs().
|
||||
*
|
||||
* \return 0
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_bitmap_to_ulongs(hwloc_const_bitmap_t bitmap, unsigned nr, unsigned long *masks);
|
||||
|
||||
/** \brief Return the number of unsigned longs required for storing bitmap \p bitmap entirely
|
||||
*
|
||||
* This is the number of contiguous unsigned longs from the very first bit of the bitmap
|
||||
* (even if unset) up to the last set bit.
|
||||
* This is useful for knowing the \p nr parameter to pass to hwloc_bitmap_to_ulongs()
|
||||
* (or which calls to hwloc_bitmap_to_ith_ulong() are needed)
|
||||
* to entirely convert a bitmap into multiple unsigned longs.
|
||||
*
|
||||
* When called on the output of hwloc_topology_get_topology_cpuset(),
|
||||
* the returned number is large enough for all cpusets of the topology.
|
||||
*
|
||||
* \return -1 if \p bitmap is infinite.
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_bitmap_nr_ulongs(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
||||
|
||||
/** \brief Test whether index \p id is part of bitmap \p bitmap.
|
||||
*
|
||||
* \return 1 if the bit at index \p id is set in bitmap \p bitmap, 0 otherwise.
|
||||
|
||||
8
src/3rdparty/hwloc/include/hwloc/cuda.h
vendored
8
src/3rdparty/hwloc/include/hwloc/cuda.h
vendored
@@ -16,11 +16,11 @@
|
||||
#ifndef HWLOC_CUDA_H
|
||||
#define HWLOC_CUDA_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include <hwloc/helper.h>
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/autogen/config.h"
|
||||
#include "hwloc/helper.h"
|
||||
#ifdef HWLOC_LINUX_SYS
|
||||
#include <hwloc/linux.h>
|
||||
#include "hwloc/linux.h"
|
||||
#endif
|
||||
|
||||
#include <cuda.h>
|
||||
|
||||
8
src/3rdparty/hwloc/include/hwloc/cudart.h
vendored
8
src/3rdparty/hwloc/include/hwloc/cudart.h
vendored
@@ -16,11 +16,11 @@
|
||||
#ifndef HWLOC_CUDART_H
|
||||
#define HWLOC_CUDART_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include <hwloc/helper.h>
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/autogen/config.h"
|
||||
#include "hwloc/helper.h"
|
||||
#ifdef HWLOC_LINUX_SYS
|
||||
#include <hwloc/linux.h>
|
||||
#include "hwloc/linux.h"
|
||||
#endif
|
||||
|
||||
#include <cuda.h> /* for CUDA_VERSION */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2017 Inria. All rights reserved.
|
||||
* Copyright © 2009-2018 Inria. All rights reserved.
|
||||
* Copyright © 2009-2012 Université Bordeaux
|
||||
* Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
@@ -21,6 +21,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* backward compat with v2.0 before WHOLE_SYSTEM renaming */
|
||||
#define HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED
|
||||
/* backward compat with v1.11 before System removal */
|
||||
#define HWLOC_OBJ_SYSTEM HWLOC_OBJ_MACHINE
|
||||
/* backward compat with v1.10 before Socket->Package renaming */
|
||||
|
||||
53
src/3rdparty/hwloc/include/hwloc/distances.h
vendored
53
src/3rdparty/hwloc/include/hwloc/distances.h
vendored
@@ -87,7 +87,12 @@ enum hwloc_distances_kind_e {
|
||||
* Such values are currently ignored for distance-based grouping.
|
||||
* \hideinitializer
|
||||
*/
|
||||
HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH = (1UL<<3)
|
||||
HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH = (1UL<<3),
|
||||
|
||||
/** \brief This distances structure covers objects of different types.
|
||||
* \hideinitializer
|
||||
*/
|
||||
HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES = (1UL<<4)
|
||||
};
|
||||
|
||||
/** \brief Retrieve distance matrices.
|
||||
@@ -131,20 +136,32 @@ hwloc_distances_get_by_depth(hwloc_topology_t topology, int depth,
|
||||
*
|
||||
* Identical to hwloc_distances_get() with the additional \p type filter.
|
||||
*/
|
||||
static __hwloc_inline int
|
||||
HWLOC_DECLSPEC int
|
||||
hwloc_distances_get_by_type(hwloc_topology_t topology, hwloc_obj_type_t type,
|
||||
unsigned *nr, struct hwloc_distances_s **distances,
|
||||
unsigned long kind, unsigned long flags)
|
||||
{
|
||||
int depth = hwloc_get_type_depth(topology, type);
|
||||
if (depth == HWLOC_TYPE_DEPTH_UNKNOWN || depth == HWLOC_TYPE_DEPTH_MULTIPLE) {
|
||||
*nr = 0;
|
||||
return 0;
|
||||
}
|
||||
return hwloc_distances_get_by_depth(topology, depth, nr, distances, kind, flags);
|
||||
}
|
||||
unsigned long kind, unsigned long flags);
|
||||
|
||||
/** \brief Release a distance matrix structure previously returned by hwloc_distances_get(). */
|
||||
/** \brief Retrieve a distance matrix with the given name.
|
||||
*
|
||||
* Usually only one distances structure may match a given name.
|
||||
*/
|
||||
HWLOC_DECLSPEC int
|
||||
hwloc_distances_get_by_name(hwloc_topology_t topology, const char *name,
|
||||
unsigned *nr, struct hwloc_distances_s **distances,
|
||||
unsigned long flags);
|
||||
|
||||
/** \brief Get a description of what a distances structure contains.
|
||||
*
|
||||
* For instance "NUMALatency" for hardware-provided NUMA distances (ACPI SLIT),
|
||||
* or NULL if unknown.
|
||||
*/
|
||||
HWLOC_DECLSPEC const char *
|
||||
hwloc_distances_get_name(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
||||
|
||||
/** \brief Release a distance matrix structure previously returned by hwloc_distances_get().
|
||||
*
|
||||
* \note This function is not required if the structure is removed with hwloc_distances_release_remove().
|
||||
*/
|
||||
HWLOC_DECLSPEC void
|
||||
hwloc_distances_release(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
||||
|
||||
@@ -221,11 +238,11 @@ enum hwloc_distances_add_flag_e {
|
||||
* The distance from object i to object j is in slot i*nbobjs+j.
|
||||
*
|
||||
* \p kind specifies the kind of distance as a OR'ed set of ::hwloc_distances_kind_e.
|
||||
* Kind ::HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES will be automatically added
|
||||
* if objects of different types are given.
|
||||
*
|
||||
* \p flags configures the behavior of the function using an optional OR'ed set of
|
||||
* ::hwloc_distances_add_flag_e.
|
||||
*
|
||||
* Objects must be of the same type. They cannot be of type Group.
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_distances_add(hwloc_topology_t topology,
|
||||
unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t *values,
|
||||
@@ -237,7 +254,7 @@ HWLOC_DECLSPEC int hwloc_distances_add(hwloc_topology_t topology,
|
||||
* gathered through the OS.
|
||||
*
|
||||
* If these distances were used to group objects, these additional
|
||||
*Group objects are not removed from the topology.
|
||||
* Group objects are not removed from the topology.
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_distances_remove(hwloc_topology_t topology);
|
||||
|
||||
@@ -260,6 +277,12 @@ hwloc_distances_remove_by_type(hwloc_topology_t topology, hwloc_obj_type_t type)
|
||||
return hwloc_distances_remove_by_depth(topology, depth);
|
||||
}
|
||||
|
||||
/** \brief Release and remove the given distance matrice from the topology.
|
||||
*
|
||||
* This function includes a call to hwloc_distances_release().
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_distances_release_remove(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
|
||||
2
src/3rdparty/hwloc/include/hwloc/gl.h
vendored
2
src/3rdparty/hwloc/include/hwloc/gl.h
vendored
@@ -14,7 +14,7 @@
|
||||
#ifndef HWLOC_GL_H
|
||||
#define HWLOC_GL_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include "hwloc.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
#ifndef HWLOC_GLIBC_SCHED_H
|
||||
#define HWLOC_GLIBC_SCHED_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/helper.h>
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/helper.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#if !defined _GNU_SOURCE || !defined _SCHED_H || (!defined CPU_SETSIZE && !defined sched_priority)
|
||||
|
||||
32
src/3rdparty/hwloc/include/hwloc/helper.h
vendored
32
src/3rdparty/hwloc/include/hwloc/helper.h
vendored
@@ -527,30 +527,36 @@ hwloc_obj_type_is_io(hwloc_obj_type_t type);
|
||||
*
|
||||
* Memory objects are objects attached to their parents
|
||||
* in the Memory children list.
|
||||
* This current only includes NUMA nodes.
|
||||
* This current includes NUMA nodes and Memory-side caches.
|
||||
*
|
||||
* \return 1 if an object of type \p type is a Memory object, 0 otherwise.
|
||||
*/
|
||||
HWLOC_DECLSPEC int
|
||||
hwloc_obj_type_is_memory(hwloc_obj_type_t type);
|
||||
|
||||
/** \brief Check whether an object type is a Cache (Data, Unified or Instruction).
|
||||
/** \brief Check whether an object type is a CPU Cache (Data, Unified or Instruction).
|
||||
*
|
||||
* Memory-side caches are not CPU caches.
|
||||
*
|
||||
* \return 1 if an object of type \p type is a Cache, 0 otherwise.
|
||||
*/
|
||||
HWLOC_DECLSPEC int
|
||||
hwloc_obj_type_is_cache(hwloc_obj_type_t type);
|
||||
|
||||
/** \brief Check whether an object type is a Data or Unified Cache.
|
||||
/** \brief Check whether an object type is a CPU Data or Unified Cache.
|
||||
*
|
||||
* \return 1 if an object of type \p type is a Data or Unified Cache, 0 otherwise.
|
||||
* Memory-side caches are not CPU caches.
|
||||
*
|
||||
* \return 1 if an object of type \p type is a CPU Data or Unified Cache, 0 otherwise.
|
||||
*/
|
||||
HWLOC_DECLSPEC int
|
||||
hwloc_obj_type_is_dcache(hwloc_obj_type_t type);
|
||||
|
||||
/** \brief Check whether an object type is a Instruction Cache,
|
||||
/** \brief Check whether an object type is a CPU Instruction Cache,
|
||||
*
|
||||
* \return 1 if an object of type \p type is a Instruction Cache, 0 otherwise.
|
||||
* Memory-side caches are not CPU caches.
|
||||
*
|
||||
* \return 1 if an object of type \p type is a CPU Instruction Cache, 0 otherwise.
|
||||
*/
|
||||
HWLOC_DECLSPEC int
|
||||
hwloc_obj_type_is_icache(hwloc_obj_type_t type);
|
||||
@@ -914,7 +920,7 @@ hwloc_topology_get_complete_cpuset(hwloc_topology_t topology) __hwloc_attribute_
|
||||
* \note The returned cpuset is not newly allocated and should thus not be
|
||||
* changed or freed; hwloc_bitmap_dup() must be used to obtain a local copy.
|
||||
*
|
||||
* \note This is equivalent to retrieving the root object complete CPU-set.
|
||||
* \note This is equivalent to retrieving the root object CPU-set.
|
||||
*/
|
||||
HWLOC_DECLSPEC hwloc_const_cpuset_t
|
||||
hwloc_topology_get_topology_cpuset(hwloc_topology_t topology) __hwloc_attribute_pure;
|
||||
@@ -923,11 +929,11 @@ hwloc_topology_get_topology_cpuset(hwloc_topology_t topology) __hwloc_attribute_
|
||||
*
|
||||
* \return the CPU set of allowed logical processors of the system.
|
||||
*
|
||||
* \note If the topology flag ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM was not set,
|
||||
* \note If the topology flag ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED was not set,
|
||||
* this is identical to hwloc_topology_get_topology_cpuset(), which means
|
||||
* all PUs are allowed.
|
||||
*
|
||||
* \note If ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM was set, applying
|
||||
* \note If ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED was set, applying
|
||||
* hwloc_bitmap_intersects() on the result of this function and on an object
|
||||
* cpuset checks whether there are allowed PUs inside that object.
|
||||
* Applying hwloc_bitmap_and() returns the list of these allowed PUs.
|
||||
@@ -945,7 +951,7 @@ hwloc_topology_get_allowed_cpuset(hwloc_topology_t topology) __hwloc_attribute_p
|
||||
* \note The returned nodeset is not newly allocated and should thus not be
|
||||
* changed or freed; hwloc_bitmap_dup() must be used to obtain a local copy.
|
||||
*
|
||||
* \note This is equivalent to retrieving the root object complete CPU-set.
|
||||
* \note This is equivalent to retrieving the root object complete nodeset.
|
||||
*/
|
||||
HWLOC_DECLSPEC hwloc_const_nodeset_t
|
||||
hwloc_topology_get_complete_nodeset(hwloc_topology_t topology) __hwloc_attribute_pure;
|
||||
@@ -959,7 +965,7 @@ hwloc_topology_get_complete_nodeset(hwloc_topology_t topology) __hwloc_attribute
|
||||
* \note The returned nodeset is not newly allocated and should thus not be
|
||||
* changed or freed; hwloc_bitmap_dup() must be used to obtain a local copy.
|
||||
*
|
||||
* \note This is equivalent to retrieving the root object complete CPU-set.
|
||||
* \note This is equivalent to retrieving the root object nodeset.
|
||||
*/
|
||||
HWLOC_DECLSPEC hwloc_const_nodeset_t
|
||||
hwloc_topology_get_topology_nodeset(hwloc_topology_t topology) __hwloc_attribute_pure;
|
||||
@@ -968,11 +974,11 @@ hwloc_topology_get_topology_nodeset(hwloc_topology_t topology) __hwloc_attribute
|
||||
*
|
||||
* \return the node set of allowed memory of the system.
|
||||
*
|
||||
* \note If the topology flag ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM was not set,
|
||||
* \note If the topology flag ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED was not set,
|
||||
* this is identical to hwloc_topology_get_topology_nodeset(), which means
|
||||
* all NUMA nodes are allowed.
|
||||
*
|
||||
* \note If ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM was set, applying
|
||||
* \note If ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED was set, applying
|
||||
* hwloc_bitmap_intersects() on the result of this function and on an object
|
||||
* nodeset checks whether there are allowed NUMA nodes inside that object.
|
||||
* Applying hwloc_bitmap_and() returns the list of these allowed NUMA nodes.
|
||||
|
||||
10
src/3rdparty/hwloc/include/hwloc/intel-mic.h
vendored
10
src/3rdparty/hwloc/include/hwloc/intel-mic.h
vendored
@@ -13,11 +13,13 @@
|
||||
#ifndef HWLOC_INTEL_MIC_H
|
||||
#define HWLOC_INTEL_MIC_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include <hwloc/helper.h>
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/autogen/config.h"
|
||||
#include "hwloc/helper.h"
|
||||
|
||||
#ifdef HWLOC_LINUX_SYS
|
||||
#include <hwloc/linux.h>
|
||||
#include "hwloc/linux.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
#ifndef HWLOC_LINUX_LIBNUMA_H
|
||||
#define HWLOC_LINUX_LIBNUMA_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include "hwloc.h"
|
||||
|
||||
#include <numa.h>
|
||||
|
||||
|
||||
|
||||
3
src/3rdparty/hwloc/include/hwloc/linux.h
vendored
3
src/3rdparty/hwloc/include/hwloc/linux.h
vendored
@@ -15,7 +15,8 @@
|
||||
#ifndef HWLOC_LINUX_H
|
||||
#define HWLOC_LINUX_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include "hwloc.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
||||
8
src/3rdparty/hwloc/include/hwloc/nvml.h
vendored
8
src/3rdparty/hwloc/include/hwloc/nvml.h
vendored
@@ -13,11 +13,11 @@
|
||||
#ifndef HWLOC_NVML_H
|
||||
#define HWLOC_NVML_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include <hwloc/helper.h>
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/autogen/config.h"
|
||||
#include "hwloc/helper.h"
|
||||
#ifdef HWLOC_LINUX_SYS
|
||||
#include <hwloc/linux.h>
|
||||
#include "hwloc/linux.h"
|
||||
#endif
|
||||
|
||||
#include <nvml.h>
|
||||
|
||||
119
src/3rdparty/hwloc/include/hwloc/opencl.h
vendored
119
src/3rdparty/hwloc/include/hwloc/opencl.h
vendored
@@ -14,19 +14,17 @@
|
||||
#ifndef HWLOC_OPENCL_H
|
||||
#define HWLOC_OPENCL_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include <hwloc/helper.h>
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/autogen/config.h"
|
||||
#include "hwloc/helper.h"
|
||||
#ifdef HWLOC_LINUX_SYS
|
||||
#include <hwloc/linux.h>
|
||||
#include "hwloc/linux.h"
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#include <OpenCL/cl_ext.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_ext.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -37,17 +35,75 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* OpenCL extensions aren't always shipped with default headers, and
|
||||
* they don't always reflect what the installed implementations support.
|
||||
* Try everything and let the implementation return errors when non supported.
|
||||
*/
|
||||
/* Copyright (c) 2008-2018 The Khronos Group Inc. */
|
||||
|
||||
/* needs "cl_amd_device_attribute_query" device extension, but not strictly required for clGetDeviceInfo() */
|
||||
#define HWLOC_CL_DEVICE_TOPOLOGY_AMD 0x4037
|
||||
typedef union {
|
||||
struct { cl_uint type; cl_uint data[5]; } raw;
|
||||
struct { cl_uint type; cl_char unused[17]; cl_char bus; cl_char device; cl_char function; } pcie;
|
||||
} hwloc_cl_device_topology_amd;
|
||||
#define HWLOC_CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
|
||||
|
||||
/* needs "cl_nv_device_attribute_query" device extension, but not strictly required for clGetDeviceInfo() */
|
||||
#define HWLOC_CL_DEVICE_PCI_BUS_ID_NV 0x4008
|
||||
#define HWLOC_CL_DEVICE_PCI_SLOT_ID_NV 0x4009
|
||||
|
||||
|
||||
/** \defgroup hwlocality_opencl Interoperability with OpenCL
|
||||
*
|
||||
* This interface offers ways to retrieve topology information about
|
||||
* OpenCL devices.
|
||||
*
|
||||
* Only the AMD OpenCL interface currently offers useful locality information
|
||||
* about its devices.
|
||||
* Only AMD and NVIDIA OpenCL implementations currently offer useful locality
|
||||
* information about their devices.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** \brief Return the domain, bus and device IDs of the OpenCL device \p device.
|
||||
*
|
||||
* Device \p device must match the local machine.
|
||||
*/
|
||||
static __hwloc_inline int
|
||||
hwloc_opencl_get_device_pci_busid(cl_device_id device,
|
||||
unsigned *domain, unsigned *bus, unsigned *dev, unsigned *func)
|
||||
{
|
||||
hwloc_cl_device_topology_amd amdtopo;
|
||||
cl_uint nvbus, nvslot;
|
||||
cl_int clret;
|
||||
|
||||
clret = clGetDeviceInfo(device, HWLOC_CL_DEVICE_TOPOLOGY_AMD, sizeof(amdtopo), &amdtopo, NULL);
|
||||
if (CL_SUCCESS == clret
|
||||
&& HWLOC_CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD == amdtopo.raw.type) {
|
||||
*domain = 0; /* can't do anything better */
|
||||
*bus = (unsigned) amdtopo.pcie.bus;
|
||||
*dev = (unsigned) amdtopo.pcie.device;
|
||||
*func = (unsigned) amdtopo.pcie.function;
|
||||
return 0;
|
||||
}
|
||||
|
||||
clret = clGetDeviceInfo(device, HWLOC_CL_DEVICE_PCI_BUS_ID_NV, sizeof(nvbus), &nvbus, NULL);
|
||||
if (CL_SUCCESS == clret) {
|
||||
clret = clGetDeviceInfo(device, HWLOC_CL_DEVICE_PCI_SLOT_ID_NV, sizeof(nvslot), &nvslot, NULL);
|
||||
if (CL_SUCCESS == clret) {
|
||||
/* FIXME: PCI bus only uses 8bit, assume nvidia hardcodes the domain in higher bits */
|
||||
*domain = nvbus >> 8;
|
||||
*bus = nvbus & 0xff;
|
||||
/* non-documented but used in many other projects */
|
||||
*dev = nvslot >> 3;
|
||||
*func = nvslot & 0x7;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/** \brief Get the CPU set of logical processors that are physically
|
||||
* close to OpenCL device \p device.
|
||||
*
|
||||
@@ -62,7 +118,7 @@ extern "C" {
|
||||
* and hwloc_opencl_get_device_osdev_by_index().
|
||||
*
|
||||
* This function is currently only implemented in a meaningful way for
|
||||
* Linux with the AMD OpenCL implementation; other systems will simply
|
||||
* Linux with the AMD or NVIDIA OpenCL implementation; other systems will simply
|
||||
* get a full cpuset.
|
||||
*/
|
||||
static __hwloc_inline int
|
||||
@@ -70,35 +126,28 @@ hwloc_opencl_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unuse
|
||||
cl_device_id device __hwloc_attribute_unused,
|
||||
hwloc_cpuset_t set)
|
||||
{
|
||||
#if (defined HWLOC_LINUX_SYS) && (defined CL_DEVICE_TOPOLOGY_AMD)
|
||||
/* If we're on Linux + AMD OpenCL, use the AMD extension + the sysfs mechanism to get the local cpus */
|
||||
#if (defined HWLOC_LINUX_SYS)
|
||||
/* If we're on Linux, try AMD/NVIDIA extensions + the sysfs mechanism to get the local cpus */
|
||||
#define HWLOC_OPENCL_DEVICE_SYSFS_PATH_MAX 128
|
||||
char path[HWLOC_OPENCL_DEVICE_SYSFS_PATH_MAX];
|
||||
cl_device_topology_amd amdtopo;
|
||||
cl_int clret;
|
||||
unsigned pcidomain, pcibus, pcidev, pcifunc;
|
||||
|
||||
if (!hwloc_topology_is_thissystem(topology)) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
clret = clGetDeviceInfo(device, CL_DEVICE_TOPOLOGY_AMD, sizeof(amdtopo), &amdtopo, NULL);
|
||||
if (CL_SUCCESS != clret) {
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
return 0;
|
||||
}
|
||||
if (CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD != amdtopo.raw.type) {
|
||||
if (hwloc_opencl_get_device_pci_busid(device, &pcidomain, &pcibus, &pcidev, &pcifunc) < 0) {
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
return 0;
|
||||
}
|
||||
|
||||
sprintf(path, "/sys/bus/pci/devices/0000:%02x:%02x.%01x/local_cpus",
|
||||
(unsigned) amdtopo.pcie.bus, (unsigned) amdtopo.pcie.device, (unsigned) amdtopo.pcie.function);
|
||||
sprintf(path, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/local_cpus", pcidomain, pcibus, pcidev, pcifunc);
|
||||
if (hwloc_linux_read_path_as_cpumask(path, set) < 0
|
||||
|| hwloc_bitmap_iszero(set))
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
#else
|
||||
/* Non-Linux + AMD OpenCL systems simply get a full cpuset */
|
||||
/* Non-Linux systems simply get a full cpuset */
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
#endif
|
||||
return 0;
|
||||
@@ -140,8 +189,8 @@ hwloc_opencl_get_device_osdev_by_index(hwloc_topology_t topology,
|
||||
* Use OpenCL device attributes to find the corresponding hwloc OS device object.
|
||||
* Return NULL if there is none or if useful attributes are not available.
|
||||
*
|
||||
* This function currently only works on AMD OpenCL devices that support
|
||||
* the CL_DEVICE_TOPOLOGY_AMD extension. hwloc_opencl_get_device_osdev_by_index()
|
||||
* This function currently only works on AMD and NVIDIA OpenCL devices that support
|
||||
* relevant OpenCL extensions. hwloc_opencl_get_device_osdev_by_index()
|
||||
* should be preferred whenever possible, i.e. when platform and device index
|
||||
* are known.
|
||||
*
|
||||
@@ -159,17 +208,10 @@ static __hwloc_inline hwloc_obj_t
|
||||
hwloc_opencl_get_device_osdev(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||
cl_device_id device __hwloc_attribute_unused)
|
||||
{
|
||||
#ifdef CL_DEVICE_TOPOLOGY_AMD
|
||||
hwloc_obj_t osdev;
|
||||
cl_device_topology_amd amdtopo;
|
||||
cl_int clret;
|
||||
unsigned pcidomain, pcibus, pcidevice, pcifunc;
|
||||
|
||||
clret = clGetDeviceInfo(device, CL_DEVICE_TOPOLOGY_AMD, sizeof(amdtopo), &amdtopo, NULL);
|
||||
if (CL_SUCCESS != clret) {
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
if (CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD != amdtopo.raw.type) {
|
||||
if (hwloc_opencl_get_device_pci_busid(device, &pcidomain, &pcibus, &pcidevice, &pcifunc) < 0) {
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
@@ -181,18 +223,15 @@ hwloc_opencl_get_device_osdev(hwloc_topology_t topology __hwloc_attribute_unused
|
||||
continue;
|
||||
if (pcidev
|
||||
&& pcidev->type == HWLOC_OBJ_PCI_DEVICE
|
||||
&& pcidev->attr->pcidev.domain == 0
|
||||
&& pcidev->attr->pcidev.bus == amdtopo.pcie.bus
|
||||
&& pcidev->attr->pcidev.dev == amdtopo.pcie.device
|
||||
&& pcidev->attr->pcidev.func == amdtopo.pcie.function)
|
||||
&& pcidev->attr->pcidev.domain == pcidomain
|
||||
&& pcidev->attr->pcidev.bus == pcibus
|
||||
&& pcidev->attr->pcidev.dev == pcidevice
|
||||
&& pcidev->attr->pcidev.func == pcifunc)
|
||||
return osdev;
|
||||
/* if PCI are filtered out, we need a info attr to match on */
|
||||
}
|
||||
|
||||
return NULL;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
#ifndef HWLOC_OPENFABRICS_VERBS_H
|
||||
#define HWLOC_OPENFABRICS_VERBS_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/autogen/config.h"
|
||||
#ifdef HWLOC_LINUX_SYS
|
||||
#include <hwloc/linux.h>
|
||||
#include "hwloc/linux.h"
|
||||
#endif
|
||||
|
||||
#include <infiniband/verbs.h>
|
||||
|
||||
170
src/3rdparty/hwloc/include/hwloc/plugins.h
vendored
170
src/3rdparty/hwloc/include/hwloc/plugins.h
vendored
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2013-2017 Inria. All rights reserved.
|
||||
* Copyright © 2013-2019 Inria. All rights reserved.
|
||||
* Copyright © 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
@@ -13,7 +13,8 @@
|
||||
|
||||
struct hwloc_backend;
|
||||
|
||||
#include <hwloc.h>
|
||||
#include "hwloc.h"
|
||||
|
||||
#ifdef HWLOC_INSIDE_PLUGIN
|
||||
/* needed for hwloc_plugin_check_namespace() */
|
||||
#include <ltdl.h>
|
||||
@@ -25,52 +26,36 @@ struct hwloc_backend;
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** \brief Discovery component type */
|
||||
typedef enum hwloc_disc_component_type_e {
|
||||
/** \brief CPU-only discovery through the OS, or generic no-OS support.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_COMPONENT_TYPE_CPU = (1<<0),
|
||||
|
||||
/** \brief xml or synthetic,
|
||||
* platform-specific components such as bgq.
|
||||
* Anything the discovers CPU and everything else.
|
||||
* No misc backend is expected to complement a global component.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_COMPONENT_TYPE_GLOBAL = (1<<1),
|
||||
|
||||
/** \brief OpenCL, Cuda, etc.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_COMPONENT_TYPE_MISC = (1<<2)
|
||||
} hwloc_disc_component_type_t;
|
||||
|
||||
/** \brief Discovery component structure
|
||||
*
|
||||
* This is the major kind of components, taking care of the discovery.
|
||||
* They are registered by generic components, either statically-built or as plugins.
|
||||
*/
|
||||
struct hwloc_disc_component {
|
||||
/** \brief Discovery component type */
|
||||
hwloc_disc_component_type_t type;
|
||||
|
||||
/** \brief Name.
|
||||
* If this component is built as a plugin, this name does not have to match the plugin filename.
|
||||
*/
|
||||
const char *name;
|
||||
|
||||
/** \brief Component types to exclude, as an OR'ed set of ::hwloc_disc_component_type_e.
|
||||
/** \brief Discovery phases performed by this component.
|
||||
* OR'ed set of ::hwloc_disc_phase_t
|
||||
*/
|
||||
unsigned phases;
|
||||
|
||||
/** \brief Component phases to exclude, as an OR'ed set of ::hwloc_disc_phase_t.
|
||||
*
|
||||
* For a GLOBAL component, this usually includes all other types (~0).
|
||||
* For a GLOBAL component, this usually includes all other phases (\c ~UL).
|
||||
*
|
||||
* Other components only exclude types that may bring conflicting
|
||||
* topology information. MISC components should likely not be excluded
|
||||
* since they usually bring non-primary additional information.
|
||||
*/
|
||||
unsigned excludes;
|
||||
unsigned excluded_phases;
|
||||
|
||||
/** \brief Instantiate callback to create a backend from the component.
|
||||
* Parameters data1, data2, data3 are NULL except for components
|
||||
* that have special enabling routines such as hwloc_topology_set_xml(). */
|
||||
struct hwloc_backend * (*instantiate)(struct hwloc_disc_component *component, const void *data1, const void *data2, const void *data3);
|
||||
struct hwloc_backend * (*instantiate)(struct hwloc_topology *topology, struct hwloc_disc_component *component, unsigned excluded_phases, const void *data1, const void *data2, const void *data3);
|
||||
|
||||
/** \brief Component priority.
|
||||
* Used to sort topology->components, higher priority first.
|
||||
@@ -107,6 +92,72 @@ struct hwloc_disc_component {
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** \brief Discovery phase */
|
||||
typedef enum hwloc_disc_phase_e {
|
||||
/** \brief xml or synthetic, platform-specific components such as bgq.
|
||||
* Discovers everything including CPU, memory, I/O and everything else.
|
||||
* A component with a Global phase usually excludes all other phases.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_PHASE_GLOBAL = (1U<<0),
|
||||
|
||||
/** \brief CPU discovery.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_PHASE_CPU = (1U<<1),
|
||||
|
||||
/** \brief Attach memory to existing CPU objects.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_PHASE_MEMORY = (1U<<2),
|
||||
|
||||
/** \brief Attach PCI devices and bridges to existing CPU objects.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_PHASE_PCI = (1U<<3),
|
||||
|
||||
/** \brief I/O discovery that requires PCI devices (OS devices such as OpenCL, CUDA, etc.).
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_PHASE_IO = (1U<<4),
|
||||
|
||||
/** \brief Misc objects that gets added below anything else.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_PHASE_MISC = (1U<<5),
|
||||
|
||||
/** \brief Annotating existing objects, adding distances, etc.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_PHASE_ANNOTATE = (1U<<6),
|
||||
|
||||
/** \brief Final tweaks to a ready-to-use topology.
|
||||
* This phase runs once the topology is loaded, before it is returned to the topology.
|
||||
* Hence it may only use the main hwloc API for modifying the topology,
|
||||
* for instance by restricting it, adding info attributes, etc.
|
||||
* \hideinitializer */
|
||||
HWLOC_DISC_PHASE_TWEAK = (1U<<7)
|
||||
} hwloc_disc_phase_t;
|
||||
|
||||
/** \brief Discovery status flags */
|
||||
enum hwloc_disc_status_flag_e {
|
||||
/** \brief The sets of allowed resources were already retrieved \hideinitializer */
|
||||
HWLOC_DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES = (1UL<<1)
|
||||
};
|
||||
|
||||
/** \brief Discovery status structure
|
||||
*
|
||||
* Used by the core and backends to inform about what has been/is being done
|
||||
* during the discovery process.
|
||||
*/
|
||||
struct hwloc_disc_status {
|
||||
/** \brief The current discovery phase that is performed.
|
||||
* Must match one of the phases in the component phases field.
|
||||
*/
|
||||
hwloc_disc_phase_t phase;
|
||||
|
||||
/** \brief Dynamically excluded phases.
|
||||
* If a component decides during discovery that some phases are no longer needed.
|
||||
*/
|
||||
unsigned excluded_phases;
|
||||
|
||||
/** \brief OR'ed set of hwloc_disc_status_flag_e */
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
/** \brief Discovery backend structure
|
||||
*
|
||||
* A backend is the instantiation of a discovery component.
|
||||
@@ -116,6 +167,14 @@ struct hwloc_disc_component {
|
||||
* hwloc_backend_alloc() initializes all fields to default values
|
||||
* that the component may change (except "component" and "next")
|
||||
* before enabling the backend with hwloc_backend_enable().
|
||||
*
|
||||
* Most backends assume that the topology is_thissystem flag is
|
||||
* set because they talk to the underlying operating system.
|
||||
* However they may still be used in topologies without the
|
||||
* is_thissystem flag for debugging reasons.
|
||||
* In practice, they are usually auto-disabled in such cases
|
||||
* (excluded by xml or synthetic backends, or by environment
|
||||
* variables when changing the Linux fsroot or the x86 cpuid path).
|
||||
*/
|
||||
struct hwloc_backend {
|
||||
/** \private Reserved for the core, set by hwloc_backend_alloc() */
|
||||
@@ -127,12 +186,20 @@ struct hwloc_backend {
|
||||
/** \private Reserved for the core. Used internally to list backends topology->backends. */
|
||||
struct hwloc_backend * next;
|
||||
|
||||
/** \brief Discovery phases performed by this component, possibly without some of them if excluded by other components.
|
||||
* OR'ed set of ::hwloc_disc_phase_t
|
||||
*/
|
||||
unsigned phases;
|
||||
|
||||
/** \brief Backend flags, currently always 0. */
|
||||
unsigned long flags;
|
||||
|
||||
/** \brief Backend-specific 'is_thissystem' property.
|
||||
* Set to 0 or 1 if the backend should enforce the thissystem flag when it gets enabled.
|
||||
* Set to -1 if the backend doesn't care (default). */
|
||||
* Set to 0 if the backend disables the thissystem flag for this topology
|
||||
* (e.g. loading from xml or synthetic string,
|
||||
* or using a different fsroot on Linux, or a x86 CPUID dump).
|
||||
* Set to -1 if the backend doesn't care (default).
|
||||
*/
|
||||
int is_thissystem;
|
||||
|
||||
/** \brief Backend private data, or NULL if none. */
|
||||
@@ -147,20 +214,22 @@ struct hwloc_backend {
|
||||
* or because of an actual discovery/gathering failure.
|
||||
* May be NULL.
|
||||
*/
|
||||
int (*discover)(struct hwloc_backend *backend);
|
||||
int (*discover)(struct hwloc_backend *backend, struct hwloc_disc_status *status);
|
||||
|
||||
/** \brief Callback used by the PCI backend to retrieve the locality of a PCI object from the OS/cpu backend.
|
||||
* May be NULL. */
|
||||
/** \brief Callback to retrieve the locality of a PCI object.
|
||||
* Called by the PCI core when attaching PCI hierarchy to CPU objects.
|
||||
* May be NULL.
|
||||
*/
|
||||
int (*get_pci_busid_cpuset)(struct hwloc_backend *backend, struct hwloc_pcidev_attr_s *busid, hwloc_bitmap_t cpuset);
|
||||
};
|
||||
|
||||
/** \brief Allocate a backend structure, set good default values, initialize backend->component and topology, etc.
|
||||
* The caller will then modify whatever needed, and call hwloc_backend_enable().
|
||||
*/
|
||||
HWLOC_DECLSPEC struct hwloc_backend * hwloc_backend_alloc(struct hwloc_disc_component *component);
|
||||
HWLOC_DECLSPEC struct hwloc_backend * hwloc_backend_alloc(struct hwloc_topology *topology, struct hwloc_disc_component *component);
|
||||
|
||||
/** \brief Enable a previously allocated and setup backend. */
|
||||
HWLOC_DECLSPEC int hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *backend);
|
||||
HWLOC_DECLSPEC int hwloc_backend_enable(struct hwloc_backend *backend);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -480,7 +549,9 @@ HWLOC_DECLSPEC hwloc_obj_type_t hwloc_pcidisc_check_bridge_type(unsigned device_
|
||||
*
|
||||
* Returns -1 and destroys /p obj if bridge fields are invalid.
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_pcidisc_setup_bridge_attr(hwloc_obj_t obj, const unsigned char *config);
|
||||
HWLOC_DECLSPEC int hwloc_pcidisc_find_bridge_buses(unsigned domain, unsigned bus, unsigned dev, unsigned func,
|
||||
unsigned *secondary_busp, unsigned *subordinate_busp,
|
||||
const unsigned char *config);
|
||||
|
||||
/** \brief Insert a PCI object in the given PCI tree by looking at PCI bus IDs.
|
||||
*
|
||||
@@ -490,10 +561,7 @@ HWLOC_DECLSPEC void hwloc_pcidisc_tree_insert_by_busid(struct hwloc_obj **treep,
|
||||
|
||||
/** \brief Add some hostbridges on top of the given tree of PCI objects and attach them to the topology.
|
||||
*
|
||||
* For now, they will be attached to the root object. The core will move them to their actual PCI
|
||||
* locality using hwloc_pci_belowroot_apply_locality() at the end of the discovery.
|
||||
*
|
||||
* In the meantime, other backends lookup PCI objects or localities (for instance to attach OS devices)
|
||||
* Other backends may lookup PCI objects or localities (for instance to attach OS devices)
|
||||
* by using hwloc_pcidisc_find_by_busid() or hwloc_pcidisc_find_busid_parent().
|
||||
*/
|
||||
HWLOC_DECLSPEC int hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, struct hwloc_obj *tree);
|
||||
@@ -507,32 +575,14 @@ HWLOC_DECLSPEC int hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, st
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** \brief Find the PCI object that matches the bus ID.
|
||||
*
|
||||
* To be used after a PCI backend added PCI devices with hwloc_pcidisc_tree_attach()
|
||||
* and before the core moves them to their actual location with hwloc_pci_belowroot_apply_locality().
|
||||
*
|
||||
* If no exactly matching object is found, return the container bridge if any, or NULL.
|
||||
*
|
||||
* On failure, it may be possible to find the PCI locality (instead of the PCI device)
|
||||
* by calling hwloc_pcidisc_find_busid_parent().
|
||||
*
|
||||
* \note This is semantically identical to hwloc_get_pcidev_by_busid() which only works
|
||||
* after the topology is fully loaded.
|
||||
*/
|
||||
HWLOC_DECLSPEC struct hwloc_obj * hwloc_pcidisc_find_by_busid(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func);
|
||||
|
||||
/** \brief Find the normal parent of a PCI bus ID.
|
||||
*
|
||||
* Look at PCI affinity to find out where the given PCI bus ID should be attached.
|
||||
*
|
||||
* This function should be used to attach an I/O device directly under a normal
|
||||
* (non-I/O) object, instead of below a PCI object.
|
||||
* It is usually used by backends when hwloc_pcidisc_find_by_busid() failed
|
||||
* to find the hwloc object corresponding to this bus ID, for instance because
|
||||
* PCI discovery is not supported on this platform.
|
||||
* This function should be used to attach an I/O device under the corresponding
|
||||
* PCI object (if any), or under a normal (non-I/O) object with same locality.
|
||||
*/
|
||||
HWLOC_DECLSPEC struct hwloc_obj * hwloc_pcidisc_find_busid_parent(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func);
|
||||
HWLOC_DECLSPEC struct hwloc_obj * hwloc_pci_find_parent_by_busid(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
66
src/3rdparty/hwloc/include/hwloc/rename.h
vendored
66
src/3rdparty/hwloc/include/hwloc/rename.h
vendored
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright © 2010-2018 Inria. All rights reserved.
|
||||
* Copyright © 2010-2019 Inria. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef HWLOC_RENAME_H
|
||||
#define HWLOC_RENAME_H
|
||||
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include "hwloc/autogen/config.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -49,7 +49,9 @@ extern "C" {
|
||||
|
||||
#define HWLOC_OBJ_MACHINE HWLOC_NAME_CAPS(OBJ_MACHINE)
|
||||
#define HWLOC_OBJ_NUMANODE HWLOC_NAME_CAPS(OBJ_NUMANODE)
|
||||
#define HWLOC_OBJ_MEMCACHE HWLOC_NAME_CAPS(OBJ_MEMCACHE)
|
||||
#define HWLOC_OBJ_PACKAGE HWLOC_NAME_CAPS(OBJ_PACKAGE)
|
||||
#define HWLOC_OBJ_DIE HWLOC_NAME_CAPS(OBJ_DIE)
|
||||
#define HWLOC_OBJ_CORE HWLOC_NAME_CAPS(OBJ_CORE)
|
||||
#define HWLOC_OBJ_PU HWLOC_NAME_CAPS(OBJ_PU)
|
||||
#define HWLOC_OBJ_L1CACHE HWLOC_NAME_CAPS(OBJ_L1CACHE)
|
||||
@@ -116,7 +118,7 @@ extern "C" {
|
||||
|
||||
#define hwloc_topology_flags_e HWLOC_NAME(topology_flags_e)
|
||||
|
||||
#define HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM HWLOC_NAME_CAPS(TOPOLOGY_FLAG_WHOLE_SYSTEM)
|
||||
#define HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED HWLOC_NAME_CAPS(TOPOLOGY_FLAG_WITH_DISALLOWED)
|
||||
#define HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM HWLOC_NAME_CAPS(TOPOLOGY_FLAG_IS_THISSYSTEM)
|
||||
#define HWLOC_TOPOLOGY_FLAG_THISSYSTEM_ALLOWED_RESOURCES HWLOC_NAME_CAPS(TOPOLOGY_FLAG_THISSYSTEM_ALLOWED_RESOURCES)
|
||||
|
||||
@@ -124,6 +126,9 @@ extern "C" {
|
||||
#define hwloc_topology_set_synthetic HWLOC_NAME(topology_set_synthetic)
|
||||
#define hwloc_topology_set_xml HWLOC_NAME(topology_set_xml)
|
||||
#define hwloc_topology_set_xmlbuffer HWLOC_NAME(topology_set_xmlbuffer)
|
||||
#define hwloc_topology_components_flag_e HWLOC_NAME(hwloc_topology_components_flag_e)
|
||||
#define HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST HWLOC_NAME_CAPS(TOPOLOGY_COMPONENTS_FLAG_BLACKLIST)
|
||||
#define hwloc_topology_set_components HWLOC_NAME(topology_set_components)
|
||||
|
||||
#define hwloc_topology_set_flags HWLOC_NAME(topology_set_flags)
|
||||
#define hwloc_topology_is_thissystem HWLOC_NAME(topology_is_thissystem)
|
||||
@@ -151,10 +156,18 @@ extern "C" {
|
||||
|
||||
#define hwloc_restrict_flags_e HWLOC_NAME(restrict_flags_e)
|
||||
#define HWLOC_RESTRICT_FLAG_REMOVE_CPULESS HWLOC_NAME_CAPS(RESTRICT_FLAG_REMOVE_CPULESS)
|
||||
#define HWLOC_RESTRICT_FLAG_BYNODESET HWLOC_NAME_CAPS(RESTRICT_FLAG_BYNODESET)
|
||||
#define HWLOC_RESTRICT_FLAG_REMOVE_MEMLESS HWLOC_NAME_CAPS(RESTRICT_FLAG_REMOVE_MEMLESS)
|
||||
#define HWLOC_RESTRICT_FLAG_ADAPT_MISC HWLOC_NAME_CAPS(RESTRICT_FLAG_ADAPT_MISC)
|
||||
#define HWLOC_RESTRICT_FLAG_ADAPT_IO HWLOC_NAME_CAPS(RESTRICT_FLAG_ADAPT_IO)
|
||||
#define hwloc_topology_restrict HWLOC_NAME(topology_restrict)
|
||||
|
||||
#define hwloc_allow_flags_e HWLOC_NAME(allow_flags_e)
|
||||
#define HWLOC_ALLOW_FLAG_ALL HWLOC_NAME_CAPS(ALLOW_FLAG_ALL)
|
||||
#define HWLOC_ALLOW_FLAG_LOCAL_RESTRICTIONS HWLOC_NAME_CAPS(ALLOW_FLAG_LOCAL_RESTRICTIONS)
|
||||
#define HWLOC_ALLOW_FLAG_CUSTOM HWLOC_NAME_CAPS(ALLOW_FLAG_CUSTOM)
|
||||
#define hwloc_topology_allow HWLOC_NAME(topology_allow)
|
||||
|
||||
#define hwloc_topology_insert_misc_object HWLOC_NAME(topology_insert_misc_object)
|
||||
#define hwloc_topology_alloc_group_object HWLOC_NAME(topology_alloc_group_object)
|
||||
#define hwloc_topology_insert_group_object HWLOC_NAME(topology_insert_group_object)
|
||||
@@ -172,6 +185,7 @@ extern "C" {
|
||||
#define HWLOC_TYPE_DEPTH_OS_DEVICE HWLOC_NAME_CAPS(TYPE_DEPTH_OS_DEVICE)
|
||||
#define HWLOC_TYPE_DEPTH_MISC HWLOC_NAME_CAPS(TYPE_DEPTH_MISC)
|
||||
#define HWLOC_TYPE_DEPTH_NUMANODE HWLOC_NAME_CAPS(TYPE_DEPTH_NUMANODE)
|
||||
#define HWLOC_TYPE_DEPTH_MEMCACHE HWLOC_NAME_CAPS(TYPE_DEPTH_MEMCACHE)
|
||||
|
||||
#define hwloc_get_depth_type HWLOC_NAME(get_depth_type)
|
||||
#define hwloc_get_nbobjs_by_depth HWLOC_NAME(get_nbobjs_by_depth)
|
||||
@@ -266,10 +280,12 @@ extern "C" {
|
||||
#define hwloc_bitmap_zero HWLOC_NAME(bitmap_zero)
|
||||
#define hwloc_bitmap_fill HWLOC_NAME(bitmap_fill)
|
||||
#define hwloc_bitmap_from_ulong HWLOC_NAME(bitmap_from_ulong)
|
||||
|
||||
#define hwloc_bitmap_from_ulongs HWLOC_NAME(bitmap_from_ulongs)
|
||||
#define hwloc_bitmap_from_ith_ulong HWLOC_NAME(bitmap_from_ith_ulong)
|
||||
#define hwloc_bitmap_to_ulong HWLOC_NAME(bitmap_to_ulong)
|
||||
#define hwloc_bitmap_to_ith_ulong HWLOC_NAME(bitmap_to_ith_ulong)
|
||||
#define hwloc_bitmap_to_ulongs HWLOC_NAME(bitmap_to_ulongs)
|
||||
#define hwloc_bitmap_nr_ulongs HWLOC_NAME(bitmap_nr_ulongs)
|
||||
#define hwloc_bitmap_only HWLOC_NAME(bitmap_only)
|
||||
#define hwloc_bitmap_allbut HWLOC_NAME(bitmap_allbut)
|
||||
#define hwloc_bitmap_set HWLOC_NAME(bitmap_set)
|
||||
@@ -380,10 +396,13 @@ extern "C" {
|
||||
#define HWLOC_DISTANCES_KIND_FROM_USER HWLOC_NAME_CAPS(DISTANCES_KIND_FROM_USER)
|
||||
#define HWLOC_DISTANCES_KIND_MEANS_LATENCY HWLOC_NAME_CAPS(DISTANCES_KIND_MEANS_LATENCY)
|
||||
#define HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH HWLOC_NAME_CAPS(DISTANCES_KIND_MEANS_BANDWIDTH)
|
||||
#define HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES HWLOC_NAME_CAPS(DISTANCES_KIND_HETEROGENEOUS_TYPES)
|
||||
|
||||
#define hwloc_distances_get HWLOC_NAME(distances_get)
|
||||
#define hwloc_distances_get_by_depth HWLOC_NAME(distances_get_by_depth)
|
||||
#define hwloc_distances_get_by_type HWLOC_NAME(distances_get_by_type)
|
||||
#define hwloc_distances_get_by_name HWLOC_NAME(distances_get_by_name)
|
||||
#define hwloc_distances_get_name HWLOC_NAME(distances_get_name)
|
||||
#define hwloc_distances_release HWLOC_NAME(distances_release)
|
||||
#define hwloc_distances_obj_index HWLOC_NAME(distances_obj_index)
|
||||
#define hwloc_distances_obj_pair_values HWLOC_NAME(distances_pair_values)
|
||||
@@ -396,6 +415,7 @@ extern "C" {
|
||||
#define hwloc_distances_remove HWLOC_NAME(distances_remove)
|
||||
#define hwloc_distances_remove_by_depth HWLOC_NAME(distances_remove_by_depth)
|
||||
#define hwloc_distances_remove_by_type HWLOC_NAME(distances_remove_by_type)
|
||||
#define hwloc_distances_release_remove HWLOC_NAME(distances_release_remove)
|
||||
|
||||
/* diff.h */
|
||||
|
||||
@@ -469,6 +489,8 @@ extern "C" {
|
||||
|
||||
/* opencl.h */
|
||||
|
||||
#define hwloc_cl_device_topology_amd HWLOC_NAME(cl_device_topology_amd)
|
||||
#define hwloc_opencl_get_device_pci_busid HWLOC_NAME(opencl_get_device_pci_ids)
|
||||
#define hwloc_opencl_get_device_cpuset HWLOC_NAME(opencl_get_device_cpuset)
|
||||
#define hwloc_opencl_get_device_osdev HWLOC_NAME(opencl_get_device_osdev)
|
||||
#define hwloc_opencl_get_device_osdev_by_index HWLOC_NAME(opencl_get_device_osdev_by_index)
|
||||
@@ -502,13 +524,22 @@ extern "C" {
|
||||
|
||||
/* hwloc/plugins.h */
|
||||
|
||||
#define hwloc_disc_component_type_e HWLOC_NAME(disc_component_type_e)
|
||||
#define HWLOC_DISC_COMPONENT_TYPE_CPU HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_CPU)
|
||||
#define HWLOC_DISC_COMPONENT_TYPE_GLOBAL HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_GLOBAL)
|
||||
#define HWLOC_DISC_COMPONENT_TYPE_MISC HWLOC_NAME_CAPS(DISC_COMPONENT_TYPE_MISC)
|
||||
#define hwloc_disc_component_type_t HWLOC_NAME(disc_component_type_t)
|
||||
#define hwloc_disc_phase_e HWLOC_NAME(disc_phase_e)
|
||||
#define HWLOC_DISC_PHASE_GLOBAL HWLOC_NAME_CAPS(DISC_PHASE_GLOBAL)
|
||||
#define HWLOC_DISC_PHASE_CPU HWLOC_NAME_CAPS(DISC_PHASE_CPU)
|
||||
#define HWLOC_DISC_PHASE_MEMORY HWLOC_NAME_CAPS(DISC_PHASE_MEMORY)
|
||||
#define HWLOC_DISC_PHASE_PCI HWLOC_NAME_CAPS(DISC_PHASE_PCI)
|
||||
#define HWLOC_DISC_PHASE_IO HWLOC_NAME_CAPS(DISC_PHASE_IO)
|
||||
#define HWLOC_DISC_PHASE_MISC HWLOC_NAME_CAPS(DISC_PHASE_MISC)
|
||||
#define HWLOC_DISC_PHASE_ANNOTATE HWLOC_NAME_CAPS(DISC_PHASE_ANNOTATE)
|
||||
#define HWLOC_DISC_PHASE_TWEAK HWLOC_NAME_CAPS(DISC_PHASE_TWEAK)
|
||||
#define hwloc_disc_phase_t HWLOC_NAME(disc_phase_t)
|
||||
#define hwloc_disc_component HWLOC_NAME(disc_component)
|
||||
|
||||
#define hwloc_disc_status_flag_e HWLOC_NAME(disc_status_flag_e)
|
||||
#define HWLOC_DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES HWLOC_NAME_CAPS(DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES)
|
||||
#define hwloc_disc_status HWLOC_NAME(disc_status)
|
||||
|
||||
#define hwloc_backend HWLOC_NAME(backend)
|
||||
|
||||
#define hwloc_backend_alloc HWLOC_NAME(backend_alloc)
|
||||
@@ -540,12 +571,11 @@ extern "C" {
|
||||
#define hwloc_pcidisc_find_cap HWLOC_NAME(pcidisc_find_cap)
|
||||
#define hwloc_pcidisc_find_linkspeed HWLOC_NAME(pcidisc_find_linkspeed)
|
||||
#define hwloc_pcidisc_check_bridge_type HWLOC_NAME(pcidisc_check_bridge_type)
|
||||
#define hwloc_pcidisc_setup_bridge_attr HWLOC_NAME(pcidisc_setup_bridge_attr)
|
||||
#define hwloc_pcidisc_find_bridge_buses HWLOC_NAME(pcidisc_find_bridge_buses)
|
||||
#define hwloc_pcidisc_tree_insert_by_busid HWLOC_NAME(pcidisc_tree_insert_by_busid)
|
||||
#define hwloc_pcidisc_tree_attach HWLOC_NAME(pcidisc_tree_attach)
|
||||
|
||||
#define hwloc_pcidisc_find_by_busid HWLOC_NAME(pcidisc_find_by_busid)
|
||||
#define hwloc_pcidisc_find_busid_parent HWLOC_NAME(pcidisc_find_busid_parent)
|
||||
#define hwloc_pci_find_parent_by_busid HWLOC_NAME(pcidisc_find_busid_parent)
|
||||
|
||||
/* hwloc/deprecated.h */
|
||||
|
||||
@@ -571,8 +601,9 @@ extern "C" {
|
||||
|
||||
/* private/misc.h */
|
||||
|
||||
#ifndef HWLOC_HAVE_CORRECT_SNPRINTF
|
||||
#define hwloc_snprintf HWLOC_NAME(snprintf)
|
||||
#define hwloc_namecoloncmp HWLOC_NAME(namecoloncmp)
|
||||
#endif
|
||||
#define hwloc_ffsl_manual HWLOC_NAME(ffsl_manual)
|
||||
#define hwloc_ffs32 HWLOC_NAME(ffs32)
|
||||
#define hwloc_ffsl_from_ffs32 HWLOC_NAME(ffsl_from_ffs32)
|
||||
@@ -631,8 +662,9 @@ extern "C" {
|
||||
#define hwloc_backends_is_thissystem HWLOC_NAME(backends_is_thissystem)
|
||||
#define hwloc_backends_find_callbacks HWLOC_NAME(backends_find_callbacks)
|
||||
|
||||
#define hwloc_backends_init HWLOC_NAME(backends_init)
|
||||
#define hwloc_topology_components_init HWLOC_NAME(topology_components_init)
|
||||
#define hwloc_backends_disable_all HWLOC_NAME(backends_disable_all)
|
||||
#define hwloc_topology_components_fini HWLOC_NAME(topology_components_fini)
|
||||
|
||||
#define hwloc_components_init HWLOC_NAME(components_init)
|
||||
#define hwloc_components_fini HWLOC_NAME(components_fini)
|
||||
@@ -656,7 +688,6 @@ extern "C" {
|
||||
|
||||
#define hwloc_cuda_component HWLOC_NAME(cuda_component)
|
||||
#define hwloc_gl_component HWLOC_NAME(gl_component)
|
||||
#define hwloc_linuxio_component HWLOC_NAME(linuxio_component)
|
||||
#define hwloc_nvml_component HWLOC_NAME(nvml_component)
|
||||
#define hwloc_opencl_component HWLOC_NAME(opencl_component)
|
||||
#define hwloc_pci_component HWLOC_NAME(pci_component)
|
||||
@@ -669,6 +700,9 @@ extern "C" {
|
||||
#define hwloc_special_level_s HWLOC_NAME(special_level_s)
|
||||
|
||||
#define hwloc_pci_forced_locality_s HWLOC_NAME(pci_forced_locality_s)
|
||||
#define hwloc_pci_locality_s HWLOC_NAME(pci_locality_s)
|
||||
|
||||
#define hwloc_topology_forced_component_s HWLOC_NAME(topology_forced_component)
|
||||
|
||||
#define hwloc_alloc_root_sets HWLOC_NAME(alloc_root_sets)
|
||||
#define hwloc_setup_pu_level HWLOC_NAME(setup_pu_level)
|
||||
@@ -687,8 +721,8 @@ extern "C" {
|
||||
#define hwloc_pci_discovery_init HWLOC_NAME(pci_discovery_init)
|
||||
#define hwloc_pci_discovery_prepare HWLOC_NAME(pci_discovery_prepare)
|
||||
#define hwloc_pci_discovery_exit HWLOC_NAME(pci_discovery_exit)
|
||||
#define hwloc_pci_find_by_busid HWLOC_NAME(pcidisc_find_by_busid)
|
||||
#define hwloc_find_insert_io_parent_by_complete_cpuset HWLOC_NAME(hwloc_find_insert_io_parent_by_complete_cpuset)
|
||||
#define hwloc_pci_belowroot_apply_locality HWLOC_NAME(pci_belowroot_apply_locality)
|
||||
|
||||
#define hwloc__add_info HWLOC_NAME(_add_info)
|
||||
#define hwloc__add_info_nodup HWLOC_NAME(_add_info_nodup)
|
||||
|
||||
2
src/3rdparty/hwloc/include/hwloc/shmem.h
vendored
2
src/3rdparty/hwloc/include/hwloc/shmem.h
vendored
@@ -10,7 +10,7 @@
|
||||
#ifndef HWLOC_SHMEM_H
|
||||
#define HWLOC_SHMEM_H
|
||||
|
||||
#include <hwloc.h>
|
||||
#include "hwloc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
12
src/3rdparty/hwloc/include/private/components.h
vendored
12
src/3rdparty/hwloc/include/private/components.h
vendored
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2012-2015 Inria. All rights reserved.
|
||||
* Copyright © 2012-2019 Inria. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
#ifndef PRIVATE_COMPONENTS_H
|
||||
#define PRIVATE_COMPONENTS_H 1
|
||||
|
||||
#include <hwloc/plugins.h>
|
||||
#include "hwloc/plugins.h"
|
||||
|
||||
struct hwloc_topology;
|
||||
|
||||
extern int hwloc_disc_component_force_enable(struct hwloc_topology *topology,
|
||||
int envvar_forced, /* 1 if forced through envvar, 0 if forced through API */
|
||||
int type, const char *name,
|
||||
const char *name,
|
||||
const void *data1, const void *data2, const void *data3);
|
||||
extern void hwloc_disc_components_enable_others(struct hwloc_topology *topology);
|
||||
|
||||
@@ -30,10 +30,12 @@ extern void hwloc_disc_components_enable_others(struct hwloc_topology *topology)
|
||||
extern void hwloc_backends_is_thissystem(struct hwloc_topology *topology);
|
||||
extern void hwloc_backends_find_callbacks(struct hwloc_topology *topology);
|
||||
|
||||
/* Initialize the list of backends used by a topology */
|
||||
extern void hwloc_backends_init(struct hwloc_topology *topology);
|
||||
/* Initialize the lists of components and backends used by a topology */
|
||||
extern void hwloc_topology_components_init(struct hwloc_topology *topology);
|
||||
/* Disable and destroy all backends used by a topology */
|
||||
extern void hwloc_backends_disable_all(struct hwloc_topology *topology);
|
||||
/* Cleanup the lists of components used by a topology */
|
||||
extern void hwloc_topology_components_fini(struct hwloc_topology *topology);
|
||||
|
||||
/* Used by the core to setup/destroy the list of components */
|
||||
extern void hwloc_components_init(void); /* increases components refcount, should be called exactly once per topology (during init) */
|
||||
|
||||
4
src/3rdparty/hwloc/include/private/debug.h
vendored
4
src/3rdparty/hwloc/include/private/debug.h
vendored
@@ -11,8 +11,8 @@
|
||||
#ifndef HWLOC_DEBUG_H
|
||||
#define HWLOC_DEBUG_H
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <private/misc.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "private/misc.h"
|
||||
|
||||
#ifdef HWLOC_DEBUG
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2018 Inria. All rights reserved.
|
||||
* Copyright © 2018-2019 Inria. All rights reserved.
|
||||
*
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
@@ -29,7 +29,6 @@ HWLOC_DECLSPEC extern const struct hwloc_component hwloc_x86_component;
|
||||
/* I/O discovery */
|
||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_cuda_component;
|
||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_gl_component;
|
||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_linuxio_component;
|
||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_nvml_component;
|
||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_opencl_component;
|
||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_pci_component;
|
||||
|
||||
23
src/3rdparty/hwloc/include/private/misc.h
vendored
23
src/3rdparty/hwloc/include/private/misc.h
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2018 Inria. All rights reserved.
|
||||
* Copyright © 2009-2019 Inria. All rights reserved.
|
||||
* Copyright © 2009-2012 Université Bordeaux
|
||||
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
@@ -11,9 +11,9 @@
|
||||
#ifndef HWLOC_PRIVATE_MISC_H
|
||||
#define HWLOC_PRIVATE_MISC_H
|
||||
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include "hwloc/autogen/config.h"
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
|
||||
#ifdef HWLOC_HAVE_DECL_STRNCASECMP
|
||||
#ifdef HAVE_STRINGS_H
|
||||
@@ -439,14 +439,14 @@ hwloc_linux_pci_link_speed_from_string(const char *string)
|
||||
static __hwloc_inline int hwloc__obj_type_is_normal (hwloc_obj_type_t type)
|
||||
{
|
||||
/* type contiguity is asserted in topology_check() */
|
||||
return type <= HWLOC_OBJ_GROUP;
|
||||
return type <= HWLOC_OBJ_GROUP || type == HWLOC_OBJ_DIE;
|
||||
}
|
||||
|
||||
/* Any object attached to memory children, currently only NUMA nodes */
|
||||
/* Any object attached to memory children, currently NUMA nodes or Memory-side caches */
|
||||
static __hwloc_inline int hwloc__obj_type_is_memory (hwloc_obj_type_t type)
|
||||
{
|
||||
/* type contiguity is asserted in topology_check() */
|
||||
return type == HWLOC_OBJ_NUMANODE;
|
||||
return type == HWLOC_OBJ_NUMANODE || type == HWLOC_OBJ_MEMCACHE;
|
||||
}
|
||||
|
||||
/* I/O or Misc object, without cpusets or nodesets. */
|
||||
@@ -463,6 +463,7 @@ static __hwloc_inline int hwloc__obj_type_is_io (hwloc_obj_type_t type)
|
||||
return type >= HWLOC_OBJ_BRIDGE && type <= HWLOC_OBJ_OS_DEVICE;
|
||||
}
|
||||
|
||||
/* Any CPU caches (not Memory-side caches) */
|
||||
static __hwloc_inline int
|
||||
hwloc__obj_type_is_cache(hwloc_obj_type_t type)
|
||||
{
|
||||
@@ -572,12 +573,4 @@ typedef SSIZE_T ssize_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined HWLOC_WIN_SYS && !defined __MINGW32__ && !defined(__CYGWIN__)
|
||||
/* MSVC doesn't support C99 variable-length array */
|
||||
#include <malloc.h>
|
||||
#define HWLOC_VLA(_type, _name, _nb) _type *_name = (_type*) _alloca((_nb)*sizeof(_type))
|
||||
#else
|
||||
#define HWLOC_VLA(_type, _name, _nb) _type _name[_nb]
|
||||
#endif
|
||||
|
||||
#endif /* HWLOC_PRIVATE_MISC_H */
|
||||
|
||||
101
src/3rdparty/hwloc/include/private/private.h
vendored
101
src/3rdparty/hwloc/include/private/private.h
vendored
@@ -22,11 +22,12 @@
|
||||
#ifndef HWLOC_PRIVATE_H
|
||||
#define HWLOC_PRIVATE_H
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/bitmap.h>
|
||||
#include <private/components.h>
|
||||
#include <private/misc.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/bitmap.h"
|
||||
#include "private/components.h"
|
||||
#include "private/misc.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
@@ -39,7 +40,7 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#define HWLOC_TOPOLOGY_ABI 0x20000 /* version of the layout of struct topology */
|
||||
#define HWLOC_TOPOLOGY_ABI 0x20100 /* version of the layout of struct topology */
|
||||
|
||||
/*****************************************************
|
||||
* WARNING:
|
||||
@@ -67,12 +68,13 @@ struct hwloc_topology {
|
||||
void *adopted_shmem_addr;
|
||||
size_t adopted_shmem_length;
|
||||
|
||||
#define HWLOC_NR_SLEVELS 5
|
||||
#define HWLOC_NR_SLEVELS 6
|
||||
#define HWLOC_SLEVEL_NUMANODE 0
|
||||
#define HWLOC_SLEVEL_BRIDGE 1
|
||||
#define HWLOC_SLEVEL_PCIDEV 2
|
||||
#define HWLOC_SLEVEL_OSDEV 3
|
||||
#define HWLOC_SLEVEL_MISC 4
|
||||
#define HWLOC_SLEVEL_MEMCACHE 5
|
||||
/* order must match negative depth, it's asserted in setup_defaults() */
|
||||
#define HWLOC_SLEVEL_FROM_DEPTH(x) (HWLOC_TYPE_DEPTH_NUMANODE-(x))
|
||||
#define HWLOC_SLEVEL_TO_DEPTH(x) (HWLOC_TYPE_DEPTH_NUMANODE-(x))
|
||||
@@ -86,6 +88,7 @@ struct hwloc_topology {
|
||||
hwloc_bitmap_t allowed_nodeset;
|
||||
|
||||
struct hwloc_binding_hooks {
|
||||
/* These are actually rather OS hooks since some of them are not about binding */
|
||||
int (*set_thisproc_cpubind)(hwloc_topology_t topology, hwloc_const_cpuset_t set, int flags);
|
||||
int (*get_thisproc_cpubind)(hwloc_topology_t topology, hwloc_cpuset_t set, int flags);
|
||||
int (*set_thisthread_cpubind)(hwloc_topology_t topology, hwloc_const_cpuset_t set, int flags);
|
||||
@@ -127,20 +130,35 @@ struct hwloc_topology {
|
||||
int userdata_not_decoded;
|
||||
|
||||
struct hwloc_internal_distances_s {
|
||||
hwloc_obj_type_t type;
|
||||
char *name; /* FIXME: needs an API to set it from user */
|
||||
|
||||
unsigned id; /* to match the container id field of public distances structure
|
||||
* not exported to XML, regenerated during _add()
|
||||
*/
|
||||
|
||||
/* if all objects have the same type, different_types is NULL and unique_type is valid.
|
||||
* otherwise unique_type is HWLOC_OBJ_TYPE_NONE and different_types contains individual objects types.
|
||||
*/
|
||||
hwloc_obj_type_t unique_type;
|
||||
hwloc_obj_type_t *different_types;
|
||||
|
||||
/* add union hwloc_obj_attr_u if we ever support groups */
|
||||
unsigned nbobjs;
|
||||
uint64_t *indexes; /* array of OS or GP indexes before we can convert them into objs. */
|
||||
uint64_t *indexes; /* array of OS or GP indexes before we can convert them into objs.
|
||||
* OS indexes for distances covering only PUs or only NUMAnodes.
|
||||
*/
|
||||
#define HWLOC_DIST_TYPE_USE_OS_INDEX(_type) ((_type) == HWLOC_OBJ_PU || (_type == HWLOC_OBJ_NUMANODE))
|
||||
uint64_t *values; /* distance matrices, ordered according to the above indexes/objs array.
|
||||
* distance from i to j is stored in slot i*nbnodes+j.
|
||||
*/
|
||||
unsigned long kind;
|
||||
|
||||
#define HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID (1U<<0) /* if the objs array is valid below */
|
||||
unsigned iflags;
|
||||
|
||||
/* objects are currently stored in physical_index order */
|
||||
hwloc_obj_t *objs; /* array of objects */
|
||||
int objs_are_valid; /* set to 1 if the array objs is still valid, 0 if needs refresh */
|
||||
|
||||
unsigned id; /* to match the container id field of public distances structure */
|
||||
struct hwloc_internal_distances_s *prev, *next;
|
||||
} *first_dist, *last_dist;
|
||||
unsigned next_dist_id;
|
||||
@@ -153,8 +171,9 @@ struct hwloc_topology {
|
||||
|
||||
/* list of enabled backends. */
|
||||
struct hwloc_backend * backends;
|
||||
struct hwloc_backend * get_pci_busid_cpuset_backend;
|
||||
unsigned backend_excludes;
|
||||
struct hwloc_backend * get_pci_busid_cpuset_backend; /* first backend that provides get_pci_busid_cpuset() callback */
|
||||
unsigned backend_phases;
|
||||
unsigned backend_excluded_phases;
|
||||
|
||||
/* memory allocator for topology objects */
|
||||
struct hwloc_tma * tma;
|
||||
@@ -176,7 +195,6 @@ struct hwloc_topology {
|
||||
struct hwloc_numanode_attr_s machine_memory;
|
||||
|
||||
/* pci stuff */
|
||||
int need_pci_belowroot_apply_locality;
|
||||
int pci_has_forced_locality;
|
||||
unsigned pci_forced_locality_nr;
|
||||
struct hwloc_pci_forced_locality_s {
|
||||
@@ -185,13 +203,32 @@ struct hwloc_topology {
|
||||
hwloc_bitmap_t cpuset;
|
||||
} * pci_forced_locality;
|
||||
|
||||
/* component blacklisting */
|
||||
unsigned nr_blacklisted_components;
|
||||
struct hwloc_topology_forced_component_s {
|
||||
struct hwloc_disc_component *component;
|
||||
unsigned phases;
|
||||
} *blacklisted_components;
|
||||
|
||||
/* FIXME: keep until topo destroy and reuse for finding specific buses */
|
||||
struct hwloc_pci_locality_s {
|
||||
unsigned domain;
|
||||
unsigned bus_min;
|
||||
unsigned bus_max;
|
||||
hwloc_bitmap_t cpuset;
|
||||
hwloc_obj_t parent;
|
||||
struct hwloc_pci_locality_s *prev, *next;
|
||||
} *first_pci_locality, *last_pci_locality;
|
||||
};
|
||||
|
||||
extern void hwloc_alloc_root_sets(hwloc_obj_t root);
|
||||
extern void hwloc_setup_pu_level(struct hwloc_topology *topology, unsigned nb_pus);
|
||||
extern int hwloc_get_sysctlbyname(const char *name, int64_t *n);
|
||||
extern int hwloc_get_sysctl(int name[], unsigned namelen, int *n);
|
||||
extern int hwloc_fallback_nbprocessors(struct hwloc_topology *topology);
|
||||
|
||||
/* returns the number of CPU from the OS (only valid if thissystem) */
|
||||
#define HWLOC_FALLBACK_NBPROCESSORS_INCLUDE_OFFLINE 1 /* by default we try to get only the online CPUs */
|
||||
extern int hwloc_fallback_nbprocessors(unsigned flags);
|
||||
|
||||
extern int hwloc__object_cpusets_compare_first(hwloc_obj_t obj1, hwloc_obj_t obj2);
|
||||
extern void hwloc__reorder_children(hwloc_obj_t parent);
|
||||
@@ -208,19 +245,17 @@ extern void hwloc_pci_discovery_init(struct hwloc_topology *topology);
|
||||
extern void hwloc_pci_discovery_prepare(struct hwloc_topology *topology);
|
||||
extern void hwloc_pci_discovery_exit(struct hwloc_topology *topology);
|
||||
|
||||
/* Look for an object matching the given domain/bus/func,
|
||||
* either exactly or return the smallest container bridge
|
||||
*/
|
||||
extern struct hwloc_obj * hwloc_pci_find_by_busid(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func);
|
||||
|
||||
/* Look for an object matching complete cpuset exactly, or insert one.
|
||||
* Return NULL on failure.
|
||||
* Return a good fallback (object above) on failure to insert.
|
||||
*/
|
||||
extern hwloc_obj_t hwloc_find_insert_io_parent_by_complete_cpuset(struct hwloc_topology *topology, hwloc_cpuset_t cpuset);
|
||||
|
||||
/* Move PCI objects currently attached to the root object ot their actual location.
|
||||
* Called by the core at the end of hwloc_topology_load().
|
||||
* Prior to this call, all PCI objects may be found below the root object.
|
||||
* After this call and a reconnect of levels, all PCI objects are available through levels.
|
||||
*/
|
||||
extern int hwloc_pci_belowroot_apply_locality(struct hwloc_topology *topology);
|
||||
|
||||
extern int hwloc__add_info(struct hwloc_info_s **infosp, unsigned *countp, const char *name, const char *value);
|
||||
extern int hwloc__add_info_nodup(struct hwloc_info_s **infosp, unsigned *countp, const char *name, const char *value, int replace);
|
||||
extern int hwloc__move_infos(struct hwloc_info_s **dst_infosp, unsigned *dst_countp, struct hwloc_info_s **src_infosp, unsigned *src_countp);
|
||||
@@ -313,8 +348,8 @@ extern void hwloc_internal_distances_prepare(hwloc_topology_t topology);
|
||||
extern void hwloc_internal_distances_destroy(hwloc_topology_t topology);
|
||||
extern int hwloc_internal_distances_dup(hwloc_topology_t new, hwloc_topology_t old);
|
||||
extern void hwloc_internal_distances_refresh(hwloc_topology_t topology);
|
||||
extern int hwloc_internal_distances_add(hwloc_topology_t topology, unsigned nbobjs, hwloc_obj_t *objs, uint64_t *values, unsigned long kind, unsigned long flags);
|
||||
extern int hwloc_internal_distances_add_by_index(hwloc_topology_t topology, hwloc_obj_type_t type, unsigned nbobjs, uint64_t *indexes, uint64_t *values, unsigned long kind, unsigned long flags);
|
||||
extern int hwloc_internal_distances_add(hwloc_topology_t topology, const char *name, unsigned nbobjs, hwloc_obj_t *objs, uint64_t *values, unsigned long kind, unsigned long flags);
|
||||
extern int hwloc_internal_distances_add_by_index(hwloc_topology_t topology, const char *name, hwloc_obj_type_t unique_type, hwloc_obj_type_t *different_types, unsigned nbobjs, uint64_t *indexes, uint64_t *values, unsigned long kind, unsigned long flags);
|
||||
extern void hwloc_internal_distances_invalidate_cached_objs(hwloc_topology_t topology);
|
||||
|
||||
/* encode src buffer into target buffer.
|
||||
@@ -330,13 +365,19 @@ extern int hwloc_encode_to_base64(const char *src, size_t srclength, char *targe
|
||||
*/
|
||||
extern int hwloc_decode_from_base64(char const *src, char *target, size_t targsize);
|
||||
|
||||
/* Check whether needle matches the beginning of haystack, at least n, and up
|
||||
* to a colon or \0 */
|
||||
extern int hwloc_namecoloncmp(const char *haystack, const char *needle, size_t n);
|
||||
|
||||
/* On some systems, snprintf returns the size of written data, not the actually
|
||||
* required size. hwloc_snprintf always report the actually required size. */
|
||||
* required size. Sometimes it returns -1 on truncation too.
|
||||
* And sometimes it doesn't like NULL output buffers.
|
||||
* http://www.gnu.org/software/gnulib/manual/html_node/snprintf.html
|
||||
*
|
||||
* hwloc_snprintf behaves properly, but it's a bit overkill on the vast majority
|
||||
* of platforms, so don't enable it unless really needed.
|
||||
*/
|
||||
#ifdef HWLOC_HAVE_CORRECT_SNPRINTF
|
||||
#define hwloc_snprintf snprintf
|
||||
#else
|
||||
extern int hwloc_snprintf(char *str, size_t size, const char *format, ...) __hwloc_attribute_format(printf, 3, 4);
|
||||
#endif
|
||||
|
||||
/* Return the name of the currently running program, if supported.
|
||||
* If not NULL, must be freed by the caller.
|
||||
@@ -356,7 +397,7 @@ extern char * hwloc_progname(struct hwloc_topology *topology);
|
||||
#define HWLOC_GROUP_KIND_INTEL_MODULE 102 /* no subkind */
|
||||
#define HWLOC_GROUP_KIND_INTEL_TILE 103 /* no subkind */
|
||||
#define HWLOC_GROUP_KIND_INTEL_DIE 104 /* no subkind */
|
||||
#define HWLOC_GROUP_KIND_S390_BOOK 110 /* no subkind */
|
||||
#define HWLOC_GROUP_KIND_S390_BOOK 110 /* subkind 0 is book, subkind 1 is drawer (group of books) */
|
||||
#define HWLOC_GROUP_KIND_AMD_COMPUTE_UNIT 120 /* no subkind */
|
||||
/* then, OS-specific groups */
|
||||
#define HWLOC_GROUP_KIND_SOLARIS_PG_HW_PERF 200 /* subkind is group width */
|
||||
|
||||
5
src/3rdparty/hwloc/include/private/xml.h
vendored
5
src/3rdparty/hwloc/include/private/xml.h
vendored
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright © 2009-2019 Inria. All rights reserved.
|
||||
* Copyright © 2009-2017 Inria. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef PRIVATE_XML_H
|
||||
#define PRIVATE_XML_H 1
|
||||
|
||||
#include <hwloc.h>
|
||||
#include "hwloc.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -54,7 +54,6 @@ struct hwloc_xml_backend_data_s {
|
||||
unsigned nbnumanodes;
|
||||
hwloc_obj_t first_numanode, last_numanode; /* temporary cousin-list for handling v1distances */
|
||||
struct hwloc__xml_imported_v1distances_s *first_v1dist, *last_v1dist;
|
||||
int dont_merge_die_groups;
|
||||
};
|
||||
|
||||
/**************
|
||||
|
||||
2
src/3rdparty/hwloc/src/base64.c
vendored
2
src/3rdparty/hwloc/src/base64.c
vendored
@@ -11,7 +11,7 @@
|
||||
/* include hwloc's config before anything else
|
||||
* so that extensions and features are properly enabled
|
||||
*/
|
||||
#include <private/private.h>
|
||||
#include "private/private.h"
|
||||
|
||||
/* $OpenBSD: base64.c,v 1.5 2006/10/21 09:55:03 otto Exp $ */
|
||||
|
||||
|
||||
13
src/3rdparty/hwloc/src/bind.c
vendored
13
src/3rdparty/hwloc/src/bind.c
vendored
@@ -1,15 +1,16 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2018 Inria. All rights reserved.
|
||||
* Copyright © 2009-2019 Inria. All rights reserved.
|
||||
* Copyright © 2009-2010, 2012 Université Bordeaux
|
||||
* Copyright © 2011-2015 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <private/private.h>
|
||||
#include <hwloc/helper.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "private/private.h"
|
||||
#include "hwloc/helper.h"
|
||||
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
@@ -885,6 +886,8 @@ hwloc_set_binding_hooks(struct hwloc_topology *topology)
|
||||
} else {
|
||||
/* not this system, use dummy binding hooks that do nothing (but don't return ENOSYS) */
|
||||
hwloc_set_dummy_hooks(&topology->binding_hooks, &topology->support);
|
||||
|
||||
/* Linux has some hooks that also work in this case, but they are not strictly needed yet. */
|
||||
}
|
||||
|
||||
/* if not is_thissystem, set_cpubind is fake
|
||||
|
||||
55
src/3rdparty/hwloc/src/bitmap.c
vendored
55
src/3rdparty/hwloc/src/bitmap.c
vendored
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2017 Inria. All rights reserved.
|
||||
* Copyright © 2009-2018 Inria. All rights reserved.
|
||||
* Copyright © 2009-2011 Université Bordeaux
|
||||
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <private/misc.h>
|
||||
#include <private/private.h>
|
||||
#include <private/debug.h>
|
||||
#include <hwloc/bitmap.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "private/misc.h"
|
||||
#include "private/private.h"
|
||||
#include "private/debug.h"
|
||||
#include "hwloc/bitmap.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
@@ -766,6 +766,21 @@ int hwloc_bitmap_from_ith_ulong(struct hwloc_bitmap_s *set, unsigned i, unsigned
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hwloc_bitmap_from_ulongs(struct hwloc_bitmap_s *set, unsigned nr, const unsigned long *masks)
|
||||
{
|
||||
unsigned j;
|
||||
|
||||
HWLOC__BITMAP_CHECK(set);
|
||||
|
||||
if (hwloc_bitmap_reset_by_ulongs(set, nr) < 0)
|
||||
return -1;
|
||||
|
||||
for(j=0; j<nr; j++)
|
||||
set->ulongs[j] = masks[j];
|
||||
set->infinite = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long hwloc_bitmap_to_ulong(const struct hwloc_bitmap_s *set)
|
||||
{
|
||||
HWLOC__BITMAP_CHECK(set);
|
||||
@@ -780,6 +795,30 @@ unsigned long hwloc_bitmap_to_ith_ulong(const struct hwloc_bitmap_s *set, unsign
|
||||
return HWLOC_SUBBITMAP_READULONG(set, i);
|
||||
}
|
||||
|
||||
int hwloc_bitmap_to_ulongs(const struct hwloc_bitmap_s *set, unsigned nr, unsigned long *masks)
|
||||
{
|
||||
unsigned j;
|
||||
|
||||
HWLOC__BITMAP_CHECK(set);
|
||||
|
||||
for(j=0; j<nr; j++)
|
||||
masks[j] = HWLOC_SUBBITMAP_READULONG(set, j);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hwloc_bitmap_nr_ulongs(const struct hwloc_bitmap_s *set)
|
||||
{
|
||||
unsigned last;
|
||||
|
||||
HWLOC__BITMAP_CHECK(set);
|
||||
|
||||
if (set->infinite)
|
||||
return -1;
|
||||
|
||||
last = hwloc_bitmap_last(set);
|
||||
return (last + HWLOC_BITS_PER_LONG-1)/HWLOC_BITS_PER_LONG;
|
||||
}
|
||||
|
||||
int hwloc_bitmap_only(struct hwloc_bitmap_s * set, unsigned cpu)
|
||||
{
|
||||
unsigned index_ = HWLOC_SUBBITMAP_INDEX(cpu);
|
||||
|
||||
370
src/3rdparty/hwloc/src/components.c
vendored
370
src/3rdparty/hwloc/src/components.c
vendored
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
* Copyright © 2009-2017 Inria. All rights reserved.
|
||||
* Copyright © 2009-2019 Inria. All rights reserved.
|
||||
* Copyright © 2012 Université Bordeaux
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <private/private.h>
|
||||
#include <private/xml.h>
|
||||
#include <private/misc.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "private/private.h"
|
||||
#include "private/xml.h"
|
||||
#include "private/misc.h"
|
||||
|
||||
#define HWLOC_COMPONENT_STOP_NAME "stop"
|
||||
#define HWLOC_COMPONENT_EXCLUDE_CHAR '-'
|
||||
#define HWLOC_COMPONENT_SEPS ","
|
||||
#define HWLOC_COMPONENT_PHASESEP_CHAR ':'
|
||||
|
||||
/* list of all registered discovery components, sorted by priority, higher priority first.
|
||||
* noos is last because its priority is 0.
|
||||
@@ -232,17 +233,6 @@ hwloc_plugins_init(void)
|
||||
|
||||
#endif /* HWLOC_HAVE_PLUGINS */
|
||||
|
||||
static const char *
|
||||
hwloc_disc_component_type_string(hwloc_disc_component_type_t type)
|
||||
{
|
||||
switch (type) {
|
||||
case HWLOC_DISC_COMPONENT_TYPE_CPU: return "cpu";
|
||||
case HWLOC_DISC_COMPONENT_TYPE_GLOBAL: return "global";
|
||||
case HWLOC_DISC_COMPONENT_TYPE_MISC: return "misc";
|
||||
default: return "**unknown**";
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
hwloc_disc_component_register(struct hwloc_disc_component *component,
|
||||
const char *filename)
|
||||
@@ -256,21 +246,26 @@ hwloc_disc_component_register(struct hwloc_disc_component *component,
|
||||
return -1;
|
||||
}
|
||||
if (strchr(component->name, HWLOC_COMPONENT_EXCLUDE_CHAR)
|
||||
|| strchr(component->name, HWLOC_COMPONENT_PHASESEP_CHAR)
|
||||
|| strcspn(component->name, HWLOC_COMPONENT_SEPS) != strlen(component->name)) {
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Cannot register discovery component with name `%s' containing reserved characters `%c" HWLOC_COMPONENT_SEPS "'\n",
|
||||
component->name, HWLOC_COMPONENT_EXCLUDE_CHAR);
|
||||
return -1;
|
||||
}
|
||||
/* check that the component type is valid */
|
||||
switch ((unsigned) component->type) {
|
||||
case HWLOC_DISC_COMPONENT_TYPE_CPU:
|
||||
case HWLOC_DISC_COMPONENT_TYPE_GLOBAL:
|
||||
case HWLOC_DISC_COMPONENT_TYPE_MISC:
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Cannot register discovery component `%s' with unknown type %u\n",
|
||||
component->name, (unsigned) component->type);
|
||||
|
||||
/* check that the component phases are valid */
|
||||
if (!component->phases
|
||||
|| (component->phases != HWLOC_DISC_PHASE_GLOBAL
|
||||
&& component->phases & ~(HWLOC_DISC_PHASE_CPU
|
||||
|HWLOC_DISC_PHASE_MEMORY
|
||||
|HWLOC_DISC_PHASE_PCI
|
||||
|HWLOC_DISC_PHASE_IO
|
||||
|HWLOC_DISC_PHASE_MISC
|
||||
|HWLOC_DISC_PHASE_ANNOTATE
|
||||
|HWLOC_DISC_PHASE_TWEAK))) {
|
||||
fprintf(stderr, "Cannot register discovery component `%s' with invalid phases 0x%x\n",
|
||||
component->name, component->phases);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -295,8 +290,8 @@ hwloc_disc_component_register(struct hwloc_disc_component *component,
|
||||
prev = &((*prev)->next);
|
||||
}
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Registered %s discovery component `%s' with priority %u (%s%s)\n",
|
||||
hwloc_disc_component_type_string(component->type), component->name, component->priority,
|
||||
fprintf(stderr, "Registered discovery component `%s' phases 0x%x with priority %u (%s%s)\n",
|
||||
component->name, component->phases, component->priority,
|
||||
filename ? "from plugin " : "statically build", filename ? filename : "");
|
||||
|
||||
prev = &hwloc_disc_components;
|
||||
@@ -310,7 +305,7 @@ hwloc_disc_component_register(struct hwloc_disc_component *component,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <static-components.h>
|
||||
#include "static-components.h"
|
||||
|
||||
static void (**hwloc_component_finalize_cbs)(unsigned long);
|
||||
static unsigned hwloc_component_finalize_cb_count;
|
||||
@@ -415,31 +410,152 @@ hwloc_components_init(void)
|
||||
}
|
||||
|
||||
void
|
||||
hwloc_backends_init(struct hwloc_topology *topology)
|
||||
hwloc_topology_components_init(struct hwloc_topology *topology)
|
||||
{
|
||||
topology->nr_blacklisted_components = 0;
|
||||
topology->blacklisted_components = NULL;
|
||||
|
||||
topology->backends = NULL;
|
||||
topology->backend_excludes = 0;
|
||||
topology->backend_phases = 0;
|
||||
topology->backend_excluded_phases = 0;
|
||||
}
|
||||
|
||||
/* look for name among components, ignoring things after `:' */
|
||||
static struct hwloc_disc_component *
|
||||
hwloc_disc_component_find(int type /* hwloc_disc_component_type_t or -1 if any */,
|
||||
const char *name /* name of NULL if any */)
|
||||
hwloc_disc_component_find(const char *name, const char **endp)
|
||||
{
|
||||
struct hwloc_disc_component *comp = hwloc_disc_components;
|
||||
struct hwloc_disc_component *comp;
|
||||
size_t length;
|
||||
const char *end = strchr(name, HWLOC_COMPONENT_PHASESEP_CHAR);
|
||||
if (end) {
|
||||
length = end-name;
|
||||
if (endp)
|
||||
*endp = end+1;
|
||||
} else {
|
||||
length = strlen(name);
|
||||
if (endp)
|
||||
*endp = NULL;
|
||||
}
|
||||
|
||||
comp = hwloc_disc_components;
|
||||
while (NULL != comp) {
|
||||
if ((-1 == type || type == (int) comp->type)
|
||||
&& (NULL == name || !strcmp(name, comp->name)))
|
||||
if (!strncmp(name, comp->name, length))
|
||||
return comp;
|
||||
comp = comp->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
hwloc_phases_from_string(const char *s)
|
||||
{
|
||||
if (!s)
|
||||
return ~0U;
|
||||
if (s[0]<'0' || s[0]>'9') {
|
||||
if (!strcasecmp(s, "global"))
|
||||
return HWLOC_DISC_PHASE_GLOBAL;
|
||||
else if (!strcasecmp(s, "cpu"))
|
||||
return HWLOC_DISC_PHASE_CPU;
|
||||
if (!strcasecmp(s, "memory"))
|
||||
return HWLOC_DISC_PHASE_MEMORY;
|
||||
if (!strcasecmp(s, "pci"))
|
||||
return HWLOC_DISC_PHASE_PCI;
|
||||
if (!strcasecmp(s, "io"))
|
||||
return HWLOC_DISC_PHASE_IO;
|
||||
if (!strcasecmp(s, "misc"))
|
||||
return HWLOC_DISC_PHASE_MISC;
|
||||
if (!strcasecmp(s, "annotate"))
|
||||
return HWLOC_DISC_PHASE_ANNOTATE;
|
||||
if (!strcasecmp(s, "tweak"))
|
||||
return HWLOC_DISC_PHASE_TWEAK;
|
||||
return 0;
|
||||
}
|
||||
return (unsigned) strtoul(s, NULL, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
hwloc_disc_component_blacklist_one(struct hwloc_topology *topology,
|
||||
const char *name)
|
||||
{
|
||||
struct hwloc_topology_forced_component_s *blacklisted;
|
||||
struct hwloc_disc_component *comp;
|
||||
unsigned phases;
|
||||
unsigned i;
|
||||
|
||||
if (!strcmp(name, "linuxpci") || !strcmp(name, "linuxio")) {
|
||||
/* replace linuxpci and linuxio with linux (with IO phases)
|
||||
* for backward compatibility with pre-v2.0 and v2.0 respectively */
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Replacing deprecated component `%s' with `linux' IO phases in blacklisting\n", name);
|
||||
comp = hwloc_disc_component_find("linux", NULL);
|
||||
phases = HWLOC_DISC_PHASE_PCI | HWLOC_DISC_PHASE_IO | HWLOC_DISC_PHASE_MISC | HWLOC_DISC_PHASE_ANNOTATE;
|
||||
|
||||
} else {
|
||||
/* normal lookup */
|
||||
const char *end;
|
||||
comp = hwloc_disc_component_find(name, &end);
|
||||
phases = hwloc_phases_from_string(end);
|
||||
}
|
||||
if (!comp) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Blacklisting component `%s` phases 0x%x\n", comp->name, phases);
|
||||
|
||||
for(i=0; i<topology->nr_blacklisted_components; i++) {
|
||||
if (topology->blacklisted_components[i].component == comp) {
|
||||
topology->blacklisted_components[i].phases |= phases;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
blacklisted = realloc(topology->blacklisted_components, (topology->nr_blacklisted_components+1)*sizeof(*blacklisted));
|
||||
if (!blacklisted)
|
||||
return -1;
|
||||
|
||||
blacklisted[topology->nr_blacklisted_components].component = comp;
|
||||
blacklisted[topology->nr_blacklisted_components].phases = phases;
|
||||
topology->blacklisted_components = blacklisted;
|
||||
topology->nr_blacklisted_components++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
hwloc_topology_set_components(struct hwloc_topology *topology,
|
||||
unsigned long flags,
|
||||
const char *name)
|
||||
{
|
||||
if (topology->is_loaded) {
|
||||
errno = EBUSY;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (flags & ~HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* this flag is strictly required for now */
|
||||
if (flags != HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!strncmp(name, "all", 3) && name[3] == HWLOC_COMPONENT_PHASESEP_CHAR) {
|
||||
topology->backend_excluded_phases = hwloc_phases_from_string(name+4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return hwloc_disc_component_blacklist_one(topology, name);
|
||||
}
|
||||
|
||||
/* used by set_xml(), set_synthetic(), ... environment variables, ... to force the first backend */
|
||||
int
|
||||
hwloc_disc_component_force_enable(struct hwloc_topology *topology,
|
||||
int envvar_forced,
|
||||
int type, const char *name,
|
||||
const char *name,
|
||||
const void *data1, const void *data2, const void *data3)
|
||||
{
|
||||
struct hwloc_disc_component *comp;
|
||||
@@ -450,18 +566,28 @@ hwloc_disc_component_force_enable(struct hwloc_topology *topology,
|
||||
return -1;
|
||||
}
|
||||
|
||||
comp = hwloc_disc_component_find(type, name);
|
||||
comp = hwloc_disc_component_find(name, NULL);
|
||||
if (!comp) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
backend = comp->instantiate(comp, data1, data2, data3);
|
||||
backend = comp->instantiate(topology, comp, 0U /* force-enabled don't get any phase blacklisting */,
|
||||
data1, data2, data3);
|
||||
if (backend) {
|
||||
int err;
|
||||
backend->envvar_forced = envvar_forced;
|
||||
if (topology->backends)
|
||||
hwloc_backends_disable_all(topology);
|
||||
return hwloc_backend_enable(topology, backend);
|
||||
err = hwloc_backend_enable(backend);
|
||||
|
||||
if (comp->phases == HWLOC_DISC_PHASE_GLOBAL) {
|
||||
char *env = getenv("HWLOC_ANNOTATE_GLOBAL_COMPONENTS");
|
||||
if (env && atoi(env))
|
||||
topology->backend_excluded_phases &= ~HWLOC_DISC_PHASE_ANNOTATE;
|
||||
}
|
||||
|
||||
return err;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
@@ -469,29 +595,32 @@ hwloc_disc_component_force_enable(struct hwloc_topology *topology,
|
||||
static int
|
||||
hwloc_disc_component_try_enable(struct hwloc_topology *topology,
|
||||
struct hwloc_disc_component *comp,
|
||||
const char *comparg,
|
||||
int envvar_forced)
|
||||
int envvar_forced,
|
||||
unsigned blacklisted_phases)
|
||||
{
|
||||
struct hwloc_backend *backend;
|
||||
|
||||
if (topology->backend_excludes & comp->type) {
|
||||
if (!(comp->phases & ~(topology->backend_excluded_phases | blacklisted_phases))) {
|
||||
/* all this backend phases are already excluded, exclude the backend entirely */
|
||||
if (hwloc_components_verbose)
|
||||
/* do not warn if envvar_forced since system-wide HWLOC_COMPONENTS must be silently ignored after set_xml() etc.
|
||||
*/
|
||||
fprintf(stderr, "Excluding %s discovery component `%s', conflicts with excludes 0x%x\n",
|
||||
hwloc_disc_component_type_string(comp->type), comp->name, topology->backend_excludes);
|
||||
fprintf(stderr, "Excluding discovery component `%s' phases 0x%x, conflicts with excludes 0x%x\n",
|
||||
comp->name, comp->phases, topology->backend_excluded_phases);
|
||||
return -1;
|
||||
}
|
||||
|
||||
backend = comp->instantiate(comp, comparg, NULL, NULL);
|
||||
backend = comp->instantiate(topology, comp, topology->backend_excluded_phases | blacklisted_phases,
|
||||
NULL, NULL, NULL);
|
||||
if (!backend) {
|
||||
if (hwloc_components_verbose || envvar_forced)
|
||||
fprintf(stderr, "Failed to instantiate discovery component `%s'\n", comp->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
backend->phases &= ~blacklisted_phases;
|
||||
backend->envvar_forced = envvar_forced;
|
||||
return hwloc_backend_enable(topology, backend);
|
||||
return hwloc_backend_enable(backend);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -502,11 +631,12 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
|
||||
int tryall = 1;
|
||||
const char *_env;
|
||||
char *env; /* we'll to modify the env value, so duplicate it */
|
||||
unsigned i;
|
||||
|
||||
_env = getenv("HWLOC_COMPONENTS");
|
||||
env = _env ? strdup(_env) : NULL;
|
||||
|
||||
/* enable explicitly listed components */
|
||||
/* blacklist disabled components */
|
||||
if (env) {
|
||||
char *curenv = env;
|
||||
size_t s;
|
||||
@@ -516,21 +646,41 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
|
||||
if (s) {
|
||||
char c;
|
||||
|
||||
/* replace linuxpci with linuxio for backward compatibility with pre-v2.0 */
|
||||
if (!strncmp(curenv, "linuxpci", 8) && s == 8) {
|
||||
curenv[5] = 'i';
|
||||
curenv[6] = 'o';
|
||||
curenv[7] = *HWLOC_COMPONENT_SEPS;
|
||||
} else if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, "linuxpci", 8) && s == 9) {
|
||||
curenv[6] = 'i';
|
||||
curenv[7] = 'o';
|
||||
curenv[8] = *HWLOC_COMPONENT_SEPS;
|
||||
/* skip this name, it's a negated one */
|
||||
if (curenv[0] != HWLOC_COMPONENT_EXCLUDE_CHAR)
|
||||
goto nextname;
|
||||
}
|
||||
|
||||
if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR)
|
||||
goto nextname;
|
||||
/* save the last char and replace with \0 */
|
||||
c = curenv[s];
|
||||
curenv[s] = '\0';
|
||||
|
||||
/* blacklist it, and just ignore failures to allocate */
|
||||
hwloc_disc_component_blacklist_one(topology, curenv+1);
|
||||
|
||||
/* remove that blacklisted name from the string */
|
||||
for(i=0; i<s; i++)
|
||||
curenv[i] = *HWLOC_COMPONENT_SEPS;
|
||||
|
||||
/* restore chars (the second loop below needs env to be unmodified) */
|
||||
curenv[s] = c;
|
||||
}
|
||||
|
||||
nextname:
|
||||
curenv += s;
|
||||
if (*curenv)
|
||||
/* Skip comma */
|
||||
curenv++;
|
||||
}
|
||||
}
|
||||
|
||||
/* enable explicitly listed components */
|
||||
if (env) {
|
||||
char *curenv = env;
|
||||
size_t s;
|
||||
|
||||
while (*curenv) {
|
||||
s = strcspn(curenv, HWLOC_COMPONENT_SEPS);
|
||||
if (s) {
|
||||
char c, *name;
|
||||
|
||||
if (!strncmp(curenv, HWLOC_COMPONENT_STOP_NAME, s)) {
|
||||
tryall = 0;
|
||||
@@ -541,18 +691,31 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
|
||||
c = curenv[s];
|
||||
curenv[s] = '\0';
|
||||
|
||||
comp = hwloc_disc_component_find(-1, curenv);
|
||||
name = curenv;
|
||||
if (!strcmp(name, "linuxpci") || !strcmp(name, "linuxio")) {
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Replacing deprecated component `%s' with `linux' in envvar forcing\n", name);
|
||||
name = "linux";
|
||||
}
|
||||
|
||||
comp = hwloc_disc_component_find(name, NULL /* we enable the entire component, phases must be blacklisted separately */);
|
||||
if (comp) {
|
||||
hwloc_disc_component_try_enable(topology, comp, NULL, 1 /* envvar forced */);
|
||||
unsigned blacklisted_phases = 0U;
|
||||
for(i=0; i<topology->nr_blacklisted_components; i++)
|
||||
if (comp == topology->blacklisted_components[i].component) {
|
||||
blacklisted_phases = topology->blacklisted_components[i].phases;
|
||||
break;
|
||||
}
|
||||
if (comp->phases & ~blacklisted_phases)
|
||||
hwloc_disc_component_try_enable(topology, comp, 1 /* envvar forced */, blacklisted_phases);
|
||||
} else {
|
||||
fprintf(stderr, "Cannot find discovery component `%s'\n", curenv);
|
||||
fprintf(stderr, "Cannot find discovery component `%s'\n", name);
|
||||
}
|
||||
|
||||
/* restore chars (the second loop below needs env to be unmodified) */
|
||||
curenv[s] = c;
|
||||
}
|
||||
|
||||
nextname:
|
||||
curenv += s;
|
||||
if (*curenv)
|
||||
/* Skip comma */
|
||||
@@ -566,26 +729,24 @@ nextname:
|
||||
if (tryall) {
|
||||
comp = hwloc_disc_components;
|
||||
while (NULL != comp) {
|
||||
unsigned blacklisted_phases = 0U;
|
||||
if (!comp->enabled_by_default)
|
||||
goto nextcomp;
|
||||
/* check if this component was explicitly excluded in env */
|
||||
if (env) {
|
||||
char *curenv = env;
|
||||
while (*curenv) {
|
||||
size_t s = strcspn(curenv, HWLOC_COMPONENT_SEPS);
|
||||
if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, comp->name, s-1) && strlen(comp->name) == s-1) {
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Excluding %s discovery component `%s' because of HWLOC_COMPONENTS environment variable\n",
|
||||
hwloc_disc_component_type_string(comp->type), comp->name);
|
||||
goto nextcomp;
|
||||
}
|
||||
curenv += s;
|
||||
if (*curenv)
|
||||
/* Skip comma */
|
||||
curenv++;
|
||||
/* check if this component was blacklisted by the application */
|
||||
for(i=0; i<topology->nr_blacklisted_components; i++)
|
||||
if (comp == topology->blacklisted_components[i].component) {
|
||||
blacklisted_phases = topology->blacklisted_components[i].phases;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(comp->phases & ~blacklisted_phases)) {
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Excluding blacklisted discovery component `%s' phases 0x%x\n",
|
||||
comp->name, comp->phases);
|
||||
goto nextcomp;
|
||||
}
|
||||
hwloc_disc_component_try_enable(topology, comp, NULL, 0 /* defaults, not envvar forced */);
|
||||
|
||||
hwloc_disc_component_try_enable(topology, comp, 0 /* defaults, not envvar forced */, blacklisted_phases);
|
||||
nextcomp:
|
||||
comp = comp->next;
|
||||
}
|
||||
@@ -597,7 +758,7 @@ nextcomp:
|
||||
backend = topology->backends;
|
||||
fprintf(stderr, "Final list of enabled discovery components: ");
|
||||
while (backend != NULL) {
|
||||
fprintf(stderr, "%s%s", first ? "" : ",", backend->component->name);
|
||||
fprintf(stderr, "%s%s(0x%x)", first ? "" : ",", backend->component->name, backend->phases);
|
||||
backend = backend->next;
|
||||
first = 0;
|
||||
}
|
||||
@@ -638,7 +799,8 @@ hwloc_components_fini(void)
|
||||
}
|
||||
|
||||
struct hwloc_backend *
|
||||
hwloc_backend_alloc(struct hwloc_disc_component *component)
|
||||
hwloc_backend_alloc(struct hwloc_topology *topology,
|
||||
struct hwloc_disc_component *component)
|
||||
{
|
||||
struct hwloc_backend * backend = malloc(sizeof(*backend));
|
||||
if (!backend) {
|
||||
@@ -646,6 +808,12 @@ hwloc_backend_alloc(struct hwloc_disc_component *component)
|
||||
return NULL;
|
||||
}
|
||||
backend->component = component;
|
||||
backend->topology = topology;
|
||||
/* filter-out component phases that are excluded */
|
||||
backend->phases = component->phases & ~topology->backend_excluded_phases;
|
||||
if (backend->phases != component->phases && hwloc_components_verbose)
|
||||
fprintf(stderr, "Trying discovery component `%s' with phases 0x%x instead of 0x%x\n",
|
||||
component->name, backend->phases, component->phases);
|
||||
backend->flags = 0;
|
||||
backend->discover = NULL;
|
||||
backend->get_pci_busid_cpuset = NULL;
|
||||
@@ -665,14 +833,15 @@ hwloc_backend_disable(struct hwloc_backend *backend)
|
||||
}
|
||||
|
||||
int
|
||||
hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *backend)
|
||||
hwloc_backend_enable(struct hwloc_backend *backend)
|
||||
{
|
||||
struct hwloc_topology *topology = backend->topology;
|
||||
struct hwloc_backend **pprev;
|
||||
|
||||
/* check backend flags */
|
||||
if (backend->flags) {
|
||||
fprintf(stderr, "Cannot enable %s discovery component `%s' with unknown flags %lx\n",
|
||||
hwloc_disc_component_type_string(backend->component->type), backend->component->name, backend->flags);
|
||||
fprintf(stderr, "Cannot enable discovery component `%s' phases 0x%x with unknown flags %lx\n",
|
||||
backend->component->name, backend->component->phases, backend->flags);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -681,8 +850,8 @@ hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *back
|
||||
while (NULL != *pprev) {
|
||||
if ((*pprev)->component == backend->component) {
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Cannot enable %s discovery component `%s' twice\n",
|
||||
hwloc_disc_component_type_string(backend->component->type), backend->component->name);
|
||||
fprintf(stderr, "Cannot enable discovery component `%s' phases 0x%x twice\n",
|
||||
backend->component->name, backend->component->phases);
|
||||
hwloc_backend_disable(backend);
|
||||
errno = EBUSY;
|
||||
return -1;
|
||||
@@ -691,8 +860,8 @@ hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *back
|
||||
}
|
||||
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Enabling %s discovery component `%s'\n",
|
||||
hwloc_disc_component_type_string(backend->component->type), backend->component->name);
|
||||
fprintf(stderr, "Enabling discovery component `%s' with phases 0x%x (among 0x%x)\n",
|
||||
backend->component->name, backend->phases, backend->component->phases);
|
||||
|
||||
/* enqueue at the end */
|
||||
pprev = &topology->backends;
|
||||
@@ -701,8 +870,8 @@ hwloc_backend_enable(struct hwloc_topology *topology, struct hwloc_backend *back
|
||||
backend->next = *pprev;
|
||||
*pprev = backend;
|
||||
|
||||
backend->topology = topology;
|
||||
topology->backend_excludes |= backend->component->excludes;
|
||||
topology->backend_phases |= backend->component->phases;
|
||||
topology->backend_excluded_phases |= backend->component->excluded_phases;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -712,7 +881,7 @@ hwloc_backends_is_thissystem(struct hwloc_topology *topology)
|
||||
struct hwloc_backend *backend;
|
||||
const char *local_env;
|
||||
|
||||
/* Apply is_thissystem topology flag before we enforce envvar backends.
|
||||
/*
|
||||
* If the application changed the backend with set_foo(),
|
||||
* it may use set_flags() update the is_thissystem flag here.
|
||||
* If it changes the backend with environment variables below,
|
||||
@@ -775,11 +944,20 @@ hwloc_backends_disable_all(struct hwloc_topology *topology)
|
||||
while (NULL != (backend = topology->backends)) {
|
||||
struct hwloc_backend *next = backend->next;
|
||||
if (hwloc_components_verbose)
|
||||
fprintf(stderr, "Disabling %s discovery component `%s'\n",
|
||||
hwloc_disc_component_type_string(backend->component->type), backend->component->name);
|
||||
fprintf(stderr, "Disabling discovery component `%s'\n",
|
||||
backend->component->name);
|
||||
hwloc_backend_disable(backend);
|
||||
topology->backends = next;
|
||||
}
|
||||
topology->backends = NULL;
|
||||
topology->backend_excludes = 0;
|
||||
topology->backend_excluded_phases = 0;
|
||||
}
|
||||
|
||||
void
|
||||
hwloc_topology_components_fini(struct hwloc_topology *topology)
|
||||
{
|
||||
/* hwloc_backends_disable_all() must have been called earlier */
|
||||
assert(!topology->backends);
|
||||
|
||||
free(topology->blacklisted_components);
|
||||
}
|
||||
|
||||
15
src/3rdparty/hwloc/src/diff.c
vendored
15
src/3rdparty/hwloc/src/diff.c
vendored
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright © 2013-2018 Inria. All rights reserved.
|
||||
* Copyright © 2013-2019 Inria. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <private/private.h>
|
||||
#include <private/misc.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "private/private.h"
|
||||
#include "private/misc.h"
|
||||
|
||||
int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff)
|
||||
{
|
||||
@@ -351,7 +351,8 @@ int hwloc_topology_diff_build(hwloc_topology_t topo1,
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
if (dist1->type != dist2->type
|
||||
if (dist1->unique_type != dist2->unique_type
|
||||
|| dist1->different_types || dist2->different_types /* too lazy to support this case */
|
||||
|| dist1->nbobjs != dist2->nbobjs
|
||||
|| dist1->kind != dist2->kind
|
||||
|| memcmp(dist1->values, dist2->values, dist1->nbobjs * dist1->nbobjs * sizeof(*dist1->values))) {
|
||||
@@ -463,6 +464,10 @@ int hwloc_topology_diff_apply(hwloc_topology_t topology,
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (topology->adopted_shmem_addr) {
|
||||
errno = EPERM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (flags & ~HWLOC_TOPOLOGY_DIFF_APPLY_REVERSE) {
|
||||
errno = EINVAL;
|
||||
|
||||
369
src/3rdparty/hwloc/src/distances.c
vendored
369
src/3rdparty/hwloc/src/distances.c
vendored
@@ -1,19 +1,22 @@
|
||||
/*
|
||||
* Copyright © 2010-2018 Inria. All rights reserved.
|
||||
* Copyright © 2010-2019 Inria. All rights reserved.
|
||||
* Copyright © 2011-2012 Université Bordeaux
|
||||
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <private/private.h>
|
||||
#include <private/debug.h>
|
||||
#include <private/misc.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "private/private.h"
|
||||
#include "private/debug.h"
|
||||
#include "private/misc.h"
|
||||
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
|
||||
static struct hwloc_internal_distances_s *
|
||||
hwloc__internal_distances_from_public(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
||||
|
||||
/******************************************************
|
||||
* Global init, prepare, destroy, dup
|
||||
*/
|
||||
@@ -70,6 +73,8 @@ void hwloc_internal_distances_prepare(struct hwloc_topology *topology)
|
||||
|
||||
static void hwloc_internal_distances_free(struct hwloc_internal_distances_s *dist)
|
||||
{
|
||||
free(dist->name);
|
||||
free(dist->different_types);
|
||||
free(dist->indexes);
|
||||
free(dist->objs);
|
||||
free(dist->values);
|
||||
@@ -96,15 +101,35 @@ static int hwloc_internal_distances_dup_one(struct hwloc_topology *new, struct h
|
||||
newdist = hwloc_tma_malloc(tma, sizeof(*newdist));
|
||||
if (!newdist)
|
||||
return -1;
|
||||
if (olddist->name) {
|
||||
newdist->name = hwloc_tma_strdup(tma, olddist->name);
|
||||
if (!newdist->name) {
|
||||
assert(!tma || !tma->dontfree); /* this tma cannot fail to allocate */
|
||||
hwloc_internal_distances_free(newdist);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
newdist->name = NULL;
|
||||
}
|
||||
|
||||
newdist->type = olddist->type;
|
||||
if (olddist->different_types) {
|
||||
newdist->different_types = hwloc_tma_malloc(tma, nbobjs * sizeof(*newdist->different_types));
|
||||
if (!newdist->different_types) {
|
||||
assert(!tma || !tma->dontfree); /* this tma cannot fail to allocate */
|
||||
hwloc_internal_distances_free(newdist);
|
||||
return -1;
|
||||
}
|
||||
memcpy(newdist->different_types, olddist->different_types, nbobjs * sizeof(*newdist->different_types));
|
||||
} else
|
||||
newdist->different_types = NULL;
|
||||
newdist->unique_type = olddist->unique_type;
|
||||
newdist->nbobjs = nbobjs;
|
||||
newdist->kind = olddist->kind;
|
||||
newdist->id = olddist->id;
|
||||
|
||||
newdist->indexes = hwloc_tma_malloc(tma, nbobjs * sizeof(*newdist->indexes));
|
||||
newdist->objs = hwloc_tma_calloc(tma, nbobjs * sizeof(*newdist->objs));
|
||||
newdist->objs_are_valid = 0;
|
||||
newdist->iflags = olddist->iflags & ~HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID; /* must be revalidated after dup() */
|
||||
newdist->values = hwloc_tma_malloc(tma, nbobjs*nbobjs * sizeof(*newdist->values));
|
||||
if (!newdist->indexes || !newdist->objs || !newdist->values) {
|
||||
assert(!tma || !tma->dontfree); /* this tma cannot fail to allocate */
|
||||
@@ -150,6 +175,10 @@ int hwloc_distances_remove(hwloc_topology_t topology)
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (topology->adopted_shmem_addr) {
|
||||
errno = EPERM;
|
||||
return -1;
|
||||
}
|
||||
hwloc_internal_distances_destroy(topology);
|
||||
return 0;
|
||||
}
|
||||
@@ -163,6 +192,10 @@ int hwloc_distances_remove_by_depth(hwloc_topology_t topology, int depth)
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (topology->adopted_shmem_addr) {
|
||||
errno = EPERM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* switch back to types since we don't support groups for now */
|
||||
type = hwloc_get_depth_type(topology, depth);
|
||||
@@ -174,7 +207,7 @@ int hwloc_distances_remove_by_depth(hwloc_topology_t topology, int depth)
|
||||
next = topology->first_dist;
|
||||
while ((dist = next) != NULL) {
|
||||
next = dist->next;
|
||||
if (dist->type == type) {
|
||||
if (dist->unique_type == type) {
|
||||
if (next)
|
||||
next->prev = dist->prev;
|
||||
else
|
||||
@@ -190,6 +223,27 @@ int hwloc_distances_remove_by_depth(hwloc_topology_t topology, int depth)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hwloc_distances_release_remove(hwloc_topology_t topology,
|
||||
struct hwloc_distances_s *distances)
|
||||
{
|
||||
struct hwloc_internal_distances_s *dist = hwloc__internal_distances_from_public(topology, distances);
|
||||
if (!dist) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (dist->prev)
|
||||
dist->prev->next = dist->next;
|
||||
else
|
||||
topology->first_dist = dist->next;
|
||||
if (dist->next)
|
||||
dist->next->prev = dist->prev;
|
||||
else
|
||||
topology->last_dist = dist->prev;
|
||||
hwloc_internal_distances_free(dist);
|
||||
hwloc_distances_release(topology, distances);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
* Add distances to the topology
|
||||
*/
|
||||
@@ -201,17 +255,34 @@ hwloc__groups_by_distances(struct hwloc_topology *topology, unsigned nbobjs, str
|
||||
* the caller gives us the distances and objs pointers, we'll free them later.
|
||||
*/
|
||||
static int
|
||||
hwloc_internal_distances__add(hwloc_topology_t topology,
|
||||
hwloc_obj_type_t type, unsigned nbobjs, hwloc_obj_t *objs, uint64_t *indexes, uint64_t *values,
|
||||
unsigned long kind)
|
||||
hwloc_internal_distances__add(hwloc_topology_t topology, const char *name,
|
||||
hwloc_obj_type_t unique_type, hwloc_obj_type_t *different_types,
|
||||
unsigned nbobjs, hwloc_obj_t *objs, uint64_t *indexes, uint64_t *values,
|
||||
unsigned long kind, unsigned iflags)
|
||||
{
|
||||
struct hwloc_internal_distances_s *dist = calloc(1, sizeof(*dist));
|
||||
struct hwloc_internal_distances_s *dist;
|
||||
|
||||
if (different_types) {
|
||||
kind |= HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES; /* the user isn't forced to give it */
|
||||
} else if (kind & HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES) {
|
||||
errno = EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
dist = calloc(1, sizeof(*dist));
|
||||
if (!dist)
|
||||
goto err;
|
||||
|
||||
dist->type = type;
|
||||
if (name)
|
||||
dist->name = strdup(name); /* ignore failure */
|
||||
|
||||
dist->unique_type = unique_type;
|
||||
dist->different_types = different_types;
|
||||
dist->nbobjs = nbobjs;
|
||||
dist->kind = kind;
|
||||
dist->iflags = iflags;
|
||||
|
||||
assert(!!(iflags & HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID) == !!objs);
|
||||
|
||||
if (!objs) {
|
||||
assert(indexes);
|
||||
@@ -220,18 +291,16 @@ hwloc_internal_distances__add(hwloc_topology_t topology,
|
||||
dist->objs = calloc(nbobjs, sizeof(hwloc_obj_t));
|
||||
if (!dist->objs)
|
||||
goto err_with_dist;
|
||||
dist->objs_are_valid = 0;
|
||||
|
||||
} else {
|
||||
unsigned i;
|
||||
assert(!indexes);
|
||||
/* we only have objs, generate the indexes arrays so that we can refresh objs later */
|
||||
dist->objs = objs;
|
||||
dist->objs_are_valid = 1;
|
||||
dist->indexes = malloc(nbobjs * sizeof(*dist->indexes));
|
||||
if (!dist->indexes)
|
||||
goto err_with_dist;
|
||||
if (dist->type == HWLOC_OBJ_PU || dist->type == HWLOC_OBJ_NUMANODE) {
|
||||
if (HWLOC_DIST_TYPE_USE_OS_INDEX(dist->unique_type)) {
|
||||
for(i=0; i<nbobjs; i++)
|
||||
dist->indexes[i] = objs[i]->os_index;
|
||||
} else {
|
||||
@@ -256,16 +325,19 @@ hwloc_internal_distances__add(hwloc_topology_t topology,
|
||||
err_with_dist:
|
||||
free(dist);
|
||||
err:
|
||||
free(different_types);
|
||||
free(objs);
|
||||
free(indexes);
|
||||
free(values);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int hwloc_internal_distances_add_by_index(hwloc_topology_t topology,
|
||||
hwloc_obj_type_t type, unsigned nbobjs, uint64_t *indexes, uint64_t *values,
|
||||
int hwloc_internal_distances_add_by_index(hwloc_topology_t topology, const char *name,
|
||||
hwloc_obj_type_t unique_type, hwloc_obj_type_t *different_types, unsigned nbobjs, uint64_t *indexes, uint64_t *values,
|
||||
unsigned long kind, unsigned long flags)
|
||||
{
|
||||
unsigned iflags = 0; /* objs not valid */
|
||||
|
||||
if (nbobjs < 2) {
|
||||
errno = EINVAL;
|
||||
goto err;
|
||||
@@ -279,24 +351,71 @@ int hwloc_internal_distances_add_by_index(hwloc_topology_t topology,
|
||||
goto err;
|
||||
}
|
||||
|
||||
return hwloc_internal_distances__add(topology, type, nbobjs, NULL, indexes, values, kind);
|
||||
return hwloc_internal_distances__add(topology, name, unique_type, different_types, nbobjs, NULL, indexes, values, kind, iflags);
|
||||
|
||||
err:
|
||||
free(indexes);
|
||||
free(values);
|
||||
free(different_types);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int hwloc_internal_distances_add(hwloc_topology_t topology,
|
||||
static void
|
||||
hwloc_internal_distances_restrict(hwloc_obj_t *objs,
|
||||
uint64_t *indexes,
|
||||
uint64_t *values,
|
||||
unsigned nbobjs, unsigned disappeared);
|
||||
|
||||
int hwloc_internal_distances_add(hwloc_topology_t topology, const char *name,
|
||||
unsigned nbobjs, hwloc_obj_t *objs, uint64_t *values,
|
||||
unsigned long kind, unsigned long flags)
|
||||
{
|
||||
hwloc_obj_type_t unique_type, *different_types;
|
||||
unsigned i, disappeared = 0;
|
||||
unsigned iflags = HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID;
|
||||
|
||||
if (nbobjs < 2) {
|
||||
errno = EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (topology->grouping && (flags & HWLOC_DISTANCES_ADD_FLAG_GROUP)) {
|
||||
/* is there any NULL object? (useful in case of problem during insert in backends) */
|
||||
for(i=0; i<nbobjs; i++)
|
||||
if (!objs[i])
|
||||
disappeared++;
|
||||
if (disappeared) {
|
||||
/* some objects are NULL */
|
||||
if (disappeared == nbobjs) {
|
||||
/* nothing left, drop the matrix */
|
||||
free(objs);
|
||||
free(values);
|
||||
return 0;
|
||||
}
|
||||
/* restrict the matrix */
|
||||
hwloc_internal_distances_restrict(objs, NULL, values, nbobjs, disappeared);
|
||||
nbobjs -= disappeared;
|
||||
}
|
||||
|
||||
unique_type = objs[0]->type;
|
||||
for(i=1; i<nbobjs; i++)
|
||||
if (objs[i]->type != unique_type) {
|
||||
unique_type = HWLOC_OBJ_TYPE_NONE;
|
||||
break;
|
||||
}
|
||||
if (unique_type == HWLOC_OBJ_TYPE_NONE) {
|
||||
/* heterogeneous types */
|
||||
different_types = malloc(nbobjs * sizeof(*different_types));
|
||||
if (!different_types)
|
||||
goto err;
|
||||
for(i=0; i<nbobjs; i++)
|
||||
different_types[i] = objs[i]->type;
|
||||
|
||||
} else {
|
||||
/* homogeneous types */
|
||||
different_types = NULL;
|
||||
}
|
||||
|
||||
if (topology->grouping && (flags & HWLOC_DISTANCES_ADD_FLAG_GROUP) && !different_types) {
|
||||
float full_accuracy = 0.f;
|
||||
float *accuracies;
|
||||
unsigned nbaccuracies;
|
||||
@@ -310,8 +429,8 @@ int hwloc_internal_distances_add(hwloc_topology_t topology,
|
||||
}
|
||||
|
||||
if (topology->grouping_verbose) {
|
||||
unsigned i, j;
|
||||
int gp = (objs[0]->type != HWLOC_OBJ_NUMANODE && objs[0]->type != HWLOC_OBJ_PU);
|
||||
unsigned j;
|
||||
int gp = !HWLOC_DIST_TYPE_USE_OS_INDEX(unique_type);
|
||||
fprintf(stderr, "Trying to group objects using distance matrix:\n");
|
||||
fprintf(stderr, "%s", gp ? "gp_index" : "os_index");
|
||||
for(j=0; j<nbobjs; j++)
|
||||
@@ -329,7 +448,7 @@ int hwloc_internal_distances_add(hwloc_topology_t topology,
|
||||
kind, nbaccuracies, accuracies, 1 /* check the first matrice */);
|
||||
}
|
||||
|
||||
return hwloc_internal_distances__add(topology, objs[0]->type, nbobjs, objs, NULL, values, kind);
|
||||
return hwloc_internal_distances__add(topology, name, unique_type, different_types, nbobjs, objs, NULL, values, kind, iflags);
|
||||
|
||||
err:
|
||||
free(objs);
|
||||
@@ -348,7 +467,6 @@ int hwloc_distances_add(hwloc_topology_t topology,
|
||||
unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t *values,
|
||||
unsigned long kind, unsigned long flags)
|
||||
{
|
||||
hwloc_obj_type_t type;
|
||||
unsigned i;
|
||||
uint64_t *_values;
|
||||
hwloc_obj_t *_objs;
|
||||
@@ -358,6 +476,10 @@ int hwloc_distances_add(hwloc_topology_t topology,
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (topology->adopted_shmem_addr) {
|
||||
errno = EPERM;
|
||||
return -1;
|
||||
}
|
||||
if ((kind & ~HWLOC_DISTANCES_KIND_ALL)
|
||||
|| hwloc_weight_long(kind & HWLOC_DISTANCES_KIND_FROM_ALL) != 1
|
||||
|| hwloc_weight_long(kind & HWLOC_DISTANCES_KIND_MEANS_ALL) != 1
|
||||
@@ -368,15 +490,8 @@ int hwloc_distances_add(hwloc_topology_t topology,
|
||||
|
||||
/* no strict need to check for duplicates, things shouldn't break */
|
||||
|
||||
type = objs[0]->type;
|
||||
if (type == HWLOC_OBJ_GROUP) {
|
||||
/* not supported yet, would require we save the subkind together with the type. */
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
for(i=1; i<nbobjs; i++)
|
||||
if (!objs[i] || objs[i]->type != type) {
|
||||
if (!objs[i]) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
@@ -389,7 +504,7 @@ int hwloc_distances_add(hwloc_topology_t topology,
|
||||
|
||||
memcpy(_objs, objs, nbobjs*sizeof(hwloc_obj_t));
|
||||
memcpy(_values, values, nbobjs*nbobjs*sizeof(*_values));
|
||||
err = hwloc_internal_distances_add(topology, nbobjs, _objs, _values, kind, flags);
|
||||
err = hwloc_internal_distances_add(topology, NULL, nbobjs, _objs, _values, kind, flags);
|
||||
if (err < 0)
|
||||
goto out; /* _objs and _values freed in hwloc_internal_distances_add() */
|
||||
|
||||
@@ -409,9 +524,9 @@ int hwloc_distances_add(hwloc_topology_t topology,
|
||||
* Refresh objects in distances
|
||||
*/
|
||||
|
||||
static hwloc_obj_t hwloc_find_obj_by_type_and_gp_index(hwloc_topology_t topology, hwloc_obj_type_t type, uint64_t gp_index)
|
||||
static hwloc_obj_t hwloc_find_obj_by_depth_and_gp_index(hwloc_topology_t topology, unsigned depth, uint64_t gp_index)
|
||||
{
|
||||
hwloc_obj_t obj = hwloc_get_obj_by_type(topology, type, 0);
|
||||
hwloc_obj_t obj = hwloc_get_obj_by_depth(topology, depth, 0);
|
||||
while (obj) {
|
||||
if (obj->gp_index == gp_index)
|
||||
return obj;
|
||||
@@ -420,12 +535,31 @@ static hwloc_obj_t hwloc_find_obj_by_type_and_gp_index(hwloc_topology_t topology
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
hwloc_internal_distances_restrict(struct hwloc_internal_distances_s *dist,
|
||||
hwloc_obj_t *objs,
|
||||
unsigned disappeared)
|
||||
static hwloc_obj_t hwloc_find_obj_by_type_and_gp_index(hwloc_topology_t topology, hwloc_obj_type_t type, uint64_t gp_index)
|
||||
{
|
||||
int depth = hwloc_get_type_depth(topology, type);
|
||||
if (depth == HWLOC_TYPE_DEPTH_UNKNOWN)
|
||||
return NULL;
|
||||
if (depth == HWLOC_TYPE_DEPTH_MULTIPLE) {
|
||||
int topodepth = hwloc_topology_get_depth(topology);
|
||||
for(depth=0; depth<topodepth; depth++) {
|
||||
if (hwloc_get_depth_type(topology, depth) == type) {
|
||||
hwloc_obj_t obj = hwloc_find_obj_by_depth_and_gp_index(topology, depth, gp_index);
|
||||
if (obj)
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return hwloc_find_obj_by_depth_and_gp_index(topology, depth, gp_index);
|
||||
}
|
||||
|
||||
static void
|
||||
hwloc_internal_distances_restrict(hwloc_obj_t *objs,
|
||||
uint64_t *indexes,
|
||||
uint64_t *values,
|
||||
unsigned nbobjs, unsigned disappeared)
|
||||
{
|
||||
unsigned nbobjs = dist->nbobjs;
|
||||
unsigned i, newi;
|
||||
unsigned j, newj;
|
||||
|
||||
@@ -433,7 +567,7 @@ hwloc_internal_distances_restrict(struct hwloc_internal_distances_s *dist,
|
||||
if (objs[i]) {
|
||||
for(j=0, newj=0; j<nbobjs; j++)
|
||||
if (objs[j]) {
|
||||
dist->values[newi*(nbobjs-disappeared)+newj] = dist->values[i*nbobjs+j];
|
||||
values[newi*(nbobjs-disappeared)+newj] = values[i*nbobjs+j];
|
||||
newj++;
|
||||
}
|
||||
newi++;
|
||||
@@ -442,25 +576,25 @@ hwloc_internal_distances_restrict(struct hwloc_internal_distances_s *dist,
|
||||
for(i=0, newi=0; i<nbobjs; i++)
|
||||
if (objs[i]) {
|
||||
objs[newi] = objs[i];
|
||||
dist->indexes[newi] = dist->indexes[i];
|
||||
if (indexes)
|
||||
indexes[newi] = indexes[i];
|
||||
newi++;
|
||||
}
|
||||
|
||||
dist->nbobjs -= disappeared;
|
||||
}
|
||||
|
||||
static int
|
||||
hwloc_internal_distances_refresh_one(hwloc_topology_t topology,
|
||||
struct hwloc_internal_distances_s *dist)
|
||||
{
|
||||
hwloc_obj_type_t type = dist->type;
|
||||
hwloc_obj_type_t unique_type = dist->unique_type;
|
||||
hwloc_obj_type_t *different_types = dist->different_types;
|
||||
unsigned nbobjs = dist->nbobjs;
|
||||
hwloc_obj_t *objs = dist->objs;
|
||||
uint64_t *indexes = dist->indexes;
|
||||
unsigned disappeared = 0;
|
||||
unsigned i;
|
||||
|
||||
if (dist->objs_are_valid)
|
||||
if (dist->iflags & HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID)
|
||||
return 0;
|
||||
|
||||
for(i=0; i<nbobjs; i++) {
|
||||
@@ -468,12 +602,16 @@ hwloc_internal_distances_refresh_one(hwloc_topology_t topology,
|
||||
/* TODO use cpuset/nodeset to find pus/numas from the root?
|
||||
* faster than traversing the entire level?
|
||||
*/
|
||||
if (type == HWLOC_OBJ_PU)
|
||||
obj = hwloc_get_pu_obj_by_os_index(topology, (unsigned) indexes[i]);
|
||||
else if (type == HWLOC_OBJ_NUMANODE)
|
||||
obj = hwloc_get_numanode_obj_by_os_index(topology, (unsigned) indexes[i]);
|
||||
else
|
||||
obj = hwloc_find_obj_by_type_and_gp_index(topology, type, indexes[i]);
|
||||
if (HWLOC_DIST_TYPE_USE_OS_INDEX(unique_type)) {
|
||||
if (unique_type == HWLOC_OBJ_PU)
|
||||
obj = hwloc_get_pu_obj_by_os_index(topology, (unsigned) indexes[i]);
|
||||
else if (unique_type == HWLOC_OBJ_NUMANODE)
|
||||
obj = hwloc_get_numanode_obj_by_os_index(topology, (unsigned) indexes[i]);
|
||||
else
|
||||
abort();
|
||||
} else {
|
||||
obj = hwloc_find_obj_by_type_and_gp_index(topology, different_types ? different_types[i] : unique_type, indexes[i]);
|
||||
}
|
||||
objs[i] = obj;
|
||||
if (!obj)
|
||||
disappeared++;
|
||||
@@ -483,10 +621,12 @@ hwloc_internal_distances_refresh_one(hwloc_topology_t topology,
|
||||
/* became useless, drop */
|
||||
return -1;
|
||||
|
||||
if (disappeared)
|
||||
hwloc_internal_distances_restrict(dist, objs, disappeared);
|
||||
if (disappeared) {
|
||||
hwloc_internal_distances_restrict(objs, dist->indexes, dist->values, nbobjs, disappeared);
|
||||
dist->nbobjs -= disappeared;
|
||||
}
|
||||
|
||||
dist->objs_are_valid = 1;
|
||||
dist->iflags |= HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -520,32 +660,64 @@ hwloc_internal_distances_invalidate_cached_objs(hwloc_topology_t topology)
|
||||
{
|
||||
struct hwloc_internal_distances_s *dist;
|
||||
for(dist = topology->first_dist; dist; dist = dist->next)
|
||||
dist->objs_are_valid = 0;
|
||||
dist->iflags &= ~HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID;
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
* User API for getting distances
|
||||
*/
|
||||
|
||||
/* what we actually allocate for user queries, even if we only
|
||||
* return the distances part of it.
|
||||
*/
|
||||
struct hwloc_distances_container_s {
|
||||
unsigned id;
|
||||
struct hwloc_distances_s distances;
|
||||
};
|
||||
|
||||
#define HWLOC_DISTANCES_CONTAINER_OFFSET ((char*)&((struct hwloc_distances_container_s*)NULL)->distances - (char*)NULL)
|
||||
#define HWLOC_DISTANCES_CONTAINER(_d) (struct hwloc_distances_container_s *) ( ((char*)_d) - HWLOC_DISTANCES_CONTAINER_OFFSET )
|
||||
|
||||
static struct hwloc_internal_distances_s *
|
||||
hwloc__internal_distances_from_public(hwloc_topology_t topology, struct hwloc_distances_s *distances)
|
||||
{
|
||||
struct hwloc_distances_container_s *cont = HWLOC_DISTANCES_CONTAINER(distances);
|
||||
struct hwloc_internal_distances_s *dist;
|
||||
for(dist = topology->first_dist; dist; dist = dist->next)
|
||||
if (dist->id == cont->id)
|
||||
return dist;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
hwloc_distances_release(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||
struct hwloc_distances_s *distances)
|
||||
{
|
||||
struct hwloc_distances_container_s *cont = HWLOC_DISTANCES_CONTAINER(distances);
|
||||
free(distances->values);
|
||||
free(distances->objs);
|
||||
free(distances);
|
||||
free(cont);
|
||||
}
|
||||
|
||||
const char *
|
||||
hwloc_distances_get_name(hwloc_topology_t topology, struct hwloc_distances_s *distances)
|
||||
{
|
||||
struct hwloc_internal_distances_s *dist = hwloc__internal_distances_from_public(topology, distances);
|
||||
return dist ? dist->name : NULL;
|
||||
}
|
||||
|
||||
static struct hwloc_distances_s *
|
||||
hwloc_distances_get_one(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||
struct hwloc_internal_distances_s *dist)
|
||||
{
|
||||
struct hwloc_distances_container_s *cont;
|
||||
struct hwloc_distances_s *distances;
|
||||
unsigned nbobjs;
|
||||
|
||||
distances = malloc(sizeof(*distances));
|
||||
if (!distances)
|
||||
cont = malloc(sizeof(*cont));
|
||||
if (!cont)
|
||||
return NULL;
|
||||
distances = &cont->distances;
|
||||
|
||||
nbobjs = distances->nbobjs = dist->nbobjs;
|
||||
|
||||
@@ -560,18 +732,20 @@ hwloc_distances_get_one(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||
memcpy(distances->values, dist->values, nbobjs*nbobjs*sizeof(*distances->values));
|
||||
|
||||
distances->kind = dist->kind;
|
||||
|
||||
cont->id = dist->id;
|
||||
return distances;
|
||||
|
||||
out_with_objs:
|
||||
free(distances->objs);
|
||||
out:
|
||||
free(distances);
|
||||
free(cont);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
hwloc__distances_get(hwloc_topology_t topology,
|
||||
hwloc_obj_type_t type,
|
||||
const char *name, hwloc_obj_type_t type,
|
||||
unsigned *nrp, struct hwloc_distances_s **distancesp,
|
||||
unsigned long kind, unsigned long flags __hwloc_attribute_unused)
|
||||
{
|
||||
@@ -602,7 +776,10 @@ hwloc__distances_get(hwloc_topology_t topology,
|
||||
unsigned long kind_from = kind & HWLOC_DISTANCES_KIND_FROM_ALL;
|
||||
unsigned long kind_means = kind & HWLOC_DISTANCES_KIND_MEANS_ALL;
|
||||
|
||||
if (type != HWLOC_OBJ_TYPE_NONE && type != dist->type)
|
||||
if (name && (!dist->name || strcmp(name, dist->name)))
|
||||
continue;
|
||||
|
||||
if (type != HWLOC_OBJ_TYPE_NONE && type != dist->unique_type)
|
||||
continue;
|
||||
|
||||
if (kind_from && !(kind_from & dist->kind))
|
||||
@@ -640,7 +817,7 @@ hwloc_distances_get(hwloc_topology_t topology,
|
||||
return -1;
|
||||
}
|
||||
|
||||
return hwloc__distances_get(topology, HWLOC_OBJ_TYPE_NONE, nrp, distancesp, kind, flags);
|
||||
return hwloc__distances_get(topology, NULL, HWLOC_OBJ_TYPE_NONE, nrp, distancesp, kind, flags);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -655,14 +832,40 @@ hwloc_distances_get_by_depth(hwloc_topology_t topology, int depth,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* switch back to types since we don't support groups for now */
|
||||
/* FIXME: passing the depth of a group level may return group distances at a different depth */
|
||||
type = hwloc_get_depth_type(topology, depth);
|
||||
if (type == (hwloc_obj_type_t)-1) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return hwloc__distances_get(topology, type, nrp, distancesp, kind, flags);
|
||||
return hwloc__distances_get(topology, NULL, type, nrp, distancesp, kind, flags);
|
||||
}
|
||||
|
||||
int
|
||||
hwloc_distances_get_by_name(hwloc_topology_t topology, const char *name,
|
||||
unsigned *nrp, struct hwloc_distances_s **distancesp,
|
||||
unsigned long flags)
|
||||
{
|
||||
if (flags || !topology->is_loaded) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return hwloc__distances_get(topology, name, HWLOC_OBJ_TYPE_NONE, nrp, distancesp, HWLOC_DISTANCES_KIND_ALL, flags);
|
||||
}
|
||||
|
||||
int
|
||||
hwloc_distances_get_by_type(hwloc_topology_t topology, hwloc_obj_type_t type,
|
||||
unsigned *nrp, struct hwloc_distances_s **distancesp,
|
||||
unsigned long kind, unsigned long flags)
|
||||
{
|
||||
if (flags || !topology->is_loaded) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return hwloc__distances_get(topology, NULL, type, nrp, distancesp, kind, flags);
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
@@ -823,10 +1026,14 @@ hwloc__groups_by_distances(struct hwloc_topology *topology,
|
||||
float *accuracies,
|
||||
int needcheck)
|
||||
{
|
||||
HWLOC_VLA(unsigned, groupids, nbobjs);
|
||||
unsigned *groupids;
|
||||
unsigned nbgroups = 0;
|
||||
unsigned i,j;
|
||||
int verbose = topology->grouping_verbose;
|
||||
hwloc_obj_t *groupobjs;
|
||||
unsigned * groupsizes;
|
||||
uint64_t *groupvalues;
|
||||
unsigned failed = 0;
|
||||
|
||||
if (nbobjs <= 2)
|
||||
return;
|
||||
@@ -836,6 +1043,10 @@ hwloc__groups_by_distances(struct hwloc_topology *topology,
|
||||
/* TODO hwloc__find_groups_by_max_distance() for bandwidth */
|
||||
return;
|
||||
|
||||
groupids = malloc(nbobjs * sizeof(*groupids));
|
||||
if (!groupids)
|
||||
return;
|
||||
|
||||
for(i=0; i<nbaccuracies; i++) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Trying to group %u %s objects according to physical distances with accuracy %f\n",
|
||||
@@ -847,13 +1058,13 @@ hwloc__groups_by_distances(struct hwloc_topology *topology,
|
||||
break;
|
||||
}
|
||||
if (!nbgroups)
|
||||
return;
|
||||
goto out_with_groupids;
|
||||
|
||||
{
|
||||
HWLOC_VLA(hwloc_obj_t, groupobjs, nbgroups);
|
||||
HWLOC_VLA(unsigned, groupsizes, nbgroups);
|
||||
HWLOC_VLA(uint64_t, groupvalues, nbgroups*nbgroups);
|
||||
unsigned failed = 0;
|
||||
groupobjs = malloc(nbgroups * sizeof(*groupobjs));
|
||||
groupsizes = malloc(nbgroups * sizeof(*groupsizes));
|
||||
groupvalues = malloc(nbgroups * nbgroups * sizeof(*groupvalues));
|
||||
if (!groupobjs || !groupsizes || !groupvalues)
|
||||
goto out_with_groups;
|
||||
|
||||
/* create new Group objects and record their size */
|
||||
memset(&(groupsizes[0]), 0, sizeof(groupsizes[0]) * nbgroups);
|
||||
@@ -884,7 +1095,7 @@ hwloc__groups_by_distances(struct hwloc_topology *topology,
|
||||
|
||||
if (failed)
|
||||
/* don't try to group above if we got a NULL group here, just keep this incomplete level */
|
||||
return;
|
||||
goto out_with_groups;
|
||||
|
||||
/* factorize values */
|
||||
memset(&(groupvalues[0]), 0, sizeof(groupvalues[0]) * nbgroups * nbgroups);
|
||||
@@ -916,5 +1127,11 @@ hwloc__groups_by_distances(struct hwloc_topology *topology,
|
||||
#endif
|
||||
|
||||
hwloc__groups_by_distances(topology, nbgroups, groupobjs, groupvalues, kind, nbaccuracies, accuracies, 0 /* no need to check generated matrix */);
|
||||
}
|
||||
|
||||
out_with_groups:
|
||||
free(groupobjs);
|
||||
free(groupsizes);
|
||||
free(groupvalues);
|
||||
out_with_groupids:
|
||||
free(groupids);
|
||||
}
|
||||
|
||||
25
src/3rdparty/hwloc/src/misc.c
vendored
25
src/3rdparty/hwloc/src/misc.c
vendored
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2015 Inria. All rights reserved.
|
||||
* Copyright © 2009-2018 Inria. All rights reserved.
|
||||
* Copyright © 2009-2010 Université Bordeaux
|
||||
* Copyright © 2009-2018 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <private/private.h>
|
||||
#include <private/misc.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "private/private.h"
|
||||
#include "private/misc.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_SYS_UTSNAME_H
|
||||
@@ -28,6 +28,7 @@ extern char *program_invocation_name;
|
||||
extern char *__progname;
|
||||
#endif
|
||||
|
||||
#ifndef HWLOC_HAVE_CORRECT_SNPRINTF
|
||||
int hwloc_snprintf(char *str, size_t size, const char *format, ...)
|
||||
{
|
||||
int ret;
|
||||
@@ -77,21 +78,7 @@ int hwloc_snprintf(char *str, size_t size, const char *format, ...)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int hwloc_namecoloncmp(const char *haystack, const char *needle, size_t n)
|
||||
{
|
||||
size_t i = 0;
|
||||
while (*haystack && *haystack != ':') {
|
||||
int ha = *haystack++;
|
||||
int low_h = tolower(ha);
|
||||
int ne = *needle++;
|
||||
int low_n = tolower(ne);
|
||||
if (low_h != low_n)
|
||||
return 1;
|
||||
i++;
|
||||
}
|
||||
return i < n;
|
||||
}
|
||||
#endif
|
||||
|
||||
void hwloc_add_uname_info(struct hwloc_topology *topology __hwloc_attribute_unused,
|
||||
void *cached_uname __hwloc_attribute_unused)
|
||||
|
||||
401
src/3rdparty/hwloc/src/pci-common.c
vendored
401
src/3rdparty/hwloc/src/pci-common.c
vendored
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Copyright © 2009-2018 Inria. All rights reserved.
|
||||
* Copyright © 2009-2019 Inria. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/plugins.h>
|
||||
#include <private/private.h>
|
||||
#include <private/debug.h>
|
||||
#include <private/misc.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/plugins.h"
|
||||
#include "private/private.h"
|
||||
#include "private/debug.h"
|
||||
#include "private/misc.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
@@ -23,6 +23,11 @@
|
||||
#define close _close
|
||||
#endif
|
||||
|
||||
|
||||
/**************************************
|
||||
* Init/Exit and Forced PCI localities
|
||||
*/
|
||||
|
||||
static void
|
||||
hwloc_pci_forced_locality_parse_one(struct hwloc_topology *topology,
|
||||
const char *string /* must contain a ' ' */,
|
||||
@@ -109,11 +114,11 @@ hwloc_pci_forced_locality_parse(struct hwloc_topology *topology, const char *_en
|
||||
void
|
||||
hwloc_pci_discovery_init(struct hwloc_topology *topology)
|
||||
{
|
||||
topology->need_pci_belowroot_apply_locality = 0;
|
||||
|
||||
topology->pci_has_forced_locality = 0;
|
||||
topology->pci_forced_locality_nr = 0;
|
||||
topology->pci_forced_locality = NULL;
|
||||
|
||||
topology->first_pci_locality = topology->last_pci_locality = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -135,7 +140,7 @@ hwloc_pci_discovery_prepare(struct hwloc_topology *topology)
|
||||
if (!err) {
|
||||
if (st.st_size <= 64*1024) { /* random limit large enough to store multiple cpusets for thousands of PUs */
|
||||
buffer = malloc(st.st_size+1);
|
||||
if (read(fd, buffer, st.st_size) == st.st_size) {
|
||||
if (buffer && read(fd, buffer, st.st_size) == st.st_size) {
|
||||
buffer[st.st_size] = '\0';
|
||||
hwloc_pci_forced_locality_parse(topology, buffer);
|
||||
}
|
||||
@@ -152,16 +157,31 @@ hwloc_pci_discovery_prepare(struct hwloc_topology *topology)
|
||||
}
|
||||
|
||||
void
|
||||
hwloc_pci_discovery_exit(struct hwloc_topology *topology __hwloc_attribute_unused)
|
||||
hwloc_pci_discovery_exit(struct hwloc_topology *topology)
|
||||
{
|
||||
struct hwloc_pci_locality_s *cur;
|
||||
unsigned i;
|
||||
|
||||
for(i=0; i<topology->pci_forced_locality_nr; i++)
|
||||
hwloc_bitmap_free(topology->pci_forced_locality[i].cpuset);
|
||||
free(topology->pci_forced_locality);
|
||||
|
||||
cur = topology->first_pci_locality;
|
||||
while (cur) {
|
||||
struct hwloc_pci_locality_s *next = cur->next;
|
||||
hwloc_bitmap_free(cur->cpuset);
|
||||
free(cur);
|
||||
cur = next;
|
||||
}
|
||||
|
||||
hwloc_pci_discovery_init(topology);
|
||||
}
|
||||
|
||||
|
||||
/******************************
|
||||
* Inserting in Tree by Bus ID
|
||||
*/
|
||||
|
||||
#ifdef HWLOC_DEBUG
|
||||
static void
|
||||
hwloc_pci_traverse_print_cb(void * cbdata __hwloc_attribute_unused,
|
||||
@@ -324,32 +344,16 @@ hwloc_pcidisc_tree_insert_by_busid(struct hwloc_obj **treep,
|
||||
hwloc_pci_add_object(NULL /* no parent on top of tree */, treep, obj);
|
||||
}
|
||||
|
||||
int
|
||||
hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, struct hwloc_obj *old_tree)
|
||||
|
||||
/**********************
|
||||
* Attaching PCI Trees
|
||||
*/
|
||||
|
||||
static struct hwloc_obj *
|
||||
hwloc_pcidisc_add_hostbridges(struct hwloc_topology *topology,
|
||||
struct hwloc_obj *old_tree)
|
||||
{
|
||||
struct hwloc_obj **next_hb_p;
|
||||
enum hwloc_type_filter_e bfilter;
|
||||
|
||||
if (!old_tree)
|
||||
/* found nothing, exit */
|
||||
return 0;
|
||||
|
||||
#ifdef HWLOC_DEBUG
|
||||
hwloc_debug("%s", "\nPCI hierarchy:\n");
|
||||
hwloc_pci_traverse(NULL, old_tree, hwloc_pci_traverse_print_cb);
|
||||
hwloc_debug("%s", "\n");
|
||||
#endif
|
||||
|
||||
next_hb_p = &hwloc_get_root_obj(topology)->io_first_child;
|
||||
while (*next_hb_p)
|
||||
next_hb_p = &((*next_hb_p)->next_sibling);
|
||||
|
||||
bfilter = topology->type_filter[HWLOC_OBJ_BRIDGE];
|
||||
if (bfilter == HWLOC_TYPE_FILTER_KEEP_NONE) {
|
||||
*next_hb_p = old_tree;
|
||||
topology->modified = 1;
|
||||
goto done;
|
||||
}
|
||||
struct hwloc_obj * new = NULL, **newp = &new;
|
||||
|
||||
/*
|
||||
* tree points to all objects connected to any upstream bus in the machine.
|
||||
@@ -358,15 +362,29 @@ hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, struct hwloc_obj *old
|
||||
*/
|
||||
while (old_tree) {
|
||||
/* start a new host bridge */
|
||||
struct hwloc_obj *hostbridge = hwloc_alloc_setup_object(topology, HWLOC_OBJ_BRIDGE, HWLOC_UNKNOWN_INDEX);
|
||||
struct hwloc_obj **dstnextp = &hostbridge->io_first_child;
|
||||
struct hwloc_obj **srcnextp = &old_tree;
|
||||
struct hwloc_obj *child = *srcnextp;
|
||||
unsigned short current_domain = child->attr->pcidev.domain;
|
||||
unsigned char current_bus = child->attr->pcidev.bus;
|
||||
unsigned char current_subordinate = current_bus;
|
||||
struct hwloc_obj *hostbridge;
|
||||
struct hwloc_obj **dstnextp;
|
||||
struct hwloc_obj **srcnextp;
|
||||
struct hwloc_obj *child;
|
||||
unsigned short current_domain;
|
||||
unsigned char current_bus;
|
||||
unsigned char current_subordinate;
|
||||
|
||||
hwloc_debug("Starting new PCI hostbridge %04x:%02x\n", current_domain, current_bus);
|
||||
hostbridge = hwloc_alloc_setup_object(topology, HWLOC_OBJ_BRIDGE, HWLOC_UNKNOWN_INDEX);
|
||||
if (!hostbridge) {
|
||||
/* just queue remaining things without hostbridges and return */
|
||||
*newp = old_tree;
|
||||
return new;
|
||||
}
|
||||
dstnextp = &hostbridge->io_first_child;
|
||||
|
||||
srcnextp = &old_tree;
|
||||
child = *srcnextp;
|
||||
current_domain = child->attr->pcidev.domain;
|
||||
current_bus = child->attr->pcidev.bus;
|
||||
current_subordinate = current_bus;
|
||||
|
||||
hwloc_debug("Adding new PCI hostbridge %04x:%02x\n", current_domain, current_bus);
|
||||
|
||||
next_child:
|
||||
/* remove next child from tree */
|
||||
@@ -395,19 +413,14 @@ hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, struct hwloc_obj *old
|
||||
hostbridge->attr->bridge.downstream.pci.domain = current_domain;
|
||||
hostbridge->attr->bridge.downstream.pci.secondary_bus = current_bus;
|
||||
hostbridge->attr->bridge.downstream.pci.subordinate_bus = current_subordinate;
|
||||
hwloc_debug("New PCI hostbridge %04x:[%02x-%02x]\n",
|
||||
hwloc_debug(" new PCI hostbridge covers %04x:[%02x-%02x]\n",
|
||||
current_domain, current_bus, current_subordinate);
|
||||
|
||||
*next_hb_p = hostbridge;
|
||||
next_hb_p = &hostbridge->next_sibling;
|
||||
topology->modified = 1; /* needed in case somebody reconnects levels before the core calls hwloc_pci_belowroot_apply_locality()
|
||||
* or if hwloc_pci_belowroot_apply_locality() keeps hostbridges below root.
|
||||
*/
|
||||
*newp = hostbridge;
|
||||
newp = &hostbridge->next_sibling;
|
||||
}
|
||||
|
||||
done:
|
||||
topology->need_pci_belowroot_apply_locality = 1;
|
||||
return 0;
|
||||
return new;
|
||||
}
|
||||
|
||||
static struct hwloc_obj *
|
||||
@@ -458,6 +471,9 @@ hwloc__pci_find_busid_parent(struct hwloc_topology *topology, struct hwloc_pcide
|
||||
unsigned i;
|
||||
int err;
|
||||
|
||||
hwloc_debug("Looking for parent of PCI busid %04x:%02x:%02x.%01x\n",
|
||||
busid->domain, busid->bus, busid->dev, busid->func);
|
||||
|
||||
/* try to match a forced locality */
|
||||
if (topology->pci_has_forced_locality) {
|
||||
for(i=0; i<topology->pci_forced_locality_nr; i++) {
|
||||
@@ -489,7 +505,7 @@ hwloc__pci_find_busid_parent(struct hwloc_topology *topology, struct hwloc_pcide
|
||||
}
|
||||
if (*env) {
|
||||
/* force the cpuset */
|
||||
hwloc_debug("Overriding localcpus using %s in the environment\n", envname);
|
||||
hwloc_debug("Overriding PCI locality using %s in the environment\n", envname);
|
||||
hwloc_bitmap_sscanf(cpuset, env);
|
||||
forced = 1;
|
||||
}
|
||||
@@ -499,7 +515,7 @@ hwloc__pci_find_busid_parent(struct hwloc_topology *topology, struct hwloc_pcide
|
||||
}
|
||||
|
||||
if (!forced) {
|
||||
/* get the cpuset by asking the OS backend. */
|
||||
/* get the cpuset by asking the backend that provides the relevant hook, if any. */
|
||||
struct hwloc_backend *backend = topology->get_pci_busid_cpuset_backend;
|
||||
if (backend)
|
||||
err = backend->get_pci_busid_cpuset(backend, busid, cpuset);
|
||||
@@ -510,7 +526,7 @@ hwloc__pci_find_busid_parent(struct hwloc_topology *topology, struct hwloc_pcide
|
||||
hwloc_bitmap_copy(cpuset, hwloc_topology_get_topology_cpuset(topology));
|
||||
}
|
||||
|
||||
hwloc_debug_bitmap("Attaching PCI tree to cpuset %s\n", cpuset);
|
||||
hwloc_debug_bitmap(" will attach PCI bus to cpuset %s\n", cpuset);
|
||||
|
||||
parent = hwloc_find_insert_io_parent_by_complete_cpuset(topology, cpuset);
|
||||
if (parent) {
|
||||
@@ -526,11 +542,129 @@ hwloc__pci_find_busid_parent(struct hwloc_topology *topology, struct hwloc_pcide
|
||||
return parent;
|
||||
}
|
||||
|
||||
int
|
||||
hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, struct hwloc_obj *tree)
|
||||
{
|
||||
enum hwloc_type_filter_e bfilter;
|
||||
|
||||
if (!tree)
|
||||
/* found nothing, exit */
|
||||
return 0;
|
||||
|
||||
#ifdef HWLOC_DEBUG
|
||||
hwloc_debug("%s", "\nPCI hierarchy:\n");
|
||||
hwloc_pci_traverse(NULL, tree, hwloc_pci_traverse_print_cb);
|
||||
hwloc_debug("%s", "\n");
|
||||
#endif
|
||||
|
||||
bfilter = topology->type_filter[HWLOC_OBJ_BRIDGE];
|
||||
if (bfilter != HWLOC_TYPE_FILTER_KEEP_NONE) {
|
||||
tree = hwloc_pcidisc_add_hostbridges(topology, tree);
|
||||
}
|
||||
|
||||
while (tree) {
|
||||
struct hwloc_obj *obj, *pciobj;
|
||||
struct hwloc_obj *parent;
|
||||
struct hwloc_pci_locality_s *loc;
|
||||
unsigned domain, bus_min, bus_max;
|
||||
|
||||
obj = tree;
|
||||
|
||||
/* hostbridges don't have a PCI busid for looking up locality, use their first child */
|
||||
if (obj->type == HWLOC_OBJ_BRIDGE && obj->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_HOST)
|
||||
pciobj = obj->io_first_child;
|
||||
else
|
||||
pciobj = obj;
|
||||
/* now we have a pci device or a pci bridge */
|
||||
assert(pciobj->type == HWLOC_OBJ_PCI_DEVICE
|
||||
|| (pciobj->type == HWLOC_OBJ_BRIDGE && pciobj->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_PCI));
|
||||
|
||||
if (obj->type == HWLOC_OBJ_BRIDGE) {
|
||||
domain = obj->attr->bridge.downstream.pci.domain;
|
||||
bus_min = obj->attr->bridge.downstream.pci.secondary_bus;
|
||||
bus_max = obj->attr->bridge.downstream.pci.subordinate_bus;
|
||||
} else {
|
||||
domain = pciobj->attr->pcidev.domain;
|
||||
bus_min = pciobj->attr->pcidev.bus;
|
||||
bus_max = pciobj->attr->pcidev.bus;
|
||||
}
|
||||
|
||||
/* find where to attach that PCI bus */
|
||||
parent = hwloc__pci_find_busid_parent(topology, &pciobj->attr->pcidev);
|
||||
|
||||
/* reuse the previous locality if possible */
|
||||
if (topology->last_pci_locality
|
||||
&& parent == topology->last_pci_locality->parent
|
||||
&& domain == topology->last_pci_locality->domain
|
||||
&& (bus_min == topology->last_pci_locality->bus_max
|
||||
|| bus_min == topology->last_pci_locality->bus_max+1)) {
|
||||
hwloc_debug(" Reusing PCI locality up to bus %04x:%02x\n",
|
||||
domain, bus_max);
|
||||
topology->last_pci_locality->bus_max = bus_max;
|
||||
goto done;
|
||||
}
|
||||
|
||||
loc = malloc(sizeof(*loc));
|
||||
if (!loc) {
|
||||
/* fallback to attaching to root */
|
||||
parent = hwloc_get_root_obj(topology);
|
||||
goto done;
|
||||
}
|
||||
|
||||
loc->domain = domain;
|
||||
loc->bus_min = bus_min;
|
||||
loc->bus_max = bus_max;
|
||||
loc->parent = parent;
|
||||
loc->cpuset = hwloc_bitmap_dup(parent->cpuset);
|
||||
if (!loc->cpuset) {
|
||||
/* fallback to attaching to root */
|
||||
free(loc);
|
||||
parent = hwloc_get_root_obj(topology);
|
||||
goto done;
|
||||
}
|
||||
|
||||
hwloc_debug("Adding PCI locality %s P#%u for bus %04x:[%02x:%02x]\n",
|
||||
hwloc_obj_type_string(parent->type), parent->os_index, loc->domain, loc->bus_min, loc->bus_max);
|
||||
if (topology->last_pci_locality) {
|
||||
loc->prev = topology->last_pci_locality;
|
||||
loc->next = NULL;
|
||||
topology->last_pci_locality->next = loc;
|
||||
topology->last_pci_locality = loc;
|
||||
} else {
|
||||
loc->prev = NULL;
|
||||
loc->next = NULL;
|
||||
topology->first_pci_locality = loc;
|
||||
topology->last_pci_locality = loc;
|
||||
}
|
||||
|
||||
done:
|
||||
/* dequeue this object */
|
||||
tree = obj->next_sibling;
|
||||
obj->next_sibling = NULL;
|
||||
hwloc_insert_object_by_parent(topology, parent, obj);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*********************************
|
||||
* Finding PCI objects or parents
|
||||
*/
|
||||
|
||||
struct hwloc_obj *
|
||||
hwloc_pcidisc_find_busid_parent(struct hwloc_topology *topology,
|
||||
unsigned domain, unsigned bus, unsigned dev, unsigned func)
|
||||
hwloc_pci_find_parent_by_busid(struct hwloc_topology *topology,
|
||||
unsigned domain, unsigned bus, unsigned dev, unsigned func)
|
||||
{
|
||||
struct hwloc_pcidev_attr_s busid;
|
||||
hwloc_obj_t parent;
|
||||
|
||||
/* try to find that exact busid */
|
||||
parent = hwloc_pci_find_by_busid(topology, domain, bus, dev, func);
|
||||
if (parent)
|
||||
return parent;
|
||||
|
||||
/* try to find the locality of that bus instead */
|
||||
busid.domain = domain;
|
||||
busid.bus = bus;
|
||||
busid.dev = dev;
|
||||
@@ -538,66 +672,10 @@ hwloc_pcidisc_find_busid_parent(struct hwloc_topology *topology,
|
||||
return hwloc__pci_find_busid_parent(topology, &busid);
|
||||
}
|
||||
|
||||
int
|
||||
hwloc_pci_belowroot_apply_locality(struct hwloc_topology *topology)
|
||||
{
|
||||
struct hwloc_obj *root = hwloc_get_root_obj(topology);
|
||||
struct hwloc_obj **listp, *obj;
|
||||
|
||||
if (!topology->need_pci_belowroot_apply_locality)
|
||||
return 0;
|
||||
topology->need_pci_belowroot_apply_locality = 0;
|
||||
|
||||
/* root->io_first_child contains some PCI hierarchies, any maybe some non-PCI things.
|
||||
* insert the PCI trees according to their PCI-locality.
|
||||
*/
|
||||
listp = &root->io_first_child;
|
||||
while ((obj = *listp) != NULL) {
|
||||
struct hwloc_pcidev_attr_s *busid;
|
||||
struct hwloc_obj *parent;
|
||||
|
||||
/* skip non-PCI objects */
|
||||
if (obj->type != HWLOC_OBJ_PCI_DEVICE
|
||||
&& !(obj->type == HWLOC_OBJ_BRIDGE && obj->attr->bridge.downstream_type == HWLOC_OBJ_BRIDGE_PCI)
|
||||
&& !(obj->type == HWLOC_OBJ_BRIDGE && obj->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_PCI)) {
|
||||
listp = &obj->next_sibling;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (obj->type == HWLOC_OBJ_PCI_DEVICE
|
||||
|| (obj->type == HWLOC_OBJ_BRIDGE
|
||||
&& obj->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_PCI))
|
||||
busid = &obj->attr->pcidev;
|
||||
else {
|
||||
/* hostbridges don't have a PCI busid for looking up locality, use their first child if PCI */
|
||||
hwloc_obj_t child = obj->io_first_child;
|
||||
if (child && (child->type == HWLOC_OBJ_PCI_DEVICE
|
||||
|| (child->type == HWLOC_OBJ_BRIDGE
|
||||
&& child->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_PCI)))
|
||||
busid = &obj->io_first_child->attr->pcidev;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
/* attach the object (and children) where it belongs */
|
||||
parent = hwloc__pci_find_busid_parent(topology, busid);
|
||||
if (parent == root) {
|
||||
/* keep this object here */
|
||||
listp = &obj->next_sibling;
|
||||
} else {
|
||||
/* dequeue this object */
|
||||
*listp = obj->next_sibling;
|
||||
obj->next_sibling = NULL;
|
||||
hwloc_insert_object_by_parent(topology, parent, obj);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* return the smallest object that contains the desired busid */
|
||||
static struct hwloc_obj *
|
||||
hwloc__pci_belowroot_find_by_busid(hwloc_obj_t parent,
|
||||
unsigned domain, unsigned bus, unsigned dev, unsigned func)
|
||||
hwloc__pci_find_by_busid(hwloc_obj_t parent,
|
||||
unsigned domain, unsigned bus, unsigned dev, unsigned func)
|
||||
{
|
||||
hwloc_obj_t child;
|
||||
|
||||
@@ -622,7 +700,7 @@ hwloc__pci_belowroot_find_by_busid(hwloc_obj_t parent,
|
||||
&& child->attr->bridge.downstream.pci.secondary_bus <= bus
|
||||
&& child->attr->bridge.downstream.pci.subordinate_bus >= bus)
|
||||
/* not the right bus id, but it's included in the bus below that bridge */
|
||||
return hwloc__pci_belowroot_find_by_busid(child, domain, bus, dev, func);
|
||||
return hwloc__pci_find_by_busid(child, domain, bus, dev, func);
|
||||
|
||||
} else if (child->type == HWLOC_OBJ_BRIDGE
|
||||
&& child->attr->bridge.upstream_type != HWLOC_OBJ_BRIDGE_PCI
|
||||
@@ -632,7 +710,7 @@ hwloc__pci_belowroot_find_by_busid(hwloc_obj_t parent,
|
||||
&& child->attr->bridge.downstream.pci.secondary_bus <= bus
|
||||
&& child->attr->bridge.downstream.pci.subordinate_bus >= bus) {
|
||||
/* contains our bus, recurse */
|
||||
return hwloc__pci_belowroot_find_by_busid(child, domain, bus, dev, func);
|
||||
return hwloc__pci_find_by_busid(child, domain, bus, dev, func);
|
||||
}
|
||||
}
|
||||
/* didn't find anything, return parent */
|
||||
@@ -640,17 +718,54 @@ hwloc__pci_belowroot_find_by_busid(hwloc_obj_t parent,
|
||||
}
|
||||
|
||||
struct hwloc_obj *
|
||||
hwloc_pcidisc_find_by_busid(struct hwloc_topology *topology,
|
||||
unsigned domain, unsigned bus, unsigned dev, unsigned func)
|
||||
hwloc_pci_find_by_busid(struct hwloc_topology *topology,
|
||||
unsigned domain, unsigned bus, unsigned dev, unsigned func)
|
||||
{
|
||||
struct hwloc_pci_locality_s *loc;
|
||||
hwloc_obj_t root = hwloc_get_root_obj(topology);
|
||||
hwloc_obj_t parent = hwloc__pci_belowroot_find_by_busid(root, domain, bus, dev, func);
|
||||
if (parent == root)
|
||||
hwloc_obj_t parent = NULL;
|
||||
|
||||
hwloc_debug("pcidisc looking for bus id %04x:%02x:%02x.%01x\n", domain, bus, dev, func);
|
||||
loc = topology->first_pci_locality;
|
||||
while (loc) {
|
||||
if (loc->domain == domain && loc->bus_min <= bus && loc->bus_max >= bus) {
|
||||
parent = loc->parent;
|
||||
assert(parent);
|
||||
hwloc_debug(" found pci locality for %04x:[%02x:%02x]\n",
|
||||
loc->domain, loc->bus_min, loc->bus_max);
|
||||
break;
|
||||
}
|
||||
loc = loc->next;
|
||||
}
|
||||
/* if we failed to insert localities, look at root too */
|
||||
if (!parent)
|
||||
parent = root;
|
||||
|
||||
hwloc_debug(" looking for bus %04x:%02x:%02x.%01x below %s P#%u\n",
|
||||
domain, bus, dev, func,
|
||||
hwloc_obj_type_string(parent->type), parent->os_index);
|
||||
parent = hwloc__pci_find_by_busid(parent, domain, bus, dev, func);
|
||||
if (parent == root) {
|
||||
hwloc_debug(" found nothing better than root object, ignoring\n");
|
||||
return NULL;
|
||||
else
|
||||
} else {
|
||||
if (parent->type == HWLOC_OBJ_PCI_DEVICE
|
||||
|| (parent->type == HWLOC_OBJ_BRIDGE && parent->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_PCI))
|
||||
hwloc_debug(" found busid %04x:%02x:%02x.%01x\n",
|
||||
parent->attr->pcidev.domain, parent->attr->pcidev.bus,
|
||||
parent->attr->pcidev.dev, parent->attr->pcidev.func);
|
||||
else
|
||||
hwloc_debug(" found parent %s P#%u\n",
|
||||
hwloc_obj_type_string(parent->type), parent->os_index);
|
||||
return parent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
* Parsing the PCI Config Space
|
||||
*/
|
||||
|
||||
#define HWLOC_PCI_STATUS 0x06
|
||||
#define HWLOC_PCI_STATUS_CAP_LIST 0x10
|
||||
#define HWLOC_PCI_CAPABILITY_LIST 0x34
|
||||
@@ -703,13 +818,14 @@ hwloc_pcidisc_find_linkspeed(const unsigned char *config,
|
||||
* PCIe Gen2 = 5 GT/s signal-rate per lane with 8/10 encoding = 0.5 GB/s data-rate per lane
|
||||
* PCIe Gen3 = 8 GT/s signal-rate per lane with 128/130 encoding = 1 GB/s data-rate per lane
|
||||
* PCIe Gen4 = 16 GT/s signal-rate per lane with 128/130 encoding = 2 GB/s data-rate per lane
|
||||
* PCIe Gen5 = 32 GT/s signal-rate per lane with 128/130 encoding = 4 GB/s data-rate per lane
|
||||
*/
|
||||
|
||||
/* lanespeed in Gbit/s */
|
||||
if (speed <= 2)
|
||||
lanespeed = 2.5f * speed * 0.8f;
|
||||
else
|
||||
lanespeed = 8.0f * (1<<(speed-3)) * 128/130; /* assume Gen5 will be 32 GT/s and so on */
|
||||
lanespeed = 8.0f * (1<<(speed-3)) * 128/130; /* assume Gen6 will be 64 GT/s and so on */
|
||||
|
||||
/* linkspeed in GB/s */
|
||||
*linkspeed = lanespeed * width / 8;
|
||||
@@ -738,30 +854,27 @@ hwloc_pcidisc_check_bridge_type(unsigned device_class, const unsigned char *conf
|
||||
#define HWLOC_PCI_SUBORDINATE_BUS 0x1a
|
||||
|
||||
int
|
||||
hwloc_pcidisc_setup_bridge_attr(hwloc_obj_t obj,
|
||||
hwloc_pcidisc_find_bridge_buses(unsigned domain, unsigned bus, unsigned dev, unsigned func,
|
||||
unsigned *secondary_busp, unsigned *subordinate_busp,
|
||||
const unsigned char *config)
|
||||
{
|
||||
struct hwloc_bridge_attr_s *battr = &obj->attr->bridge;
|
||||
struct hwloc_pcidev_attr_s *pattr = &battr->upstream.pci;
|
||||
unsigned secondary_bus, subordinate_bus;
|
||||
|
||||
if (config[HWLOC_PCI_PRIMARY_BUS] != pattr->bus) {
|
||||
if (config[HWLOC_PCI_PRIMARY_BUS] != bus) {
|
||||
/* Sometimes the config space contains 00 instead of the actual primary bus number.
|
||||
* Always trust the bus ID because it was built by the system which has more information
|
||||
* to workaround such problems (e.g. ACPI information about PCI parent/children).
|
||||
*/
|
||||
hwloc_debug(" %04x:%02x:%02x.%01x bridge with (ignored) invalid PCI_PRIMARY_BUS %02x\n",
|
||||
pattr->domain, pattr->bus, pattr->dev, pattr->func, config[HWLOC_PCI_PRIMARY_BUS]);
|
||||
domain, bus, dev, func, config[HWLOC_PCI_PRIMARY_BUS]);
|
||||
}
|
||||
|
||||
battr->upstream_type = HWLOC_OBJ_BRIDGE_PCI;
|
||||
battr->downstream_type = HWLOC_OBJ_BRIDGE_PCI;
|
||||
battr->downstream.pci.domain = pattr->domain;
|
||||
battr->downstream.pci.secondary_bus = config[HWLOC_PCI_SECONDARY_BUS];
|
||||
battr->downstream.pci.subordinate_bus = config[HWLOC_PCI_SUBORDINATE_BUS];
|
||||
secondary_bus = config[HWLOC_PCI_SECONDARY_BUS];
|
||||
subordinate_bus = config[HWLOC_PCI_SUBORDINATE_BUS];
|
||||
|
||||
if (battr->downstream.pci.secondary_bus <= pattr->bus
|
||||
|| battr->downstream.pci.subordinate_bus <= pattr->bus
|
||||
|| battr->downstream.pci.secondary_bus > battr->downstream.pci.subordinate_bus) {
|
||||
if (secondary_bus <= bus
|
||||
|| subordinate_bus <= bus
|
||||
|| secondary_bus > subordinate_bus) {
|
||||
/* This should catch most cases of invalid bridge information
|
||||
* (e.g. 00 for secondary and subordinate).
|
||||
* Ideally we would also check that [secondary-subordinate] is included
|
||||
@@ -769,15 +882,21 @@ hwloc_pcidisc_setup_bridge_attr(hwloc_obj_t obj,
|
||||
* because objects may be discovered out of order (especially in the fsroot case).
|
||||
*/
|
||||
hwloc_debug(" %04x:%02x:%02x.%01x bridge has invalid secondary-subordinate buses [%02x-%02x]\n",
|
||||
pattr->domain, pattr->bus, pattr->dev, pattr->func,
|
||||
battr->downstream.pci.secondary_bus, battr->downstream.pci.subordinate_bus);
|
||||
hwloc_free_unlinked_object(obj);
|
||||
domain, bus, dev, func,
|
||||
secondary_bus, subordinate_bus);
|
||||
return -1;
|
||||
}
|
||||
|
||||
*secondary_busp = secondary_bus;
|
||||
*subordinate_busp = subordinate_bus;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/****************
|
||||
* Class Strings
|
||||
*/
|
||||
|
||||
const char *
|
||||
hwloc_pci_class_string(unsigned short class_id)
|
||||
{
|
||||
|
||||
17
src/3rdparty/hwloc/src/shmem.c
vendored
17
src/3rdparty/hwloc/src/shmem.c
vendored
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright © 2017-2018 Inria. All rights reserved.
|
||||
* Copyright © 2017-2019 Inria. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <hwloc/shmem.h>
|
||||
#include <private/private.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "hwloc/shmem.h"
|
||||
#include "private/private.h"
|
||||
|
||||
#ifndef HWLOC_WIN_SYS
|
||||
|
||||
@@ -214,6 +214,8 @@ hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp,
|
||||
new->support.discovery = malloc(sizeof(*new->support.discovery));
|
||||
new->support.cpubind = malloc(sizeof(*new->support.cpubind));
|
||||
new->support.membind = malloc(sizeof(*new->support.membind));
|
||||
if (!new->support.discovery || !new->support.cpubind || !new->support.membind)
|
||||
goto out_with_support;
|
||||
memcpy(new->support.discovery, old->support.discovery, sizeof(*new->support.discovery));
|
||||
memcpy(new->support.cpubind, old->support.cpubind, sizeof(*new->support.cpubind));
|
||||
memcpy(new->support.membind, old->support.membind, sizeof(*new->support.membind));
|
||||
@@ -230,6 +232,11 @@ hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp,
|
||||
*topologyp = new;
|
||||
return 0;
|
||||
|
||||
out_with_support:
|
||||
free(new->support.discovery);
|
||||
free(new->support.cpubind);
|
||||
free(new->support.membind);
|
||||
free(new);
|
||||
out_with_components:
|
||||
hwloc_components_fini();
|
||||
out_with_mmap:
|
||||
|
||||
30
src/3rdparty/hwloc/src/topology-noos.c
vendored
30
src/3rdparty/hwloc/src/topology-noos.c
vendored
@@ -1,26 +1,34 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2017 Inria. All rights reserved.
|
||||
* Copyright © 2009-2019 Inria. All rights reserved.
|
||||
* Copyright © 2009-2012 Université Bordeaux
|
||||
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <private/private.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "private/private.h"
|
||||
|
||||
static int
|
||||
hwloc_look_noos(struct hwloc_backend *backend)
|
||||
hwloc_look_noos(struct hwloc_backend *backend, struct hwloc_disc_status *dstatus)
|
||||
{
|
||||
/*
|
||||
* This backend uses the underlying OS.
|
||||
* However we don't enforce topology->is_thissystem so that
|
||||
* we may still force use this backend when debugging with !thissystem.
|
||||
*/
|
||||
|
||||
struct hwloc_topology *topology = backend->topology;
|
||||
int nbprocs;
|
||||
|
||||
assert(dstatus->phase == HWLOC_DISC_PHASE_CPU);
|
||||
|
||||
if (topology->levels[0][0]->cpuset)
|
||||
/* somebody discovered things */
|
||||
return -1;
|
||||
|
||||
nbprocs = hwloc_fallback_nbprocessors(topology);
|
||||
nbprocs = hwloc_fallback_nbprocessors(0);
|
||||
if (nbprocs >= 1)
|
||||
topology->support.discovery->pu = 1;
|
||||
else
|
||||
@@ -33,13 +41,15 @@ hwloc_look_noos(struct hwloc_backend *backend)
|
||||
}
|
||||
|
||||
static struct hwloc_backend *
|
||||
hwloc_noos_component_instantiate(struct hwloc_disc_component *component,
|
||||
hwloc_noos_component_instantiate(struct hwloc_topology *topology,
|
||||
struct hwloc_disc_component *component,
|
||||
unsigned excluded_phases __hwloc_attribute_unused,
|
||||
const void *_data1 __hwloc_attribute_unused,
|
||||
const void *_data2 __hwloc_attribute_unused,
|
||||
const void *_data3 __hwloc_attribute_unused)
|
||||
{
|
||||
struct hwloc_backend *backend;
|
||||
backend = hwloc_backend_alloc(component);
|
||||
backend = hwloc_backend_alloc(topology, component);
|
||||
if (!backend)
|
||||
return NULL;
|
||||
backend->discover = hwloc_look_noos;
|
||||
@@ -47,9 +57,9 @@ hwloc_noos_component_instantiate(struct hwloc_disc_component *component,
|
||||
}
|
||||
|
||||
static struct hwloc_disc_component hwloc_noos_disc_component = {
|
||||
HWLOC_DISC_COMPONENT_TYPE_CPU,
|
||||
"no_os",
|
||||
HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
|
||||
HWLOC_DISC_PHASE_CPU,
|
||||
HWLOC_DISC_PHASE_GLOBAL,
|
||||
hwloc_noos_component_instantiate,
|
||||
40, /* lower than native OS component, higher than globals */
|
||||
1,
|
||||
|
||||
84
src/3rdparty/hwloc/src/topology-synthetic.c
vendored
84
src/3rdparty/hwloc/src/topology-synthetic.c
vendored
@@ -6,11 +6,11 @@
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <private/private.h>
|
||||
#include <private/misc.h>
|
||||
#include <private/debug.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "private/private.h"
|
||||
#include "private/misc.h"
|
||||
#include "private/debug.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <assert.h>
|
||||
@@ -122,6 +122,7 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
unsigned long nbs = 1;
|
||||
unsigned j, mul;
|
||||
const char *tmp;
|
||||
struct hwloc_synthetic_intlv_loop_s *loops;
|
||||
|
||||
tmp = attr;
|
||||
while (tmp) {
|
||||
@@ -132,9 +133,10 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
tmp++;
|
||||
}
|
||||
|
||||
{
|
||||
/* nr_loops colon-separated fields, but we may need one more at the end */
|
||||
HWLOC_VLA(struct hwloc_synthetic_intlv_loop_s, loops, nr_loops+1);
|
||||
loops = malloc((nr_loops+1) * sizeof(*loops));
|
||||
if (!loops)
|
||||
goto out_with_array;
|
||||
|
||||
if (*attr >= '0' && *attr <= '9') {
|
||||
/* interleaving as x*y:z*t:... */
|
||||
@@ -148,11 +150,13 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
if (tmp2 == tmp || *tmp2 != '*') {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Failed to read synthetic index interleaving loop '%s' without number before '*'\n", tmp);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
if (!step) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Invalid interleaving loop with step 0 at '%s'\n", tmp);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
tmp2++;
|
||||
@@ -160,11 +164,13 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
if (tmp3 == tmp2 || (*tmp3 && *tmp3 != ':' && *tmp3 != ')' && *tmp3 != ' ')) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Failed to read synthetic index interleaving loop '%s' without number between '*' and ':'\n", tmp);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
if (!nb) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Invalid interleaving loop with number 0 at '%s'\n", tmp2);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
loops[cur_loop].step = step;
|
||||
@@ -192,11 +198,13 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
if (err < 0) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Failed to read synthetic index interleaving loop type '%s'\n", tmp);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
if (type == HWLOC_OBJ_MISC || type == HWLOC_OBJ_BRIDGE || type == HWLOC_OBJ_PCI_DEVICE || type == HWLOC_OBJ_OS_DEVICE) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Misc object type disallowed in synthetic index interleaving loop type '%s'\n", tmp);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
for(i=0; ; i++) {
|
||||
@@ -217,6 +225,7 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
if (verbose)
|
||||
fprintf(stderr, "Failed to find level for synthetic index interleaving loop type '%s'\n",
|
||||
tmp);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
tmp = strchr(tmp, ':');
|
||||
@@ -235,6 +244,7 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
if (loops[i].level_depth == mydepth && i != cur_loop) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Invalid duplicate interleaving loop type in synthetic index '%s'\n", attr);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
if (loops[i].level_depth < mydepth
|
||||
@@ -264,6 +274,7 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
} else {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Invalid index interleaving total width %lu instead of %lu\n", nbs, total);
|
||||
free(loops);
|
||||
goto out_with_array;
|
||||
}
|
||||
}
|
||||
@@ -278,6 +289,8 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
mul *= nb;
|
||||
}
|
||||
|
||||
free(loops);
|
||||
|
||||
/* check that we have the right values (cannot pass total, cannot give duplicate 0) */
|
||||
for(j=0; j<total; j++) {
|
||||
if (array[j] >= total) {
|
||||
@@ -293,7 +306,6 @@ hwloc_synthetic_process_indexes(struct hwloc_synthetic_backend_data_s *data,
|
||||
}
|
||||
|
||||
indexes->array = array;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -527,7 +539,8 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
|
||||
|
||||
if (*pos < '0' || *pos > '9') {
|
||||
if (hwloc_type_sscanf(pos, &type, &attrs, sizeof(attrs)) < 0) {
|
||||
if (!strncmp(pos, "Die", 3) || !strncmp(pos, "Tile", 4) || !strncmp(pos, "Module", 6)) {
|
||||
if (!strncmp(pos, "Tile", 4) || !strncmp(pos, "Module", 6)) {
|
||||
/* possible future types */
|
||||
type = HWLOC_OBJ_GROUP;
|
||||
} else {
|
||||
/* FIXME: allow generic "Cache" string? would require to deal with possibly duplicate cache levels */
|
||||
@@ -645,6 +658,12 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (type_count[HWLOC_OBJ_DIE] > 1) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Synthetic string cannot have several die levels\n");
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (type_count[HWLOC_OBJ_NUMANODE] > 1) {
|
||||
if (verbose)
|
||||
fprintf(stderr, "Synthetic string cannot have several NUMA node levels\n");
|
||||
@@ -829,6 +848,7 @@ hwloc_synthetic_set_attr(struct hwloc_synthetic_attr_s *sattr,
|
||||
obj->attr->numanode.page_types[0].count = sattr->memorysize / 4096;
|
||||
break;
|
||||
case HWLOC_OBJ_PACKAGE:
|
||||
case HWLOC_OBJ_DIE:
|
||||
break;
|
||||
case HWLOC_OBJ_L1CACHE:
|
||||
case HWLOC_OBJ_L2CACHE:
|
||||
@@ -953,13 +973,19 @@ hwloc__look_synthetic(struct hwloc_topology *topology,
|
||||
}
|
||||
|
||||
static int
|
||||
hwloc_look_synthetic(struct hwloc_backend *backend)
|
||||
hwloc_look_synthetic(struct hwloc_backend *backend, struct hwloc_disc_status *dstatus)
|
||||
{
|
||||
/*
|
||||
* This backend enforces !topology->is_thissystem by default.
|
||||
*/
|
||||
|
||||
struct hwloc_topology *topology = backend->topology;
|
||||
struct hwloc_synthetic_backend_data_s *data = backend->private_data;
|
||||
hwloc_bitmap_t cpuset = hwloc_bitmap_alloc();
|
||||
unsigned i;
|
||||
|
||||
assert(dstatus->phase == HWLOC_DISC_PHASE_GLOBAL);
|
||||
|
||||
assert(!topology->levels[0][0]->cpuset);
|
||||
|
||||
hwloc_alloc_root_sets(topology->levels[0][0]);
|
||||
@@ -1001,7 +1027,9 @@ hwloc_synthetic_backend_disable(struct hwloc_backend *backend)
|
||||
}
|
||||
|
||||
static struct hwloc_backend *
|
||||
hwloc_synthetic_component_instantiate(struct hwloc_disc_component *component,
|
||||
hwloc_synthetic_component_instantiate(struct hwloc_topology *topology,
|
||||
struct hwloc_disc_component *component,
|
||||
unsigned excluded_phases __hwloc_attribute_unused,
|
||||
const void *_data1,
|
||||
const void *_data2 __hwloc_attribute_unused,
|
||||
const void *_data3 __hwloc_attribute_unused)
|
||||
@@ -1021,7 +1049,7 @@ hwloc_synthetic_component_instantiate(struct hwloc_disc_component *component,
|
||||
}
|
||||
}
|
||||
|
||||
backend = hwloc_backend_alloc(component);
|
||||
backend = hwloc_backend_alloc(topology, component);
|
||||
if (!backend)
|
||||
goto out;
|
||||
|
||||
@@ -1051,8 +1079,8 @@ hwloc_synthetic_component_instantiate(struct hwloc_disc_component *component,
|
||||
}
|
||||
|
||||
static struct hwloc_disc_component hwloc_synthetic_disc_component = {
|
||||
HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
|
||||
"synthetic",
|
||||
HWLOC_DISC_PHASE_GLOBAL,
|
||||
~0,
|
||||
hwloc_synthetic_component_instantiate,
|
||||
30,
|
||||
@@ -1267,6 +1295,12 @@ hwloc__export_synthetic_obj(struct hwloc_topology * topology, unsigned long flag
|
||||
/* if exporting to v1 or without extended-types, use all-v1-compatible Socket name */
|
||||
res = hwloc_snprintf(tmp, tmplen, "Socket%s", aritys);
|
||||
|
||||
} else if (obj->type == HWLOC_OBJ_DIE
|
||||
&& (flags & (HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_EXTENDED_TYPES
|
||||
|HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_V1))) {
|
||||
/* if exporting to v1 or without extended-types, use all-v1-compatible Group name */
|
||||
res = hwloc_snprintf(tmp, tmplen, "Group%s", aritys);
|
||||
|
||||
} else if (obj->type == HWLOC_OBJ_GROUP /* don't export group depth */
|
||||
|| flags & HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_EXTENDED_TYPES) {
|
||||
res = hwloc_snprintf(tmp, tmplen, "%s%s", hwloc_obj_type_string(obj->type), aritys);
|
||||
@@ -1323,16 +1357,26 @@ hwloc__export_synthetic_memory_children(struct hwloc_topology * topology, unsign
|
||||
}
|
||||
|
||||
while (mchild) {
|
||||
/* v2: export all NUMA children */
|
||||
|
||||
assert(mchild->type == HWLOC_OBJ_NUMANODE); /* only NUMA node memory children for now */
|
||||
/* FIXME: really recurse to export memcaches and numanode,
|
||||
* but it requires clever parsing of [ memcache [numa] [numa] ] during import,
|
||||
* better attaching of things to describe the hierarchy.
|
||||
*/
|
||||
hwloc_obj_t numanode = mchild;
|
||||
/* only export the first NUMA node leaf of each memory child
|
||||
* FIXME: This assumes mscache aren't shared between nodes, that's true in current platforms
|
||||
*/
|
||||
while (numanode && numanode->type != HWLOC_OBJ_NUMANODE) {
|
||||
assert(numanode->arity == 1);
|
||||
numanode = numanode->memory_first_child;
|
||||
}
|
||||
assert(numanode); /* there's always a numanode at the bottom of the memory tree */
|
||||
|
||||
if (needprefix)
|
||||
hwloc__export_synthetic_add_char(&ret, &tmp, &tmplen, ' ');
|
||||
|
||||
hwloc__export_synthetic_add_char(&ret, &tmp, &tmplen, '[');
|
||||
|
||||
res = hwloc__export_synthetic_obj(topology, flags, mchild, (unsigned)-1, tmp, tmplen);
|
||||
res = hwloc__export_synthetic_obj(topology, flags, numanode, (unsigned)-1, tmp, tmplen);
|
||||
if (hwloc__export_synthetic_update_status(&ret, &tmp, &tmplen, res) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -1366,9 +1410,8 @@ hwloc_check_memory_symmetric(struct hwloc_topology * topology)
|
||||
assert(node);
|
||||
|
||||
first_parent = node->parent;
|
||||
assert(hwloc__obj_type_is_normal(first_parent->type)); /* only depth-1 memory children for now */
|
||||
|
||||
/* check whether all object on parent's level have same number of NUMA children */
|
||||
/* check whether all object on parent's level have same number of NUMA bits */
|
||||
for(i=0; i<hwloc_get_nbobjs_by_depth(topology, first_parent->depth); i++) {
|
||||
hwloc_obj_t parent, mchild;
|
||||
|
||||
@@ -1379,10 +1422,9 @@ hwloc_check_memory_symmetric(struct hwloc_topology * topology)
|
||||
if (parent->memory_arity != first_parent->memory_arity)
|
||||
goto out_with_bitmap;
|
||||
|
||||
/* clear these NUMA children from remaining_nodes */
|
||||
/* clear children NUMA bits from remaining_nodes */
|
||||
mchild = parent->memory_first_child;
|
||||
while (mchild) {
|
||||
assert(mchild->type == HWLOC_OBJ_NUMANODE); /* only NUMA node memory children for now */
|
||||
hwloc_bitmap_clr(remaining_nodes, mchild->os_index); /* cannot use parent->nodeset, some normal children may have other NUMA nodes */
|
||||
mchild = mchild->next_sibling;
|
||||
}
|
||||
|
||||
34
src/3rdparty/hwloc/src/topology-windows.c
vendored
34
src/3rdparty/hwloc/src/topology-windows.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2018 Inria. All rights reserved.
|
||||
* Copyright © 2009-2019 Inria. All rights reserved.
|
||||
* Copyright © 2009-2012 Université Bordeaux
|
||||
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
@@ -9,10 +9,10 @@
|
||||
/* To try to get all declarations duplicated below. */
|
||||
#define _WIN32_WINNT 0x0601
|
||||
|
||||
#include <private/autogen/config.h>
|
||||
#include <hwloc.h>
|
||||
#include <private/private.h>
|
||||
#include <private/debug.h>
|
||||
#include "private/autogen/config.h"
|
||||
#include "hwloc.h"
|
||||
#include "private/private.h"
|
||||
#include "private/debug.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
@@ -731,8 +731,14 @@ hwloc_win_get_area_memlocation(hwloc_topology_t topology __hwloc_attribute_unuse
|
||||
*/
|
||||
|
||||
static int
|
||||
hwloc_look_windows(struct hwloc_backend *backend)
|
||||
hwloc_look_windows(struct hwloc_backend *backend, struct hwloc_disc_status *dstatus)
|
||||
{
|
||||
/*
|
||||
* This backend uses the underlying OS.
|
||||
* However we don't enforce topology->is_thissystem so that
|
||||
* we may still force use this backend when debugging with !thissystem.
|
||||
*/
|
||||
|
||||
struct hwloc_topology *topology = backend->topology;
|
||||
hwloc_bitmap_t groups_pu_set = NULL;
|
||||
SYSTEM_INFO SystemInfo;
|
||||
@@ -740,6 +746,8 @@ hwloc_look_windows(struct hwloc_backend *backend)
|
||||
int gotnuma = 0;
|
||||
int gotnumamemory = 0;
|
||||
|
||||
assert(dstatus->phase == HWLOC_DISC_PHASE_CPU);
|
||||
|
||||
if (topology->levels[0][0]->cpuset)
|
||||
/* somebody discovered things */
|
||||
return -1;
|
||||
@@ -1136,13 +1144,15 @@ static void hwloc_windows_component_finalize(unsigned long flags __hwloc_attribu
|
||||
}
|
||||
|
||||
static struct hwloc_backend *
|
||||
hwloc_windows_component_instantiate(struct hwloc_disc_component *component,
|
||||
hwloc_windows_component_instantiate(struct hwloc_topology *topology,
|
||||
struct hwloc_disc_component *component,
|
||||
unsigned excluded_phases __hwloc_attribute_unused,
|
||||
const void *_data1 __hwloc_attribute_unused,
|
||||
const void *_data2 __hwloc_attribute_unused,
|
||||
const void *_data3 __hwloc_attribute_unused)
|
||||
{
|
||||
struct hwloc_backend *backend;
|
||||
backend = hwloc_backend_alloc(component);
|
||||
backend = hwloc_backend_alloc(topology, component);
|
||||
if (!backend)
|
||||
return NULL;
|
||||
backend->discover = hwloc_look_windows;
|
||||
@@ -1150,9 +1160,9 @@ hwloc_windows_component_instantiate(struct hwloc_disc_component *component,
|
||||
}
|
||||
|
||||
static struct hwloc_disc_component hwloc_windows_disc_component = {
|
||||
HWLOC_DISC_COMPONENT_TYPE_CPU,
|
||||
"windows",
|
||||
HWLOC_DISC_COMPONENT_TYPE_GLOBAL,
|
||||
HWLOC_DISC_PHASE_CPU,
|
||||
HWLOC_DISC_PHASE_GLOBAL,
|
||||
hwloc_windows_component_instantiate,
|
||||
50,
|
||||
1,
|
||||
@@ -1168,10 +1178,12 @@ const struct hwloc_component hwloc_windows_component = {
|
||||
};
|
||||
|
||||
int
|
||||
hwloc_fallback_nbprocessors(struct hwloc_topology *topology __hwloc_attribute_unused) {
|
||||
hwloc_fallback_nbprocessors(unsigned flags __hwloc_attribute_unused) {
|
||||
int n;
|
||||
SYSTEM_INFO sysinfo;
|
||||
|
||||
/* TODO handle flags & HWLOC_FALLBACK_NBPROCESSORS_INCLUDE_OFFLINE */
|
||||
|
||||
/* by default, ignore groups (return only the number in the current group) */
|
||||
GetSystemInfo(&sysinfo);
|
||||
n = sysinfo.dwNumberOfProcessors; /* FIXME could be non-contigous, rather return a mask from dwActiveProcessorMask? */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user