mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 16:05:05 -05:00
Compare commits
536 Commits
v6.14.0
...
f93cbd5ffa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f93cbd5ffa | ||
|
|
16ecb8f085 | ||
|
|
0229c65232 | ||
|
|
4a13a8a75c | ||
|
|
cd2fd9d7a6 | ||
|
|
064cd3ef20 | ||
|
|
e8bbd134f9 | ||
|
|
cf86a1e05c | ||
|
|
f9e990d0f0 | ||
|
|
200f23bba7 | ||
|
|
4234b20e21 | ||
|
|
c5d8b8265b | ||
|
|
77c14c8362 | ||
|
|
8b03750806 | ||
|
|
40949f2767 | ||
|
|
56c447e02a | ||
|
|
21c206f05d | ||
|
|
ee65b3d159 | ||
|
|
1f75d198d8 | ||
|
|
5cf2422766 | ||
|
|
a32f9b5b04 | ||
|
|
8a4792f638 | ||
|
|
e32731b60b | ||
|
|
e1ae367084 | ||
|
|
bc1c8358c4 | ||
|
|
e0af8f0c6b | ||
|
|
29f9c8cf4c | ||
|
|
26f4936f6f | ||
|
|
a411ee3565 | ||
|
|
01bd0d48a1 | ||
|
|
20d555668b | ||
|
|
56baec762f | ||
|
|
17a52fb418 | ||
|
|
7e4caa8929 | ||
|
|
ef14d55aa5 | ||
|
|
5776fdcc20 | ||
|
|
fe0f69031b | ||
|
|
e682f89298 | ||
|
|
544c393f78 | ||
|
|
9da6ea07bd | ||
|
|
62bcd6e5dc | ||
|
|
c5f98fc5c7 | ||
|
|
ecb3ec0317 | ||
|
|
3dfeed475f | ||
|
|
98c775703e | ||
|
|
8da49f2650 | ||
|
|
4570187459 | ||
|
|
748365d6e3 | ||
|
|
dd7e0e520d | ||
|
|
ef6fb728b5 | ||
|
|
92ffcd34d6 | ||
|
|
b108845627 | ||
|
|
046b2a17d3 | ||
|
|
5342f25fbf | ||
|
|
5f6bcfe949 | ||
|
|
ecef382326 | ||
|
|
86f5db19d2 | ||
|
|
b4a47d6ed0 | ||
|
|
f5095247e8 | ||
|
|
2bb07fe633 | ||
|
|
a7be8cb80c | ||
|
|
2ce16df423 | ||
|
|
5eaa6c152e | ||
|
|
6972f727c1 | ||
|
|
7897f10c48 | ||
|
|
da2fb331b3 | ||
|
|
57f3e9c3da | ||
|
|
1efe7e9562 | ||
|
|
caae7c64f0 | ||
|
|
9fbdcc0ef0 | ||
|
|
c7c26d97fe | ||
|
|
1f7e635b04 | ||
|
|
1c5786e3c5 | ||
|
|
44eb4f0038 | ||
|
|
4ab9329dda | ||
|
|
0c2ee013a7 | ||
|
|
3347537635 | ||
|
|
7a85257ad4 | ||
|
|
850b43c079 | ||
|
|
b8e4eaac87 | ||
|
|
b9dd5e3eae | ||
|
|
032c28d50a | ||
|
|
f6c50b5393 | ||
|
|
e65e283aac | ||
|
|
5552e1f864 | ||
|
|
3beccae136 | ||
|
|
ef9bf2aa8c | ||
|
|
42f645fa3b | ||
|
|
1fb5be6c1d | ||
|
|
08c43b7e58 | ||
|
|
7b016fd9ce | ||
|
|
688d4f5ee1 | ||
|
|
64913e3163 | ||
|
|
48fa095e3e | ||
|
|
c9b9ef51ee | ||
|
|
dd782c7001 | ||
|
|
b49197f808 | ||
|
|
f9c4c57216 | ||
|
|
a5b8b85967 | ||
|
|
a5aa2c9042 | ||
|
|
fa35a32eee | ||
|
|
7b6ce59821 | ||
|
|
33315ba2ef | ||
|
|
2c9c40d623 | ||
|
|
daa6328418 | ||
|
|
8afd4d5f2f | ||
|
|
77e2f3a028 | ||
|
|
206295c6cb | ||
|
|
07e1e77c4f | ||
|
|
50a98a4bb1 | ||
|
|
c50369d65d | ||
|
|
592b0c9c76 | ||
|
|
89eab0eff2 | ||
|
|
8084ff37a5 | ||
|
|
7cf3db7750 | ||
|
|
4bda6e054d | ||
|
|
64a0ed413b | ||
|
|
0b59b7eb43 | ||
|
|
ae6b10b5a4 | ||
|
|
705a7eac0c | ||
|
|
10bfffe033 | ||
|
|
4131aa4754 | ||
|
|
fee51b20fa | ||
|
|
5e66efabcf | ||
|
|
08901a9a4b | ||
|
|
a19f590ee6 | ||
|
|
2fa754825d | ||
|
|
f3446c0a94 | ||
|
|
71209d4cd7 | ||
|
|
0a3313cb76 | ||
|
|
e855723cd9 | ||
|
|
6e294bd046 | ||
|
|
dfe70d9ea7 | ||
|
|
2ecf10cdcb | ||
|
|
b55ca8e547 | ||
|
|
12577df7ba | ||
|
|
64f5bb467a | ||
|
|
5717e72367 | ||
|
|
e7de104d88 | ||
|
|
3b5e04b1b7 | ||
|
|
2e77faa80c | ||
|
|
6e63a246bf | ||
|
|
09abc81255 | ||
|
|
fc698f7bcf | ||
|
|
cb2f8fd453 | ||
|
|
59c6c42ceb | ||
|
|
6c10cc5a4b | ||
|
|
d5a8f8a5ae | ||
|
|
d94d052e6c | ||
|
|
ae2b7e3348 | ||
|
|
7d7f30701f | ||
|
|
e80fc25789 | ||
|
|
ff53be5f3b | ||
|
|
6981e68ae3 | ||
|
|
c7e541d84f | ||
|
|
a2ae17b4c4 | ||
|
|
554b60966b | ||
|
|
0378aa8df4 | ||
|
|
6dbd46a891 | ||
|
|
055db83142 | ||
|
|
cdd5dff337 | ||
|
|
bc5fe8f456 | ||
|
|
0bc87345c4 | ||
|
|
f17d31e61a | ||
|
|
e6bf4c0077 | ||
|
|
ff79b8fce4 | ||
|
|
af87369e4f | ||
|
|
f0f6d1666c | ||
|
|
0399b6b6bb | ||
|
|
65fc16d5ac | ||
|
|
826e23b4c4 | ||
|
|
548fbb9f71 | ||
|
|
02d45834e1 | ||
|
|
1252a4710e | ||
|
|
5891f1f06b | ||
|
|
5dcbab7e3a | ||
|
|
7b51e23aa0 | ||
|
|
7f7fc363e1 | ||
|
|
c4e1363148 | ||
|
|
a2e9b3456d | ||
|
|
4790318685 | ||
|
|
038c4fbe34 | ||
|
|
d65d34ef36 | ||
|
|
af6647f377 | ||
|
|
8f9adc02c0 | ||
|
|
5e0079f012 | ||
|
|
dc5e341778 | ||
|
|
0f81ab4c67 | ||
|
|
62a3a98e7d | ||
|
|
d31b3b7c76 | ||
|
|
e352109431 | ||
|
|
88b0385bfe | ||
|
|
9508332258 | ||
|
|
bc5c1f7e65 | ||
|
|
22118330e3 | ||
|
|
240f2450af | ||
|
|
6e856ca39c | ||
|
|
6047786f43 | ||
|
|
7b8ba9ac09 | ||
|
|
02259fec05 | ||
|
|
51728b2d55 | ||
|
|
ebe818a5fb | ||
|
|
790a71b030 | ||
|
|
c62622b114 | ||
|
|
fc643e2936 | ||
|
|
12b9b62ef7 | ||
|
|
667f636c62 | ||
|
|
81e87a6931 | ||
|
|
540b223eab | ||
|
|
75474be060 | ||
|
|
49f34e59a6 | ||
|
|
223add4e22 | ||
|
|
435fc86120 | ||
|
|
c0143b90ce | ||
|
|
c3cdffe86d | ||
|
|
8a4da33bea | ||
|
|
1c7a339527 | ||
|
|
490acd6e55 | ||
|
|
6ecf57959b | ||
|
|
e2c58126e9 | ||
|
|
0ed4b35cd3 | ||
|
|
afe2aa4402 | ||
|
|
3f7533a645 | ||
|
|
6ef0409086 | ||
|
|
64b0d9562e | ||
|
|
770b71c69a | ||
|
|
44642643f8 | ||
|
|
273bb84df8 | ||
|
|
4d0b8c9daf | ||
|
|
7d4d48e83b | ||
|
|
2ea37cdf37 | ||
|
|
a02afe6d4f | ||
|
|
6e86dddc65 | ||
|
|
0171faffe7 | ||
|
|
25decd1b7f | ||
|
|
354b9ddb34 | ||
|
|
3ad6ab56a5 | ||
|
|
1aa0e37b54 | ||
|
|
807c64ddb1 | ||
|
|
5bf90704a6 | ||
|
|
912d1e362b | ||
|
|
eeb459506c | ||
|
|
f4ec0287c4 | ||
|
|
483d6ada3d | ||
|
|
28e81bd7c0 | ||
|
|
54e75bc7c4 | ||
|
|
c388113a30 | ||
|
|
36afeec225 | ||
|
|
4b5e56416d | ||
|
|
0d314d0469 | ||
|
|
7fc45dfb2d | ||
|
|
2ba40edee0 | ||
|
|
bc4dd11761 | ||
|
|
7b52a41459 | ||
|
|
b5de214ff9 | ||
|
|
8bd3b393ef | ||
|
|
9223c2f027 | ||
|
|
6346d36d1b | ||
|
|
93c07e1d34 | ||
|
|
0ba3000982 | ||
|
|
f0e7de8c71 | ||
|
|
1c4eb6c5fe | ||
|
|
63e21dfe63 | ||
|
|
b2d9dab2e3 | ||
|
|
4c57b60e59 | ||
|
|
e6c81d7166 | ||
|
|
94840c70d8 | ||
|
|
e1478bfa94 | ||
|
|
6df6e15267 | ||
|
|
834ea44507 | ||
|
|
73dc0ffb7e | ||
|
|
e57641d6b1 | ||
|
|
b324e34444 | ||
|
|
7e49fc828d | ||
|
|
fdfbb60840 | ||
|
|
ee51dec499 | ||
|
|
575742078c | ||
|
|
6bab67bced | ||
|
|
db9069897d | ||
|
|
30641b1bdf | ||
|
|
45061f40d8 | ||
|
|
9f70752090 | ||
|
|
22d6a7525e | ||
|
|
c0bce256e1 | ||
|
|
09a7219651 | ||
|
|
97869f3347 | ||
|
|
1bbbff7d17 | ||
|
|
97683e5719 | ||
|
|
059d5d8421 | ||
|
|
285719cde4 | ||
|
|
c877ba8145 | ||
|
|
6793981066 | ||
|
|
1ae9a4e428 | ||
|
|
0e57053c5a | ||
|
|
232d2d6dc5 | ||
|
|
a3cb74f29b | ||
|
|
56753d7c4a | ||
|
|
f7b9e3ca67 | ||
|
|
56c95703a5 | ||
|
|
eadf272425 | ||
|
|
cb227a0a79 | ||
|
|
4c171bea1e | ||
|
|
e55a854314 | ||
|
|
5bdfafd719 | ||
|
|
15a2091837 | ||
|
|
48bd09f730 | ||
|
|
21fb970949 | ||
|
|
23c12fc351 | ||
|
|
71d193676a | ||
|
|
baef34ba8c | ||
|
|
95a739d821 | ||
|
|
7b9135aadc | ||
|
|
e6f694ca9e | ||
|
|
afd79e7537 | ||
|
|
a2728af4f7 | ||
|
|
65dbded9c4 | ||
|
|
f25e65b5ac | ||
|
|
bbb19ea2f9 | ||
|
|
1c5b332add | ||
|
|
87fd0ea94a | ||
|
|
4a42dca2cb | ||
|
|
b674fafa0f | ||
|
|
b5da73389f | ||
|
|
bf5e38545c | ||
|
|
f7543ada60 | ||
|
|
95e1705fc8 | ||
|
|
2d0b07afbc | ||
|
|
b33ccf0e0b | ||
|
|
4f5f9bdffb | ||
|
|
4d3e3daa6a | ||
|
|
802029e5f5 | ||
|
|
14117e9658 | ||
|
|
7ccb1d65f0 | ||
|
|
15de3cc16c | ||
|
|
124daa4afd | ||
|
|
5de1609b7d | ||
|
|
644f4cc017 | ||
|
|
41a3f97060 | ||
|
|
452080cfbd | ||
|
|
4f103b6b45 | ||
|
|
39609c9183 | ||
|
|
2adb7b2b74 | ||
|
|
3673137df6 | ||
|
|
faa7095865 | ||
|
|
e0701f9dad | ||
|
|
14aacf8636 | ||
|
|
c764441337 | ||
|
|
05fae12a63 | ||
|
|
8059ce67f9 | ||
|
|
10111fd7f9 | ||
|
|
2d25bec2df | ||
|
|
cab244d468 | ||
|
|
4001488888 | ||
|
|
9bec1521b8 | ||
|
|
7bde3ed5f7 | ||
|
|
2e738509bb | ||
|
|
f5447088cb | ||
|
|
7f2f50a8d9 | ||
|
|
5747ccfafc | ||
|
|
93081eb1f6 | ||
|
|
4bf65c8669 | ||
|
|
1a6fc3a665 | ||
|
|
8dede14ac8 | ||
|
|
20687a397e | ||
|
|
454f97fa0f | ||
|
|
8149fc7dcb | ||
|
|
a39ab89236 | ||
|
|
5b8501fb57 | ||
|
|
039be2ab75 | ||
|
|
718c7e0fc1 | ||
|
|
ef7951b91d | ||
|
|
214b1f021b | ||
|
|
81b18c0741 | ||
|
|
8e83f72456 | ||
|
|
c2ae625032 | ||
|
|
60566dc84c | ||
|
|
4ea8fe694d | ||
|
|
669d1ab008 | ||
|
|
e87d5111a2 | ||
|
|
56158779de | ||
|
|
efb322df66 | ||
|
|
e673d541c1 | ||
|
|
a98db529fb | ||
|
|
1a9eaaad8f | ||
|
|
be5fbca9b6 | ||
|
|
2feb264375 | ||
|
|
00990f2649 | ||
|
|
d78713be48 | ||
|
|
77367abe13 | ||
|
|
cd046f6fd0 | ||
|
|
63b7ec2887 | ||
|
|
a1e8f1c3e5 | ||
|
|
6db480a1ab | ||
|
|
a7acd9de6d | ||
|
|
a64f4d1870 | ||
|
|
9bfe59b630 | ||
|
|
1a4bf16521 | ||
|
|
a4d5d0a75a | ||
|
|
c40f1f9f66 | ||
|
|
15e5052dd0 | ||
|
|
f9f7963453 | ||
|
|
02240eff8c | ||
|
|
d64c963e5e | ||
|
|
c6292ce9ee | ||
|
|
cd652e2644 | ||
|
|
6f5ef0fe0f | ||
|
|
01fa968763 | ||
|
|
8e6f3ad99e | ||
|
|
b1f2479ec1 | ||
|
|
ecceba8ecd | ||
|
|
cb5f4a9c17 | ||
|
|
3a8ebfdcb6 | ||
|
|
0dcafeb571 | ||
|
|
a1d7ee4c6b | ||
|
|
03e70ba2ed | ||
|
|
19ef8c5d65 | ||
|
|
63baa9e263 | ||
|
|
1248bd5859 | ||
|
|
5c951ddb8a | ||
|
|
4ab0ad928d | ||
|
|
e67eb47796 | ||
|
|
a6656a8c49 | ||
|
|
a903d0a5bd | ||
|
|
ceaebfd877 | ||
|
|
5156ff11a8 | ||
|
|
e0143a92a8 | ||
|
|
f682d9a2e9 | ||
|
|
3bece0ff40 | ||
|
|
e6c456a970 | ||
|
|
923d1d712f | ||
|
|
ae8459bd35 | ||
|
|
3a7be07c62 | ||
|
|
e1cc0000c6 | ||
|
|
1210e8e95c | ||
|
|
a45fbd9cae | ||
|
|
f6d45f7990 | ||
|
|
b9464f993b | ||
|
|
f8f73b0cd7 | ||
|
|
df6ab2edd8 | ||
|
|
8bf7600154 | ||
|
|
a30501956f | ||
|
|
c287a40a20 | ||
|
|
04f50c24e2 | ||
|
|
7627b23212 | ||
|
|
e90e7febfb | ||
|
|
733b85a132 | ||
|
|
35ba786e63 | ||
|
|
446810a837 | ||
|
|
c6a68c3e51 | ||
|
|
ca8bef3ade | ||
|
|
d735caa334 | ||
|
|
eb54cc0e0f | ||
|
|
84c67c37cd | ||
|
|
b44f38a362 | ||
|
|
8ed4088d0a | ||
|
|
cdcea2a4f9 | ||
|
|
f0d80326ec | ||
|
|
cb8fc26cbe | ||
|
|
5ec5b5ed00 | ||
|
|
67e29c1af1 | ||
|
|
4bd94a79a4 | ||
|
|
80e597d951 | ||
|
|
2e269f5b8c | ||
|
|
57b8e35903 | ||
|
|
53be5765e6 | ||
|
|
68741c925b | ||
|
|
9ce207e667 | ||
|
|
07e0966517 | ||
|
|
a9d4c2a923 | ||
|
|
dc02e1feaa | ||
|
|
7daff331dc | ||
|
|
058a2fb0f4 | ||
|
|
4fff3b946e | ||
|
|
f7aa5e781b | ||
|
|
298c5cccfa | ||
|
|
2985571620 | ||
|
|
279d29cd7f | ||
|
|
387320ad6d | ||
|
|
76cd83edb2 | ||
|
|
7f4d667351 | ||
|
|
8027716264 | ||
|
|
a459dd7741 | ||
|
|
ef6011ac12 | ||
|
|
6d66051d92 | ||
|
|
b2cc2ef0d7 | ||
|
|
9805320517 | ||
|
|
582d17bb84 | ||
|
|
9e5f5b35a6 | ||
|
|
9a9c69ff50 | ||
|
|
5c1f3f395c | ||
|
|
23cefffe43 | ||
|
|
d048d5a639 | ||
|
|
9a6f773dea | ||
|
|
cd7c7902a9 | ||
|
|
fd3dad920d | ||
|
|
3dc192f63e | ||
|
|
123c7ab140 | ||
|
|
838996a0fc | ||
|
|
6e4fea34a4 | ||
|
|
b52c289931 | ||
|
|
4dbb5b89da | ||
|
|
84d0212e79 | ||
|
|
35acb3f00b | ||
|
|
7f2771b466 | ||
|
|
5fdf5516ff | ||
|
|
234de96784 | ||
|
|
df4532d9a1 | ||
|
|
c27f535768 | ||
|
|
c7ac314110 | ||
|
|
3215403815 | ||
|
|
bea2a6cf5b | ||
|
|
a28f411339 | ||
|
|
460d9c75c5 | ||
|
|
d1033abbe5 | ||
|
|
9eac9dd30a | ||
|
|
8d7b6adf98 | ||
|
|
230ff87634 | ||
|
|
19adf2630a | ||
|
|
3de4b16117 | ||
|
|
602e3a7587 | ||
|
|
4f6ffb67c1 | ||
|
|
a0194ddd18 | ||
|
|
30f7e876a2 | ||
|
|
5958490c23 | ||
|
|
f92ad4423d | ||
|
|
e0749a82c2 | ||
|
|
440aa003af | ||
|
|
9580f5395f | ||
|
|
e9ae4deb91 | ||
|
|
aee0762424 | ||
|
|
e6332eff2b | ||
|
|
d0a632f557 | ||
|
|
f4cdc527b0 | ||
|
|
661dc515ab | ||
|
|
6d9bafe068 | ||
|
|
202c8aaee8 |
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -17,6 +17,9 @@ Steps to reproduce the behavior.
|
|||||||
A clear and concise description of what you expected to happen.
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
**Required data**
|
**Required data**
|
||||||
|
- XMRig version
|
||||||
|
- Either the exact link to a release you downloaded from https://github.com/xmrig/xmrig/releases
|
||||||
|
- Or the exact command lines that you used to build XMRig
|
||||||
- Miner log as text or screenshot
|
- Miner log as text or screenshot
|
||||||
- Config file or command line (without wallets)
|
- Config file or command line (without wallets)
|
||||||
- OS: [e.g. Windows]
|
- OS: [e.g. Windows]
|
||||||
|
|||||||
180
CHANGELOG.md
180
CHANGELOG.md
@@ -1,3 +1,183 @@
|
|||||||
|
# v6.22.2
|
||||||
|
- [#3569](https://github.com/xmrig/xmrig/pull/3569) Fixed corrupted API output in some rare conditions.
|
||||||
|
- [#3571](https://github.com/xmrig/xmrig/pull/3571) Fixed number of threads on the new Intel Core Ultra CPUs.
|
||||||
|
|
||||||
|
# v6.22.1
|
||||||
|
- [#3531](https://github.com/xmrig/xmrig/pull/3531) Always reset nonce on RandomX dataset change.
|
||||||
|
- [#3534](https://github.com/xmrig/xmrig/pull/3534) Fixed threads auto-config on Zen5.
|
||||||
|
- [#3535](https://github.com/xmrig/xmrig/pull/3535) RandomX: tweaks for Zen5.
|
||||||
|
- [#3539](https://github.com/xmrig/xmrig/pull/3539) Added Zen5 to `randomx_boost.sh`.
|
||||||
|
- [#3540](https://github.com/xmrig/xmrig/pull/3540) Detect AMD engineering samples in `randomx_boost.sh`.
|
||||||
|
|
||||||
|
# v6.22.0
|
||||||
|
- [#2411](https://github.com/xmrig/xmrig/pull/2411) Added support for [Yada](https://yadacoin.io/) (`rx/yada` algorithm).
|
||||||
|
- [#3492](https://github.com/xmrig/xmrig/pull/3492) Fixed `--background` option on Unix systems.
|
||||||
|
- [#3518](https://github.com/xmrig/xmrig/pull/3518) Possible fix for corrupted API output in rare cases.
|
||||||
|
- [#3522](https://github.com/xmrig/xmrig/pull/3522) Removed `rx/keva` algorithm.
|
||||||
|
- [#3525](https://github.com/xmrig/xmrig/pull/3525) Added Zen5 detection.
|
||||||
|
- [#3528](https://github.com/xmrig/xmrig/pull/3528) Added `rx/yada` OpenCL support.
|
||||||
|
|
||||||
|
# v6.21.3
|
||||||
|
- [#3462](https://github.com/xmrig/xmrig/pull/3462) RandomX: correct memcpy size for JIT initialization.
|
||||||
|
|
||||||
|
# v6.21.2
|
||||||
|
- The dependencies of all prebuilt releases have been updated. Support for old Ubuntu releases has been dropped.
|
||||||
|
- [#2800](https://github.com/xmrig/xmrig/issues/2800) Fixed donation with GhostRider algorithm for builds without KawPow algorithm.
|
||||||
|
- [#3436](https://github.com/xmrig/xmrig/pull/3436) Fixed, the file log writer was not thread-safe.
|
||||||
|
- [#3450](https://github.com/xmrig/xmrig/pull/3450) Fixed RandomX crash when compiled with fortify_source.
|
||||||
|
|
||||||
|
# v6.21.1
|
||||||
|
- [#3391](https://github.com/xmrig/xmrig/pull/3391) Added support for townforge (monero fork using randomx).
|
||||||
|
- [#3399](https://github.com/xmrig/xmrig/pull/3399) Fixed Zephyr mining (OpenCL).
|
||||||
|
- [#3420](https://github.com/xmrig/xmrig/pull/3420) Fixed segfault in HTTP API rebind.
|
||||||
|
|
||||||
|
# v6.21.0
|
||||||
|
- [#3302](https://github.com/xmrig/xmrig/pull/3302) [#3312](https://github.com/xmrig/xmrig/pull/3312) Enabled keepalive for Windows (>= Vista).
|
||||||
|
- [#3320](https://github.com/xmrig/xmrig/pull/3320) Added "built for OS/architecture/bits" to "ABOUT".
|
||||||
|
- [#3339](https://github.com/xmrig/xmrig/pull/3339) Added SNI option for TLS connections.
|
||||||
|
- [#3342](https://github.com/xmrig/xmrig/pull/3342) Update `cn_main_loop.asm`.
|
||||||
|
- [#3346](https://github.com/xmrig/xmrig/pull/3346) ARM64 JIT: don't use `x18` register.
|
||||||
|
- [#3348](https://github.com/xmrig/xmrig/pull/3348) Update to latest `sse2neon.h`.
|
||||||
|
- [#3356](https://github.com/xmrig/xmrig/pull/3356) Updated pricing record size for **Zephyr** solo mining.
|
||||||
|
- [#3358](https://github.com/xmrig/xmrig/pull/3358) **Zephyr** solo mining: handle multiple outputs.
|
||||||
|
|
||||||
|
# v6.20.0
|
||||||
|
- Added new ARM CPU names.
|
||||||
|
- [#2394](https://github.com/xmrig/xmrig/pull/2394) Added new CMake options `ARM_V8` and `ARM_V7`.
|
||||||
|
- [#2830](https://github.com/xmrig/xmrig/pull/2830) Added API rebind polling.
|
||||||
|
- [#2927](https://github.com/xmrig/xmrig/pull/2927) Fixed compatibility with hwloc 1.11.x.
|
||||||
|
- [#3060](https://github.com/xmrig/xmrig/pull/3060) Added x86 to `README.md`.
|
||||||
|
- [#3236](https://github.com/xmrig/xmrig/pull/3236) Fixed: receive CUDA loader error on Linux too.
|
||||||
|
- [#3290](https://github.com/xmrig/xmrig/pull/3290) Added [Zephyr](https://www.zephyrprotocol.com/) coin support for solo mining.
|
||||||
|
|
||||||
|
# v6.19.3
|
||||||
|
- [#3245](https://github.com/xmrig/xmrig/issues/3245) Improved algorithm negotiation for donation rounds by sending extra information about current mining job.
|
||||||
|
- [#3254](https://github.com/xmrig/xmrig/pull/3254) Tweaked auto-tuning for Intel CPUs.
|
||||||
|
- [#3271](https://github.com/xmrig/xmrig/pull/3271) RandomX: optimized program generation.
|
||||||
|
- [#3273](https://github.com/xmrig/xmrig/pull/3273) RandomX: fixed undefined behavior.
|
||||||
|
- [#3275](https://github.com/xmrig/xmrig/pull/3275) RandomX: fixed `jccErratum` list.
|
||||||
|
- [#3280](https://github.com/xmrig/xmrig/pull/3280) Updated example scripts.
|
||||||
|
|
||||||
|
# v6.19.2
|
||||||
|
- [#3230](https://github.com/xmrig/xmrig/pull/3230) Fixed parsing of `TX_EXTRA_MERGE_MINING_TAG`.
|
||||||
|
- [#3232](https://github.com/xmrig/xmrig/pull/3232) Added new `X-Hash-Difficulty` HTTP header.
|
||||||
|
- [#3240](https://github.com/xmrig/xmrig/pull/3240) Improved .cmd files when run by shortcuts on another drive.
|
||||||
|
- [#3241](https://github.com/xmrig/xmrig/pull/3241) Added view tag calculation (fixes Wownero solo mining issue).
|
||||||
|
|
||||||
|
# v6.19.1
|
||||||
|
- Resolved deprecated methods warnings with OpenSSL 3.0.
|
||||||
|
- [#3213](https://github.com/xmrig/xmrig/pull/3213) Fixed build with 32-bit clang 15.
|
||||||
|
- [#3218](https://github.com/xmrig/xmrig/pull/3218) Fixed: `--randomx-wrmsr=-1` worked only on Intel.
|
||||||
|
- [#3228](https://github.com/xmrig/xmrig/pull/3228) Fixed build with gcc 13.
|
||||||
|
|
||||||
|
# v6.19.0
|
||||||
|
- [#3144](https://github.com/xmrig/xmrig/pull/3144) Update to latest `sse2neon.h`.
|
||||||
|
- [#3161](https://github.com/xmrig/xmrig/pull/3161) MSVC build: enabled parallel compilation.
|
||||||
|
- [#3163](https://github.com/xmrig/xmrig/pull/3163) Improved Zen 3 MSR mod.
|
||||||
|
- [#3176](https://github.com/xmrig/xmrig/pull/3176) Update cmake required version to 3.1.
|
||||||
|
- [#3182](https://github.com/xmrig/xmrig/pull/3182) DragonflyBSD compilation fixes.
|
||||||
|
- [#3196](https://github.com/xmrig/xmrig/pull/3196) Show IP address for failed connections.
|
||||||
|
- [#3185](https://github.com/xmrig/xmrig/issues/3185) Fixed macOS DMI reader.
|
||||||
|
- [#3198](https://github.com/xmrig/xmrig/pull/3198) Fixed broken RandomX light mode mining.
|
||||||
|
- [#3202](https://github.com/xmrig/xmrig/pull/3202) Solo mining: added job timeout (default is 15 seconds).
|
||||||
|
|
||||||
|
# v6.18.1
|
||||||
|
- [#3129](https://github.com/xmrig/xmrig/pull/3129) Fix: protectRX flushed CPU cache only on MacOS/iOS.
|
||||||
|
- [#3126](https://github.com/xmrig/xmrig/pull/3126) Don't reset when pool sends the same job blob.
|
||||||
|
- [#3120](https://github.com/xmrig/xmrig/pull/3120) RandomX: optimized `CFROUND` elimination.
|
||||||
|
- [#3109](https://github.com/xmrig/xmrig/pull/3109) RandomX: added Blake2 AVX2 version.
|
||||||
|
- [#3082](https://github.com/xmrig/xmrig/pull/3082) Fixed GCC 12 warnings.
|
||||||
|
- [#3075](https://github.com/xmrig/xmrig/pull/3075) Recognize `armv7ve` as valid ARMv7 target.
|
||||||
|
- [#3132](https://github.com/xmrig/xmrig/pull/3132) RandomX: added MSR mod for Zen 4.
|
||||||
|
- [#3134](https://github.com/xmrig/xmrig/pull/3134) Added Zen4 to `randomx_boost.sh`.
|
||||||
|
|
||||||
|
# v6.18.0
|
||||||
|
- [#3067](https://github.com/xmrig/xmrig/pull/3067) Monero v15 network upgrade support and more house keeping.
|
||||||
|
- Removed deprecated AstroBWTv1 and v2.
|
||||||
|
- Fixed debug GhostRider build.
|
||||||
|
- Monero v15 network upgrade support.
|
||||||
|
- Fixed ZMQ debug log.
|
||||||
|
- Improved daemon ZMQ mining stability.
|
||||||
|
- [#3054](https://github.com/xmrig/xmrig/pull/3054) Fixes for 32-bit ARM.
|
||||||
|
- [#3042](https://github.com/xmrig/xmrig/pull/3042) Fixed being unable to resume from `pause-on-battery`.
|
||||||
|
- [#3031](https://github.com/xmrig/xmrig/pull/3031) Fixed `--cpu-priority` not working sometimes.
|
||||||
|
- [#3020](https://github.com/xmrig/xmrig/pull/3020) Removed old AstroBWT algorithm.
|
||||||
|
|
||||||
|
# v6.17.0
|
||||||
|
- [#2954](https://github.com/xmrig/xmrig/pull/2954) **Dero HE fork support (`astrobwt/v2` algorithm).**
|
||||||
|
- [#2961](https://github.com/xmrig/xmrig/pull/2961) Dero HE (`astrobwt/v2`) CUDA config generator.
|
||||||
|
- [#2969](https://github.com/xmrig/xmrig/pull/2969) Dero HE (`astrobwt/v2`) OpenCL support.
|
||||||
|
- Fixed displayed DMI memory information for empty slots.
|
||||||
|
- [#2932](https://github.com/xmrig/xmrig/pull/2932) Fixed GhostRider with hwloc disabled.
|
||||||
|
|
||||||
|
# v6.16.4
|
||||||
|
- [#2904](https://github.com/xmrig/xmrig/pull/2904) Fixed unaligned memory accesses.
|
||||||
|
- [#2908](https://github.com/xmrig/xmrig/pull/2908) Added MSVC/2022 to `version.h`.
|
||||||
|
- [#2910](https://github.com/xmrig/xmrig/issues/2910) Fixed donation for GhostRider/RTM.
|
||||||
|
|
||||||
|
# v6.16.3
|
||||||
|
- [#2778](https://github.com/xmrig/xmrig/pull/2778) Fixed `READY threads X/X` display after algorithm switching.
|
||||||
|
- [#2782](https://github.com/xmrig/xmrig/pull/2782) Updated GhostRider documentation.
|
||||||
|
- [#2815](https://github.com/xmrig/xmrig/pull/2815) Fixed `cn-heavy` in 32-bit builds.
|
||||||
|
- [#2827](https://github.com/xmrig/xmrig/pull/2827) GhostRider: set correct priority for helper threads.
|
||||||
|
- [#2837](https://github.com/xmrig/xmrig/pull/2837) RandomX: don't restart mining threads when the seed changes.
|
||||||
|
- [#2848](https://github.com/xmrig/xmrig/pull/2848) GhostRider: added support for `client.reconnect` method.
|
||||||
|
- [#2856](https://github.com/xmrig/xmrig/pull/2856) Fix for short responses from some Raptoreum pools.
|
||||||
|
- [#2873](https://github.com/xmrig/xmrig/pull/2873) Fixed GhostRider benchmark on single-core systems.
|
||||||
|
- [#2882](https://github.com/xmrig/xmrig/pull/2882) Fixed ARMv7 compilation.
|
||||||
|
- [#2893](https://github.com/xmrig/xmrig/pull/2893) KawPow OpenCL: use separate UV loop for building programs.
|
||||||
|
|
||||||
|
# v6.16.2
|
||||||
|
- [#2751](https://github.com/xmrig/xmrig/pull/2751) Fixed crash on CPUs supporting VAES and running GCC-compiled xmrig.
|
||||||
|
- [#2761](https://github.com/xmrig/xmrig/pull/2761) Fixed broken auto-tuning in GCC Windows build.
|
||||||
|
- [#2771](https://github.com/xmrig/xmrig/issues/2771) Fixed environment variables support for GhostRider and KawPow.
|
||||||
|
- [#2769](https://github.com/xmrig/xmrig/pull/2769) Performance fixes:
|
||||||
|
- Fixed several performance bottlenecks introduced in v6.16.1.
|
||||||
|
- Fixed overall GCC-compiled build performance, it's the same speed as MSVC build now.
|
||||||
|
- **Linux builds are up to 10% faster now compared to v6.16.0 GCC build.**
|
||||||
|
- **Windows builds are up to 5% faster now compared to v6.16.0 MSVC build.**
|
||||||
|
|
||||||
|
# v6.16.1
|
||||||
|
- [#2729](https://github.com/xmrig/xmrig/pull/2729) GhostRider fixes:
|
||||||
|
- Added average hashrate display.
|
||||||
|
- Fixed the number of threads shown at startup.
|
||||||
|
- Fixed `--threads` or `-t` command line option (but `--cpu-max-threads-hint` is recommended to use).
|
||||||
|
- [#2738](https://github.com/xmrig/xmrig/pull/2738) GhostRider fixes:
|
||||||
|
- Fixed "difficulty is not a number" error when diff is high on some pools.
|
||||||
|
- Fixed GhostRider compilation when `WITH_KAWPOW=OFF`.
|
||||||
|
- [#2740](https://github.com/xmrig/xmrig/pull/2740) Added VAES support for Cryptonight variants **+4% speedup on Zen3**.
|
||||||
|
- VAES instructions are available on Intel Ice Lake/AMD Zen3 and newer CPUs.
|
||||||
|
- +4% speedup on Ryzen 5 5600X.
|
||||||
|
|
||||||
|
# v6.16.0
|
||||||
|
- [#2712](https://github.com/xmrig/xmrig/pull/2712) **GhostRider algorithm (Raptoreum) support**: read the [RELEASE NOTES](src/crypto/ghostrider/README.md) for quick start guide and performance comparisons.
|
||||||
|
- [#2682](https://github.com/xmrig/xmrig/pull/2682) Fixed: use cn-heavy optimization only for Vermeer CPUs.
|
||||||
|
- [#2684](https://github.com/xmrig/xmrig/pull/2684) MSR mod: fix for error 183.
|
||||||
|
|
||||||
|
# v6.15.3
|
||||||
|
- [#2614](https://github.com/xmrig/xmrig/pull/2614) OpenCL fixes for non-AMD platforms.
|
||||||
|
- [#2623](https://github.com/xmrig/xmrig/pull/2623) Fixed compiling without kawpow.
|
||||||
|
- [#2636](https://github.com/xmrig/xmrig/pull/2636) [#2639](https://github.com/xmrig/xmrig/pull/2639) AstroBWT speedup (up to +35%).
|
||||||
|
- [#2646](https://github.com/xmrig/xmrig/pull/2646) Fixed MSVC compilation error.
|
||||||
|
|
||||||
|
# v6.15.2
|
||||||
|
- [#2606](https://github.com/xmrig/xmrig/pull/2606) Fixed: AstroBWT auto-config ignored `max-threads-hint`.
|
||||||
|
- Fixed possible crash on Windows (regression in v6.15.1).
|
||||||
|
|
||||||
|
# v6.15.1
|
||||||
|
- [#2586](https://github.com/xmrig/xmrig/pull/2586) Fixed Windows 7 compatibility.
|
||||||
|
- [#2594](https://github.com/xmrig/xmrig/pull/2594) Added Windows taskbar icon colors.
|
||||||
|
|
||||||
|
# v6.15.0
|
||||||
|
- [#2548](https://github.com/xmrig/xmrig/pull/2548) Added automatic coin detection for daemon mining.
|
||||||
|
- [#2563](https://github.com/xmrig/xmrig/pull/2563) Added new algorithm RandomX Graft (`rx/graft`).
|
||||||
|
- [#2565](https://github.com/xmrig/xmrig/pull/2565) AstroBWT: added AVX2 Salsa20 implementation.
|
||||||
|
- Added support for new CUDA plugin API (previous API still supported).
|
||||||
|
|
||||||
|
# v6.14.1
|
||||||
|
- [#2532](https://github.com/xmrig/xmrig/pull/2532) Refactoring: stable (persistent) algorithms IDs.
|
||||||
|
- [#2537](https://github.com/xmrig/xmrig/pull/2537) Fixed Termux build.
|
||||||
|
|
||||||
# v6.14.0
|
# v6.14.0
|
||||||
- [#2484](https://github.com/xmrig/xmrig/pull/2484) Added ZeroMQ support for solo mining.
|
- [#2484](https://github.com/xmrig/xmrig/pull/2484) Added ZeroMQ support for solo mining.
|
||||||
- [#2476](https://github.com/xmrig/xmrig/issues/2476) Fixed crash in DMI memory reader.
|
- [#2476](https://github.com/xmrig/xmrig/issues/2476) Fixed crash in DMI memory reader.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.12)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(xmrig)
|
project(xmrig)
|
||||||
|
|
||||||
option(WITH_HWLOC "Enable hwloc support" ON)
|
option(WITH_HWLOC "Enable hwloc support" ON)
|
||||||
@@ -8,8 +8,8 @@ option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
|
|||||||
option(WITH_CN_FEMTO "Enable CryptoNight-UPX2 algorithm" ON)
|
option(WITH_CN_FEMTO "Enable CryptoNight-UPX2 algorithm" ON)
|
||||||
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
|
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
|
||||||
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
|
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
|
||||||
option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON)
|
|
||||||
option(WITH_KAWPOW "Enable KawPow algorithms family" ON)
|
option(WITH_KAWPOW "Enable KawPow algorithms family" ON)
|
||||||
|
option(WITH_GHOSTRIDER "Enable GhostRider algorithm" ON)
|
||||||
option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
|
option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
|
||||||
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
|
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
|
||||||
option(WITH_TLS "Enable OpenSSL support" ON)
|
option(WITH_TLS "Enable OpenSSL support" ON)
|
||||||
@@ -18,6 +18,8 @@ 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_ENV_VARS "Enable environment variables support in config file" ON)
|
||||||
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
||||||
option(WITH_OPENCL "Enable OpenCL backend" ON)
|
option(WITH_OPENCL "Enable OpenCL backend" ON)
|
||||||
|
set(WITH_OPENCL_VERSION 200 CACHE STRING "Target OpenCL version")
|
||||||
|
set_property(CACHE WITH_OPENCL_VERSION PROPERTY STRINGS 120 200 210 220)
|
||||||
option(WITH_CUDA "Enable CUDA 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_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_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON)
|
||||||
@@ -25,12 +27,16 @@ option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON)
|
|||||||
option(WITH_INTERLEAVE_DEBUG_LOG "Enable debug log for threads interleave" OFF)
|
option(WITH_INTERLEAVE_DEBUG_LOG "Enable debug log for threads interleave" OFF)
|
||||||
option(WITH_PROFILING "Enable profiling for developers" OFF)
|
option(WITH_PROFILING "Enable profiling for developers" OFF)
|
||||||
option(WITH_SSE4_1 "Enable SSE 4.1 for Blake2" ON)
|
option(WITH_SSE4_1 "Enable SSE 4.1 for Blake2" ON)
|
||||||
|
option(WITH_AVX2 "Enable AVX2 for Blake2" ON)
|
||||||
|
option(WITH_VAES "Enable VAES instructions for Cryptonight" ON)
|
||||||
option(WITH_BENCHMARK "Enable builtin RandomX benchmark and stress test" ON)
|
option(WITH_BENCHMARK "Enable builtin RandomX benchmark and stress test" ON)
|
||||||
option(WITH_SECURE_JIT "Enable secure access to JIT memory" OFF)
|
option(WITH_SECURE_JIT "Enable secure access to JIT memory" OFF)
|
||||||
option(WITH_DMI "Enable DMI/SMBIOS reader" ON)
|
option(WITH_DMI "Enable DMI/SMBIOS reader" ON)
|
||||||
|
option(WITH_BUNDLED_FMT "Force use of bundled fmt library" ON)
|
||||||
|
|
||||||
option(BUILD_STATIC "Build static binary" OFF)
|
option(BUILD_STATIC "Build static binary" OFF)
|
||||||
option(ARM_TARGET "Force use specific ARM target 8 or 7" 0)
|
option(ARM_V8 "Force ARMv8 (64 bit) architecture, use with caution if automatic detection fails, but you sure it may work" OFF)
|
||||||
|
option(ARM_V7 "Force ARMv7 (32 bit) architecture, use with caution if automatic detection fails, but you sure it may work" OFF)
|
||||||
option(HWLOC_DEBUG "Enable hwloc debug helpers and log" OFF)
|
option(HWLOC_DEBUG "Enable hwloc debug helpers and log" OFF)
|
||||||
|
|
||||||
|
|
||||||
@@ -56,6 +62,7 @@ set(HEADERS
|
|||||||
src/core/config/usage.h
|
src/core/config/usage.h
|
||||||
src/core/Controller.h
|
src/core/Controller.h
|
||||||
src/core/Miner.h
|
src/core/Miner.h
|
||||||
|
src/core/Taskbar.h
|
||||||
src/net/interfaces/IJobResultListener.h
|
src/net/interfaces/IJobResultListener.h
|
||||||
src/net/JobResult.h
|
src/net/JobResult.h
|
||||||
src/net/JobResults.h
|
src/net/JobResults.h
|
||||||
@@ -104,6 +111,7 @@ set(SOURCES
|
|||||||
src/core/config/ConfigTransform.cpp
|
src/core/config/ConfigTransform.cpp
|
||||||
src/core/Controller.cpp
|
src/core/Controller.cpp
|
||||||
src/core/Miner.cpp
|
src/core/Miner.cpp
|
||||||
|
src/core/Taskbar.cpp
|
||||||
src/net/JobResults.cpp
|
src/net/JobResults.cpp
|
||||||
src/net/Network.cpp
|
src/net/Network.cpp
|
||||||
src/net/strategies/DonateStrategy.cpp
|
src/net/strategies/DonateStrategy.cpp
|
||||||
@@ -124,6 +132,19 @@ set(SOURCES_CRYPTO
|
|||||||
src/crypto/common/VirtualMemory.cpp
|
src/crypto/common/VirtualMemory.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CMAKE_C_COMPILER_ID MATCHES GNU)
|
||||||
|
set_source_files_properties(src/crypto/cn/CnHash.cpp PROPERTIES COMPILE_FLAGS "-Ofast -fno-tree-vectorize")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (WITH_VAES)
|
||||||
|
add_definitions(-DXMRIG_VAES)
|
||||||
|
set(HEADERS_CRYPTO "${HEADERS_CRYPTO}" src/crypto/cn/CryptoNight_x86_vaes.h)
|
||||||
|
set(SOURCES_CRYPTO "${SOURCES_CRYPTO}" src/crypto/cn/CryptoNight_x86_vaes.cpp)
|
||||||
|
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||||
|
set_source_files_properties(src/crypto/cn/CryptoNight_x86_vaes.cpp PROPERTIES COMPILE_FLAGS "-Ofast -fno-tree-vectorize -mavx2 -mvaes")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WITH_HWLOC)
|
if (WITH_HWLOC)
|
||||||
list(APPEND HEADERS_CRYPTO
|
list(APPEND HEADERS_CRYPTO
|
||||||
src/crypto/common/NUMAMemoryPool.h
|
src/crypto/common/NUMAMemoryPool.h
|
||||||
@@ -142,7 +163,7 @@ if (XMRIG_OS_WIN)
|
|||||||
src/crypto/common/VirtualMemory_win.cpp
|
src/crypto/common/VirtualMemory_win.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(EXTRA_LIBS ws2_32 psapi iphlpapi userenv)
|
set(EXTRA_LIBS ws2_32 psapi iphlpapi userenv dbghelp)
|
||||||
elseif (XMRIG_OS_APPLE)
|
elseif (XMRIG_OS_APPLE)
|
||||||
list(APPEND SOURCES_OS
|
list(APPEND SOURCES_OS
|
||||||
src/App_unix.cpp
|
src/App_unix.cpp
|
||||||
@@ -178,10 +199,11 @@ add_definitions(-D__STDC_FORMAT_MACROS -DUNICODE -D_FILE_OFFSET_BITS=64)
|
|||||||
find_package(UV REQUIRED)
|
find_package(UV REQUIRED)
|
||||||
|
|
||||||
include(cmake/flags.cmake)
|
include(cmake/flags.cmake)
|
||||||
|
include(cmake/fmt.cmake)
|
||||||
include(cmake/randomx.cmake)
|
include(cmake/randomx.cmake)
|
||||||
include(cmake/argon2.cmake)
|
include(cmake/argon2.cmake)
|
||||||
include(cmake/astrobwt.cmake)
|
|
||||||
include(cmake/kawpow.cmake)
|
include(cmake/kawpow.cmake)
|
||||||
|
include(cmake/ghostrider.cmake)
|
||||||
include(cmake/OpenSSL.cmake)
|
include(cmake/OpenSSL.cmake)
|
||||||
include(cmake/asm.cmake)
|
include(cmake/asm.cmake)
|
||||||
|
|
||||||
@@ -209,7 +231,7 @@ include(src/hw/api/api.cmake)
|
|||||||
include(src/hw/dmi/dmi.cmake)
|
include(src/hw/dmi/dmi.cmake)
|
||||||
|
|
||||||
include_directories(src)
|
include_directories(src)
|
||||||
include_directories(src/3rdparty)
|
include_directories(src/3rdparty/CL)
|
||||||
include_directories(${UV_INCLUDE_DIR})
|
include_directories(${UV_INCLUDE_DIR})
|
||||||
|
|
||||||
if (WITH_DEBUG_LOG)
|
if (WITH_DEBUG_LOG)
|
||||||
@@ -217,7 +239,7 @@ if (WITH_DEBUG_LOG)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${TLS_SOURCES} ${XMRIG_ASM_SOURCES})
|
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${TLS_SOURCES} ${XMRIG_ASM_SOURCES})
|
||||||
target_link_libraries(${CMAKE_PROJECT_NAME} ${XMRIG_ASM_LIBRARY} ${OPENSSL_LIBRARIES} ${UV_LIBRARIES} ${EXTRA_LIBS} ${CPUID_LIB} ${ARGON2_LIBRARY} ${ETHASH_LIBRARY})
|
target_link_libraries(${CMAKE_PROJECT_NAME} ${XMRIG_ASM_LIBRARY} ${OPENSSL_LIBRARIES} ${UV_LIBRARIES} ${EXTRA_LIBS} ${CPUID_LIB} ${ARGON2_LIBRARY} ${ETHASH_LIBRARY} ${GHOSTRIDER_LIBRARY} ${FMT_LIBRARY})
|
||||||
|
|
||||||
if (WIN32)
|
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}>)
|
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}>)
|
||||||
@@ -225,6 +247,7 @@ if (WIN32)
|
|||||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/benchmark_10M.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/benchmark_10M.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/pool_mine_example.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/pool_mine_example.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/solo_mine_example.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/solo_mine_example.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||||
|
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/rtm_ghostrider_example.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_BUILD_TYPE STREQUAL Release AND NOT CMAKE_GENERATOR STREQUAL Xcode)
|
if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_BUILD_TYPE STREQUAL Release AND NOT CMAKE_GENERATOR STREQUAL Xcode)
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
[](https://github.com/xmrig/xmrig/stargazers)
|
[](https://github.com/xmrig/xmrig/stargazers)
|
||||||
[](https://github.com/xmrig/xmrig/network)
|
[](https://github.com/xmrig/xmrig/network)
|
||||||
|
|
||||||
XMRig is a high performance, open source, cross platform RandomX, KawPow, CryptoNight and AstroBWT unified CPU/GPU miner and [RandomX benchmark](https://xmrig.com/benchmark). Official binaries are available for Windows, Linux, macOS and FreeBSD.
|
XMRig is a high performance, open source, cross platform RandomX, KawPow, CryptoNight and [GhostRider](https://github.com/xmrig/xmrig/tree/master/src/crypto/ghostrider#readme) unified CPU/GPU miner and [RandomX benchmark](https://xmrig.com/benchmark). Official binaries are available for Windows, Linux, macOS and FreeBSD.
|
||||||
|
|
||||||
## Mining backends
|
## Mining backends
|
||||||
- **CPU** (x64/ARMv8)
|
- **CPU** (x86/x64/ARMv7/ARMv8)
|
||||||
- **OpenCL** for AMD GPUs.
|
- **OpenCL** for AMD GPUs.
|
||||||
- **CUDA** for NVIDIA GPUs via external [CUDA plugin](https://github.com/xmrig/xmrig-cuda).
|
- **CUDA** for NVIDIA GPUs via external [CUDA plugin](https://github.com/xmrig/xmrig-cuda).
|
||||||
|
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
if (WITH_ASTROBWT)
|
|
||||||
add_definitions(/DXMRIG_ALGO_ASTROBWT)
|
|
||||||
|
|
||||||
list(APPEND HEADERS_CRYPTO
|
|
||||||
src/crypto/astrobwt/AstroBWT.h
|
|
||||||
)
|
|
||||||
|
|
||||||
list(APPEND SOURCES_CRYPTO
|
|
||||||
src/crypto/astrobwt/AstroBWT.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()
|
|
||||||
@@ -1,47 +1,70 @@
|
|||||||
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(XMRIG_64_BIT ON)
|
||||||
|
add_definitions(-DXMRIG_64_BIT)
|
||||||
|
else()
|
||||||
|
set(XMRIG_64_BIT OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT CMAKE_SYSTEM_PROCESSOR)
|
if (NOT CMAKE_SYSTEM_PROCESSOR)
|
||||||
message(WARNING "CMAKE_SYSTEM_PROCESSOR not defined")
|
message(WARNING "CMAKE_SYSTEM_PROCESSOR not defined")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
include(CheckCXXCompilerFlag)
|
||||||
add_definitions(/DRAPIDJSON_SSE2)
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||||
|
set(VAES_SUPPORTED ON)
|
||||||
|
else()
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-mavx2 -mvaes" VAES_SUPPORTED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT VAES_SUPPORTED)
|
||||||
|
set(WITH_VAES OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (XMRIG_64_BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
|
||||||
|
add_definitions(-DRAPIDJSON_SSE2)
|
||||||
else()
|
else()
|
||||||
set(WITH_SSE4_1 OFF)
|
set(WITH_SSE4_1 OFF)
|
||||||
|
set(WITH_AVX2 OFF)
|
||||||
|
set(WITH_VAES OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ARM_V8)
|
||||||
|
set(ARM_TARGET 8)
|
||||||
|
elseif (ARM_V7)
|
||||||
|
set(ARM_TARGET 7)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT ARM_TARGET)
|
if (NOT ARM_TARGET)
|
||||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv8-a)$")
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv8-a)$")
|
||||||
set(ARM_TARGET 8)
|
set(ARM_TARGET 8)
|
||||||
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7|armv7f|armv7s|armv7k|armv7-a|armv7l)$")
|
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7|armv7f|armv7s|armv7k|armv7-a|armv7l|armv7ve)$")
|
||||||
set(ARM_TARGET 7)
|
set(ARM_TARGET 7)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARM_TARGET AND ARM_TARGET GREATER 6)
|
if (ARM_TARGET AND ARM_TARGET GREATER 6)
|
||||||
set(XMRIG_ARM ON)
|
set(XMRIG_ARM ON)
|
||||||
add_definitions(/DXMRIG_ARM)
|
add_definitions(-DXMRIG_ARM=${ARM_TARGET})
|
||||||
|
|
||||||
message(STATUS "Use ARM_TARGET=${ARM_TARGET} (${CMAKE_SYSTEM_PROCESSOR})")
|
message(STATUS "Use ARM_TARGET=${ARM_TARGET} (${CMAKE_SYSTEM_PROCESSOR})")
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
|
||||||
|
|
||||||
if (ARM_TARGET EQUAL 8)
|
if (ARM_TARGET EQUAL 8)
|
||||||
set(XMRIG_ARMv8 ON)
|
|
||||||
add_definitions(/DXMRIG_ARMv8)
|
|
||||||
|
|
||||||
CHECK_CXX_COMPILER_FLAG(-march=armv8-a+crypto XMRIG_ARM_CRYPTO)
|
CHECK_CXX_COMPILER_FLAG(-march=armv8-a+crypto XMRIG_ARM_CRYPTO)
|
||||||
|
|
||||||
if (XMRIG_ARM_CRYPTO)
|
if (XMRIG_ARM_CRYPTO)
|
||||||
add_definitions(/DXMRIG_ARM_CRYPTO)
|
add_definitions(-DXMRIG_ARM_CRYPTO)
|
||||||
set(ARM8_CXX_FLAGS "-march=armv8-a+crypto")
|
set(ARM8_CXX_FLAGS "-march=armv8-a+crypto")
|
||||||
else()
|
else()
|
||||||
set(ARM8_CXX_FLAGS "-march=armv8-a")
|
set(ARM8_CXX_FLAGS "-march=armv8-a")
|
||||||
endif()
|
endif()
|
||||||
elseif (ARM_TARGET EQUAL 7)
|
|
||||||
set(XMRIG_ARMv7 ON)
|
|
||||||
add_definitions(/DXMRIG_ARMv7)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WITH_SSE4_1)
|
if (WITH_SSE4_1)
|
||||||
add_definitions(/DXMRIG_FEATURE_SSE4_1)
|
add_definitions(-DXMRIG_FEATURE_SSE4_1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (WITH_AVX2)
|
||||||
|
add_definitions(-DXMRIG_FEATURE_AVX2)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
add_definitions(/DNDEBUG)
|
add_definitions(-DNDEBUG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
@@ -22,17 +22,17 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fno-rtti -Wno-strict-aliasing -Wno-class-memaccess")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fno-rtti -Wno-strict-aliasing -Wno-class-memaccess")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -s")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -s")
|
||||||
|
|
||||||
if (XMRIG_ARMv8)
|
if (ARM_TARGET EQUAL 8)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARM8_CXX_FLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARM8_CXX_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARM8_CXX_FLAGS} -flax-vector-conversions")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARM8_CXX_FLAGS} -flax-vector-conversions")
|
||||||
elseif (XMRIG_ARMv7)
|
elseif (ARM_TARGET EQUAL 7)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mfpu=neon")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -flax-vector-conversions")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=neon -flax-vector-conversions")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
||||||
|
|
||||||
add_definitions(/DHAVE_ROTR)
|
add_definitions(-DHAVE_ROTR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@@ -49,28 +49,16 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
|||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(/D_GNU_SOURCE)
|
add_definitions(-D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE)
|
||||||
|
|
||||||
if (${CMAKE_VERSION} VERSION_LESS "3.1.0")
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -gdwarf-2")
|
|
||||||
|
|
||||||
add_definitions(/DHAVE_BUILTIN_CLEAR_CACHE)
|
|
||||||
|
|
||||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||||
set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Oi /DNDEBUG /GL")
|
set(CMAKE_C_FLAGS_RELEASE "/MP /MT /O2 /Oi /DNDEBUG /GL")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Oi /DNDEBUG /GL")
|
set(CMAKE_CXX_FLAGS_RELEASE "/MP /MT /O2 /Oi /DNDEBUG /GL")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/Ob1 /Zi /DRELWITHDEBINFO")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MP /Ob1 /Zi /DRELWITHDEBINFO")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Ob1 /Zi /DRELWITHDEBINFO")
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MP /Ob1 /Zi /DRELWITHDEBINFO")
|
||||||
|
|
||||||
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DNOMINMAX -DHAVE_ROTR)
|
||||||
add_definitions(/D_CRT_NONSTDC_NO_WARNINGS)
|
|
||||||
add_definitions(/DNOMINMAX)
|
|
||||||
add_definitions(/DHAVE_ROTR)
|
|
||||||
|
|
||||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||||
|
|
||||||
@@ -80,10 +68,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fno-rtti -Wno-missing-braces")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fno-rtti -Wno-missing-braces")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -funroll-loops -fmerge-all-constants")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -funroll-loops -fmerge-all-constants")
|
||||||
|
|
||||||
if (XMRIG_ARMv8)
|
if (ARM_TARGET EQUAL 8)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARM8_CXX_FLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARM8_CXX_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARM8_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARM8_CXX_FLAGS}")
|
||||||
elseif (XMRIG_ARMv7)
|
elseif (ARM_TARGET EQUAL 7)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -march=${CMAKE_SYSTEM_PROCESSOR}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -march=${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -march=${CMAKE_SYSTEM_PROCESSOR}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -march=${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
else()
|
else()
|
||||||
@@ -92,7 +80,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
|||||||
|
|
||||||
check_symbol_exists("_rotr" "x86intrin.h" HAVE_ROTR)
|
check_symbol_exists("_rotr" "x86intrin.h" HAVE_ROTR)
|
||||||
if (HAVE_ROTR)
|
if (HAVE_ROTR)
|
||||||
add_definitions(/DHAVE_ROTR)
|
add_definitions(-DHAVE_ROTR)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -105,6 +93,6 @@ endif()
|
|||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
check_symbol_exists("__builtin___clear_cache" "stdlib.h" HAVE_BUILTIN_CLEAR_CACHE)
|
check_symbol_exists("__builtin___clear_cache" "stdlib.h" HAVE_BUILTIN_CLEAR_CACHE)
|
||||||
if (HAVE_BUILTIN_CLEAR_CACHE)
|
if (HAVE_BUILTIN_CLEAR_CACHE)
|
||||||
add_definitions(/DHAVE_BUILTIN_CLEAR_CACHE)
|
add_definitions(-DHAVE_BUILTIN_CLEAR_CACHE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
13
cmake/fmt.cmake
Normal file
13
cmake/fmt.cmake
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# SPDX-FileCopyrightText: © 2023 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
|
||||||
|
if(WITH_BUNDLED_FMT)
|
||||||
|
add_library(fmt INTERFACE)
|
||||||
|
target_sources(fmt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/src/3rdparty/fmt/format.cc)
|
||||||
|
target_include_directories(fmt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/src/3rdparty/fmt)
|
||||||
|
else()
|
||||||
|
set(FMT_LIBRARY fmt)
|
||||||
|
find_package(fmt REQUIRED)
|
||||||
|
set(FMT_LIBRARY fmt::fmt)
|
||||||
|
endif()
|
||||||
8
cmake/ghostrider.cmake
Normal file
8
cmake/ghostrider.cmake
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
if (WITH_GHOSTRIDER)
|
||||||
|
add_definitions(/DXMRIG_ALGO_GHOSTRIDER)
|
||||||
|
add_subdirectory(src/crypto/ghostrider)
|
||||||
|
set(GHOSTRIDER_LIBRARY ghostrider)
|
||||||
|
else()
|
||||||
|
remove_definitions(/DXMRIG_ALGO_GHOSTRIDER)
|
||||||
|
set(GHOSTRIDER_LIBRARY "")
|
||||||
|
endif()
|
||||||
@@ -1,7 +1,3 @@
|
|||||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
||||||
add_definitions(/DXMRIG_64_BIT)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(XMRIG_OS_WIN ON)
|
set(XMRIG_OS_WIN ON)
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
@@ -19,39 +15,38 @@ else()
|
|||||||
set(XMRIG_OS_ANDROID ON)
|
set(XMRIG_OS_ANDROID ON)
|
||||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
set(XMRIG_OS_LINUX ON)
|
set(XMRIG_OS_LINUX ON)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD OR CMAKE_SYSTEM_NAME STREQUAL DragonFly)
|
||||||
set(XMRIG_OS_FREEBSD ON)
|
set(XMRIG_OS_FREEBSD ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (XMRIG_OS_WIN)
|
if (XMRIG_OS_WIN)
|
||||||
add_definitions(/DWIN32)
|
add_definitions(-DWIN32 -DXMRIG_OS_WIN)
|
||||||
add_definitions(/DXMRIG_OS_WIN)
|
|
||||||
elseif(XMRIG_OS_APPLE)
|
elseif(XMRIG_OS_APPLE)
|
||||||
add_definitions(/DXMRIG_OS_APPLE)
|
add_definitions(-DXMRIG_OS_APPLE)
|
||||||
|
|
||||||
if (XMRIG_OS_IOS)
|
if (XMRIG_OS_IOS)
|
||||||
add_definitions(/DXMRIG_OS_IOS)
|
add_definitions(-DXMRIG_OS_IOS)
|
||||||
else()
|
else()
|
||||||
add_definitions(/DXMRIG_OS_MACOS)
|
add_definitions(-DXMRIG_OS_MACOS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (XMRIG_ARM)
|
if (XMRIG_ARM)
|
||||||
set(WITH_SECURE_JIT ON)
|
set(WITH_SECURE_JIT ON)
|
||||||
endif()
|
endif()
|
||||||
elseif(XMRIG_OS_UNIX)
|
elseif(XMRIG_OS_UNIX)
|
||||||
add_definitions(/DXMRIG_OS_UNIX)
|
add_definitions(-DXMRIG_OS_UNIX)
|
||||||
|
|
||||||
if (XMRIG_OS_ANDROID)
|
if (XMRIG_OS_ANDROID)
|
||||||
add_definitions(/DXMRIG_OS_ANDROID)
|
add_definitions(-DXMRIG_OS_ANDROID)
|
||||||
elseif (XMRIG_OS_LINUX)
|
elseif (XMRIG_OS_LINUX)
|
||||||
add_definitions(/DXMRIG_OS_LINUX)
|
add_definitions(-DXMRIG_OS_LINUX)
|
||||||
elseif (XMRIG_OS_FREEBSD)
|
elseif (XMRIG_OS_FREEBSD)
|
||||||
add_definitions(/DXMRIG_OS_FREEBSD)
|
add_definitions(-DXMRIG_OS_FREEBSD)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WITH_SECURE_JIT)
|
if (WITH_SECURE_JIT)
|
||||||
add_definitions(/DXMRIG_SECURE_JIT)
|
add_definitions(-DXMRIG_SECURE_JIT)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -76,7 +76,15 @@ if (WITH_RANDOMX)
|
|||||||
list(APPEND SOURCES_CRYPTO src/crypto/randomx/blake2/blake2b_sse41.c)
|
list(APPEND SOURCES_CRYPTO src/crypto/randomx/blake2/blake2b_sse41.c)
|
||||||
|
|
||||||
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
|
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||||
set_source_files_properties(src/crypto/randomx/blake2/blake2b_sse41.c PROPERTIES COMPILE_FLAGS -msse4.1)
|
set_source_files_properties(src/crypto/randomx/blake2/blake2b_sse41.c PROPERTIES COMPILE_FLAGS "-Ofast -msse4.1")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (WITH_AVX2)
|
||||||
|
list(APPEND SOURCES_CRYPTO src/crypto/randomx/blake2/avx2/blake2b_avx2.c)
|
||||||
|
|
||||||
|
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||||
|
set_source_files_properties(src/crypto/randomx/blake2/avx2/blake2b_avx2.c PROPERTIES COMPILE_FLAGS "-Ofast -mavx2")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ Option `coin` useful for pools without [algorithm negotiation](https://xmrig.com
|
|||||||
| Name | Memory | Version | Description | Notes |
|
| Name | Memory | Version | Description | Notes |
|
||||||
|------|--------|---------|-------------|-------|
|
|------|--------|---------|-------------|-------|
|
||||||
| `kawpow` | - | 6.0.0+ | KawPow (Ravencoin) | GPU only |
|
| `kawpow` | - | 6.0.0+ | KawPow (Ravencoin) | GPU only |
|
||||||
| `rx/keva` | 1 MB | 5.9.0+ | RandomKEVA (RandomX variant for Keva). | |
|
|
||||||
| `astrobwt` | 20 MB | 5.8.0+ | AstroBWT (Dero). | |
|
| `astrobwt` | 20 MB | 5.8.0+ | AstroBWT (Dero). | |
|
||||||
| `cn-pico/tlo` | 256 KB | 5.5.0+ | CryptoNight-Pico (Talleo). | |
|
| `cn-pico/tlo` | 256 KB | 5.5.0+ | CryptoNight-Pico (Talleo). | |
|
||||||
| `rx/sfx` | 2 MB | 5.4.0+ | RandomSFX (RandomX variant for Safex). | |
|
| `rx/sfx` | 2 MB | 5.4.0+ | RandomSFX (RandomX variant for Safex). | |
|
||||||
|
|||||||
@@ -256,7 +256,7 @@
|
|||||||
|
|
||||||
# v2.8.0
|
# v2.8.0
|
||||||
- **[#753](https://github.com/xmrig/xmrig/issues/753) Added new algorithm [CryptoNight variant 2](https://github.com/xmrig/xmrig/issues/753) for Monero fork, thanks [@SChernykh](https://github.com/SChernykh).**
|
- **[#753](https://github.com/xmrig/xmrig/issues/753) Added new algorithm [CryptoNight variant 2](https://github.com/xmrig/xmrig/issues/753) for Monero fork, thanks [@SChernykh](https://github.com/SChernykh).**
|
||||||
- Added global and per thread option `"asm"` and and command line equivalent.
|
- Added global and per thread option `"asm"` and command line equivalent.
|
||||||
- **[#758](https://github.com/xmrig/xmrig/issues/758) Added SSL/TLS support for secure connections to pools.**
|
- **[#758](https://github.com/xmrig/xmrig/issues/758) Added SSL/TLS support for secure connections to pools.**
|
||||||
- Added per pool options `"tls"` and `"tls-fingerprint"` and command line equivalents.
|
- Added per pool options `"tls"` and `"tls-fingerprint"` and command line equivalents.
|
||||||
- [#767](https://github.com/xmrig/xmrig/issues/767) Added config autosave feature, same with GPU miners.
|
- [#767](https://github.com/xmrig/xmrig/issues/767) Added config autosave feature, same with GPU miners.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@echo off
|
@echo off
|
||||||
cd %~dp0
|
cd /d "%~dp0"
|
||||||
xmrig.exe --bench=10M --submit
|
xmrig.exe --bench=10M --submit
|
||||||
pause
|
pause
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@echo off
|
@echo off
|
||||||
cd %~dp0
|
cd /d "%~dp0"
|
||||||
xmrig.exe --bench=1M --submit
|
xmrig.exe --bench=1M --submit
|
||||||
pause
|
pause
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
HWLOC_VERSION="2.4.1"
|
HWLOC_VERSION_MAJOR="2"
|
||||||
|
HWLOC_VERSION_MINOR="11"
|
||||||
|
HWLOC_VERSION_PATCH="2"
|
||||||
|
|
||||||
|
HWLOC_VERSION="${HWLOC_VERSION_MAJOR}.${HWLOC_VERSION_MINOR}.${HWLOC_VERSION_PATCH}"
|
||||||
|
|
||||||
mkdir -p deps
|
mkdir -p deps
|
||||||
mkdir -p deps/include
|
mkdir -p deps/include
|
||||||
@@ -8,7 +12,7 @@ mkdir -p deps/lib
|
|||||||
|
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
|
|
||||||
wget https://download.open-mpi.org/release/hwloc/v2.4/hwloc-${HWLOC_VERSION}.tar.gz -O hwloc-${HWLOC_VERSION}.tar.gz
|
wget https://download.open-mpi.org/release/hwloc/v${HWLOC_VERSION_MAJOR}.${HWLOC_VERSION_MINOR}/hwloc-${HWLOC_VERSION}.tar.gz -O hwloc-${HWLOC_VERSION}.tar.gz
|
||||||
tar -xzf hwloc-${HWLOC_VERSION}.tar.gz
|
tar -xzf hwloc-${HWLOC_VERSION}.tar.gz
|
||||||
|
|
||||||
cd hwloc-${HWLOC_VERSION}
|
cd hwloc-${HWLOC_VERSION}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
HWLOC_VERSION="1.11.13"
|
HWLOC_VERSION="1.11.13"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
LIBRESSL_VERSION="3.0.2"
|
LIBRESSL_VERSION="3.5.2"
|
||||||
|
|
||||||
mkdir -p deps
|
mkdir -p deps
|
||||||
mkdir -p deps/include
|
mkdir -p deps/include
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
OPENSSL_VERSION="1.1.1k"
|
OPENSSL_VERSION="1.1.1u"
|
||||||
|
|
||||||
mkdir -p deps
|
mkdir -p deps
|
||||||
mkdir -p deps/include
|
mkdir -p deps/include
|
||||||
@@ -8,7 +8,7 @@ mkdir -p deps/lib
|
|||||||
|
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
|
|
||||||
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -O openssl-${OPENSSL_VERSION}.tar.gz
|
wget https://openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz -O openssl-${OPENSSL_VERSION}.tar.gz
|
||||||
tar -xzf openssl-${OPENSSL_VERSION}.tar.gz
|
tar -xzf openssl-${OPENSSL_VERSION}.tar.gz
|
||||||
|
|
||||||
cd openssl-${OPENSSL_VERSION}
|
cd openssl-${OPENSSL_VERSION}
|
||||||
|
|||||||
20
scripts/build.openssl3.sh
Executable file
20
scripts/build.openssl3.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
OPENSSL_VERSION="3.0.15"
|
||||||
|
|
||||||
|
mkdir -p deps
|
||||||
|
mkdir -p deps/include
|
||||||
|
mkdir -p deps/lib
|
||||||
|
|
||||||
|
mkdir -p build && cd build
|
||||||
|
|
||||||
|
wget https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz -O openssl-${OPENSSL_VERSION}.tar.gz
|
||||||
|
tar -xzf openssl-${OPENSSL_VERSION}.tar.gz
|
||||||
|
|
||||||
|
cd openssl-${OPENSSL_VERSION}
|
||||||
|
./config -no-shared -no-asm -no-zlib -no-comp -no-dgram -no-filenames -no-cms
|
||||||
|
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||||
|
cp -fr include ../../deps
|
||||||
|
cp libcrypto.a ../../deps/lib
|
||||||
|
cp libssl.a ../../deps/lib
|
||||||
|
cd ..
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
UV_VERSION="1.41.0"
|
UV_VERSION="1.49.2"
|
||||||
|
|
||||||
mkdir -p deps
|
mkdir -p deps
|
||||||
mkdir -p deps/include
|
mkdir -p deps/include
|
||||||
@@ -8,10 +8,10 @@ mkdir -p deps/lib
|
|||||||
|
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
|
|
||||||
wget https://github.com/libuv/libuv/archive/v${UV_VERSION}.tar.gz -O v${UV_VERSION}.tar.gz
|
wget https://dist.libuv.org/dist/v${UV_VERSION}/libuv-v${UV_VERSION}.tar.gz -O v${UV_VERSION}.tar.gz
|
||||||
tar -xzf v${UV_VERSION}.tar.gz
|
tar -xzf v${UV_VERSION}.tar.gz
|
||||||
|
|
||||||
cd libuv-${UV_VERSION}
|
cd libuv-v${UV_VERSION}
|
||||||
sh autogen.sh
|
sh autogen.sh
|
||||||
./configure --disable-shared
|
./configure --disable-shared
|
||||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
./build.uv.sh
|
./build.uv.sh
|
||||||
./build.hwloc.sh
|
./build.hwloc.sh
|
||||||
./build.openssl.sh
|
./build.openssl3.sh
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# https://xmrig.com/docs/miner/hugepages#onegb-huge-pages
|
# https://xmrig.com/docs/miner/hugepages#onegb-huge-pages
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ function rx()
|
|||||||
'randomx_constants_monero.h',
|
'randomx_constants_monero.h',
|
||||||
'randomx_constants_wow.h',
|
'randomx_constants_wow.h',
|
||||||
'randomx_constants_arqma.h',
|
'randomx_constants_arqma.h',
|
||||||
'randomx_constants_keva.h',
|
'randomx_constants_graft.h',
|
||||||
'aes.cl',
|
'aes.cl',
|
||||||
'blake2b.cl',
|
'blake2b.cl',
|
||||||
'randomx_vm.cl',
|
'randomx_vm.cl',
|
||||||
@@ -66,15 +66,6 @@ function rx()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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'));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function kawpow()
|
function kawpow()
|
||||||
{
|
{
|
||||||
const kawpow = opencl_minify(addIncludes('kawpow.cl', [ 'defs.h' ]));
|
const kawpow = opencl_minify(addIncludes('kawpow.cl', [ 'defs.h' ]));
|
||||||
@@ -96,11 +87,6 @@ process.chdir(path.resolve('src/backend/opencl/cl/rx'));
|
|||||||
|
|
||||||
rx();
|
rx();
|
||||||
|
|
||||||
process.chdir(cwd);
|
|
||||||
process.chdir(path.resolve('src/backend/opencl/cl/astrobwt'));
|
|
||||||
|
|
||||||
astrobwt();
|
|
||||||
|
|
||||||
process.chdir(cwd);
|
process.chdir(cwd);
|
||||||
process.chdir(path.resolve('src/backend/opencl/cl/kawpow'));
|
process.chdir(path.resolve('src/backend/opencl/cl/kawpow'));
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,6 @@
|
|||||||
:: Choose pools outside of top 5 to help Monero network be more decentralized!
|
:: Choose pools outside of top 5 to help Monero network be more decentralized!
|
||||||
:: Smaller pools also often have smaller fees/payout limits.
|
:: Smaller pools also often have smaller fees/payout limits.
|
||||||
|
|
||||||
cd %~dp0
|
cd /d "%~dp0"
|
||||||
xmrig.exe -o pool.hashvault.pro:3333 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD -p x
|
xmrig.exe -o xmrpool.eu:3333 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD -p x
|
||||||
pause
|
pause
|
||||||
|
|||||||
@@ -8,16 +8,34 @@ else
|
|||||||
modprobe msr allow_writes=on
|
modprobe msr allow_writes=on
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -E 'AMD Ryzen|AMD EPYC' /proc/cpuinfo > /dev/null;
|
if grep -E 'AMD Ryzen|AMD EPYC|AuthenticAMD' /proc/cpuinfo > /dev/null;
|
||||||
then
|
then
|
||||||
if grep "cpu family[[:space:]]:[[:space:]]25" /proc/cpuinfo > /dev/null;
|
if grep "cpu family[[:space:]]\{1,\}:[[:space:]]25" /proc/cpuinfo > /dev/null;
|
||||||
then
|
then
|
||||||
|
if grep "model[[:space:]]\{1,\}:[[:space:]]97" /proc/cpuinfo > /dev/null;
|
||||||
|
then
|
||||||
|
echo "Detected Zen4 CPU"
|
||||||
|
wrmsr -a 0xc0011020 0x4400000000000
|
||||||
|
wrmsr -a 0xc0011021 0x4000000000040
|
||||||
|
wrmsr -a 0xc0011022 0x8680000401570000
|
||||||
|
wrmsr -a 0xc001102b 0x2040cc10
|
||||||
|
echo "MSR register values for Zen4 applied"
|
||||||
|
else
|
||||||
echo "Detected Zen3 CPU"
|
echo "Detected Zen3 CPU"
|
||||||
wrmsr -a 0xc0011020 0x4480000000000
|
wrmsr -a 0xc0011020 0x4480000000000
|
||||||
wrmsr -a 0xc0011021 0x1c000200000040
|
wrmsr -a 0xc0011021 0x1c000200000040
|
||||||
wrmsr -a 0xc0011022 0xc000000401500000
|
wrmsr -a 0xc0011022 0xc000000401570000
|
||||||
wrmsr -a 0xc001102b 0x2000cc14
|
wrmsr -a 0xc001102b 0x2000cc10
|
||||||
echo "MSR register values for Zen3 applied"
|
echo "MSR register values for Zen3 applied"
|
||||||
|
fi
|
||||||
|
elif grep "cpu family[[:space:]]\{1,\}:[[:space:]]26" /proc/cpuinfo > /dev/null;
|
||||||
|
then
|
||||||
|
echo "Detected Zen5 CPU"
|
||||||
|
wrmsr -a 0xc0011020 0x4400000000000
|
||||||
|
wrmsr -a 0xc0011021 0x4000000000040
|
||||||
|
wrmsr -a 0xc0011022 0x8680000401570000
|
||||||
|
wrmsr -a 0xc001102b 0x2040cc10
|
||||||
|
echo "MSR register values for Zen5 applied"
|
||||||
else
|
else
|
||||||
echo "Detected Zen1/Zen2 CPU"
|
echo "Detected Zen1/Zen2 CPU"
|
||||||
wrmsr -a 0xc0011020 0
|
wrmsr -a 0xc0011020 0
|
||||||
|
|||||||
23
scripts/rtm_ghostrider_example.cmd
Normal file
23
scripts/rtm_ghostrider_example.cmd
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
:: Example batch file for mining Raptoreum at a pool
|
||||||
|
::
|
||||||
|
:: Format:
|
||||||
|
:: xmrig.exe -a gr -o <pool address>:<pool port> -u <pool username/wallet> -p <pool password>
|
||||||
|
::
|
||||||
|
:: Fields:
|
||||||
|
:: pool address The host name of the pool stratum or its IP address, for example raptoreumemporium.com
|
||||||
|
:: pool port The port of the pool's stratum to connect to, for example 3333. Check your pool's getting started page.
|
||||||
|
:: pool username/wallet For most pools, this is the wallet address you want to mine to. Some pools require a username
|
||||||
|
:: pool password For most pools this can be just 'x'. For pools using usernames, you may need to provide a password as configured on the pool.
|
||||||
|
::
|
||||||
|
:: List of Raptoreum mining pools:
|
||||||
|
:: https://miningpoolstats.stream/raptoreum
|
||||||
|
::
|
||||||
|
:: Choose pools outside of top 5 to help Raptoreum network be more decentralized!
|
||||||
|
:: Smaller pools also often have smaller fees/payout limits.
|
||||||
|
|
||||||
|
cd /d "%~dp0"
|
||||||
|
:: Use this command line to connect to non-SSL port
|
||||||
|
xmrig.exe -a gr -o raptoreumemporium.com:3008 -u WALLET_ADDRESS -p x
|
||||||
|
:: Or use this command line to connect to an SSL port
|
||||||
|
:: xmrig.exe -a gr -o rtm.suprnova.cc:4273 --tls -u WALLET_ADDRESS -p x
|
||||||
|
pause
|
||||||
@@ -11,6 +11,6 @@
|
|||||||
:: Mining solo is the best way to help Monero network be more decentralized!
|
:: Mining solo is the best way to help Monero network be more decentralized!
|
||||||
:: But you will only get a payout when you find a block which can take more than a year for a single low-end PC.
|
:: But you will only get a payout when you find a block which can take more than a year for a single low-end PC.
|
||||||
|
|
||||||
cd %~dp0
|
cd /d "%~dp0"
|
||||||
xmrig.exe -o node.xmr.to:18081 -a rx/0 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD --daemon
|
xmrig.exe -o YOUR_NODE_IP:18081 -a rx/0 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD --daemon
|
||||||
pause
|
pause
|
||||||
|
|||||||
2
src/3rdparty/argon2/CMakeLists.txt
vendored
2
src/3rdparty/argon2/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.12)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
project(argon2 C)
|
project(argon2 C)
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|||||||
2
src/3rdparty/cl.h
vendored
2
src/3rdparty/cl.h
vendored
@@ -29,7 +29,7 @@
|
|||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
# include <OpenCL/cl.h>
|
# include <OpenCL/cl.h>
|
||||||
#else
|
#else
|
||||||
# include "3rdparty/CL/cl.h"
|
# include <CL/cl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
25
src/3rdparty/epee/LICENSE.txt
vendored
Normal file
25
src/3rdparty/epee/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* 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.
|
||||||
|
* Neither the name of the Andrey N. Sabelnikov nor the
|
||||||
|
names of its contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL Andrey N. Sabelnikov 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.
|
||||||
1
src/3rdparty/epee/README.md
vendored
Normal file
1
src/3rdparty/epee/README.md
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
epee - is a small library of helpers, wrappers, tools and so on, used to make my life easier.
|
||||||
176
src/3rdparty/epee/span.h
vendored
Normal file
176
src/3rdparty/epee/span.h
vendored
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
// Copyright (c) 2017-2020, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
|
namespace epee
|
||||||
|
{
|
||||||
|
/*!
|
||||||
|
\brief Non-owning sequence of data. Does not deep copy
|
||||||
|
|
||||||
|
Inspired by `gsl::span` and/or `boost::iterator_range`. This class is
|
||||||
|
intended to be used as a parameter type for functions that need to take a
|
||||||
|
writable or read-only sequence of data. Most common cases are `span<char>`
|
||||||
|
and `span<std::uint8_t>`. Using as a class member is only recommended if
|
||||||
|
clearly documented as not doing a deep-copy. C-arrays are easily convertible
|
||||||
|
to this type.
|
||||||
|
|
||||||
|
\note Conversion from C string literal to `span<const char>` will include
|
||||||
|
the NULL-terminator.
|
||||||
|
\note Never allows derived-to-base pointer conversion; an array of derived
|
||||||
|
types is not an array of base types.
|
||||||
|
*/
|
||||||
|
template<typename T>
|
||||||
|
class span
|
||||||
|
{
|
||||||
|
template<typename U>
|
||||||
|
static constexpr bool safe_conversion() noexcept
|
||||||
|
{
|
||||||
|
// Allow exact matches or `T*` -> `const T*`.
|
||||||
|
using with_const = typename std::add_const<U>::type;
|
||||||
|
return std::is_same<T, U>() ||
|
||||||
|
(std::is_const<T>() && std::is_same<T, with_const>());
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
using value_type = T;
|
||||||
|
using size_type = std::size_t;
|
||||||
|
using difference_type = std::ptrdiff_t;
|
||||||
|
using pointer = T*;
|
||||||
|
using const_pointer = const T*;
|
||||||
|
using reference = T&;
|
||||||
|
using const_reference = const T&;
|
||||||
|
using iterator = pointer;
|
||||||
|
using const_iterator = const_pointer;
|
||||||
|
|
||||||
|
constexpr span() noexcept : ptr(nullptr), len(0) {}
|
||||||
|
constexpr span(std::nullptr_t) noexcept : span() {}
|
||||||
|
|
||||||
|
//! Prevent derived-to-base conversions; invalid in this context.
|
||||||
|
template<typename U, typename = typename std::enable_if<safe_conversion<U>()>::type>
|
||||||
|
constexpr span(U* const src_ptr, const std::size_t count) noexcept
|
||||||
|
: ptr(src_ptr), len(count) {}
|
||||||
|
|
||||||
|
//! Conversion from C-array. Prevents common bugs with sizeof + arrays.
|
||||||
|
template<std::size_t N>
|
||||||
|
constexpr span(T (&src)[N]) noexcept : span(src, N) {}
|
||||||
|
|
||||||
|
constexpr span(const span&) noexcept = default;
|
||||||
|
span& operator=(const span&) noexcept = default;
|
||||||
|
|
||||||
|
/*! Try to remove `amount` elements from beginning of span.
|
||||||
|
\return Number of elements removed. */
|
||||||
|
std::size_t remove_prefix(std::size_t amount) noexcept
|
||||||
|
{
|
||||||
|
amount = std::min(len, amount);
|
||||||
|
ptr += amount;
|
||||||
|
len -= amount;
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr iterator begin() const noexcept { return ptr; }
|
||||||
|
constexpr const_iterator cbegin() const noexcept { return ptr; }
|
||||||
|
|
||||||
|
constexpr iterator end() const noexcept { return begin() + size(); }
|
||||||
|
constexpr const_iterator cend() const noexcept { return cbegin() + size(); }
|
||||||
|
|
||||||
|
constexpr bool empty() const noexcept { return size() == 0; }
|
||||||
|
constexpr pointer data() const noexcept { return ptr; }
|
||||||
|
constexpr std::size_t size() const noexcept { return len; }
|
||||||
|
constexpr std::size_t size_bytes() const noexcept { return size() * sizeof(value_type); }
|
||||||
|
|
||||||
|
T &operator[](size_t idx) noexcept { return ptr[idx]; }
|
||||||
|
const T &operator[](size_t idx) const noexcept { return ptr[idx]; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
T* ptr;
|
||||||
|
std::size_t len;
|
||||||
|
};
|
||||||
|
|
||||||
|
//! \return `span<const T::value_type>` from a STL compatible `src`.
|
||||||
|
template<typename T>
|
||||||
|
constexpr span<const typename T::value_type> to_span(const T& src)
|
||||||
|
{
|
||||||
|
// compiler provides diagnostic if size() is not size_t.
|
||||||
|
return {src.data(), src.size()};
|
||||||
|
}
|
||||||
|
|
||||||
|
//! \return `span<T::value_type>` from a STL compatible `src`.
|
||||||
|
template<typename T>
|
||||||
|
constexpr span<typename T::value_type> to_mut_span(T& src)
|
||||||
|
{
|
||||||
|
// compiler provides diagnostic if size() is not size_t.
|
||||||
|
return {src.data(), src.size()};
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
constexpr bool has_padding() noexcept
|
||||||
|
{
|
||||||
|
return !std::is_standard_layout<T>() || alignof(T) != 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! \return Cast data from `src` as `span<const std::uint8_t>`.
|
||||||
|
template<typename T>
|
||||||
|
span<const std::uint8_t> to_byte_span(const span<const T> src) noexcept
|
||||||
|
{
|
||||||
|
static_assert(!has_padding<T>(), "source type may have padding");
|
||||||
|
return {reinterpret_cast<const std::uint8_t*>(src.data()), src.size_bytes()};
|
||||||
|
}
|
||||||
|
|
||||||
|
//! \return `span<const std::uint8_t>` which represents the bytes at `&src`.
|
||||||
|
template<typename T>
|
||||||
|
span<const std::uint8_t> as_byte_span(const T& src) noexcept
|
||||||
|
{
|
||||||
|
static_assert(!std::is_empty<T>(), "empty types will not work -> sizeof == 1");
|
||||||
|
static_assert(!has_padding<T>(), "source type may have padding");
|
||||||
|
return {reinterpret_cast<const std::uint8_t*>(std::addressof(src)), sizeof(T)};
|
||||||
|
}
|
||||||
|
|
||||||
|
//! \return `span<std::uint8_t>` which represents the bytes at `&src`.
|
||||||
|
template<typename T>
|
||||||
|
span<std::uint8_t> as_mut_byte_span(T& src) noexcept
|
||||||
|
{
|
||||||
|
static_assert(!std::is_empty<T>(), "empty types will not work -> sizeof == 1");
|
||||||
|
static_assert(!has_padding<T>(), "source type may have padding");
|
||||||
|
return {reinterpret_cast<std::uint8_t*>(std::addressof(src)), sizeof(T)};
|
||||||
|
}
|
||||||
|
|
||||||
|
//! make a span from a std::string
|
||||||
|
template<typename T>
|
||||||
|
span<const T> strspan(const std::string &s) noexcept
|
||||||
|
{
|
||||||
|
static_assert(std::is_same<T, char>() || std::is_same<T, unsigned char>() || std::is_same<T, int8_t>() || std::is_same<T, uint8_t>(), "Unexpected type");
|
||||||
|
return {reinterpret_cast<const T*>(s.data()), s.size()};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
//
|
//
|
||||||
// For the license information refer to format.h.
|
// For the license information refer to format.h.
|
||||||
|
|
||||||
#include "3rdparty/fmt/format-inl.h"
|
#include "fmt/format-inl.h"
|
||||||
|
|
||||||
FMT_BEGIN_NAMESPACE
|
FMT_BEGIN_NAMESPACE
|
||||||
namespace detail {
|
namespace detail {
|
||||||
4
src/3rdparty/getopt/getopt.h
vendored
4
src/3rdparty/getopt/getopt.h
vendored
@@ -109,11 +109,7 @@ char *optarg; /* argument associated with option */
|
|||||||
extern char __declspec(dllimport) *__progname;
|
extern char __declspec(dllimport) *__progname;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
|
||||||
static char EMSG[] = "";
|
static char EMSG[] = "";
|
||||||
#else
|
|
||||||
#define EMSG ""
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int getopt_internal(int, char * const *, const char *,
|
static int getopt_internal(int, char * const *, const char *,
|
||||||
const struct option *, int *, int);
|
const struct option *, int *, int);
|
||||||
|
|||||||
2
src/3rdparty/hwloc/CMakeLists.txt
vendored
2
src/3rdparty/hwloc/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8.12)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project (hwloc C)
|
project (hwloc C)
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|||||||
368
src/3rdparty/hwloc/NEWS
vendored
368
src/3rdparty/hwloc/NEWS
vendored
@@ -1,5 +1,5 @@
|
|||||||
Copyright © 2009 CNRS
|
Copyright © 2009 CNRS
|
||||||
Copyright © 2009-2020 Inria. All rights reserved.
|
Copyright © 2009-2024 Inria. All rights reserved.
|
||||||
Copyright © 2009-2013 Université Bordeaux
|
Copyright © 2009-2013 Université Bordeaux
|
||||||
Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||||
Copyright © 2020 Hewlett Packard Enterprise. All rights reserved.
|
Copyright © 2020 Hewlett Packard Enterprise. All rights reserved.
|
||||||
@@ -17,6 +17,372 @@ bug fixes (and other actions) for each version of hwloc since version
|
|||||||
0.9.
|
0.9.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.11.2
|
||||||
|
--------------
|
||||||
|
* Add missing CPU info attrs on aarch64 on Linux.
|
||||||
|
* Use ACPI CPPC on Linux to get better information about cpukinds,
|
||||||
|
at least on AMD CPUs.
|
||||||
|
* Fix crash when manipulating cpukinds after topology
|
||||||
|
duplication, thanks to Hadrien Grasland for the report.
|
||||||
|
* Fix missing input target checks in memattr functions,
|
||||||
|
thanks to Hadrien Grasland for the report.
|
||||||
|
* Fix a memory leak when ignoring NUMA distances on FreeBSD.
|
||||||
|
* Fix build failure on old Linux distributions without accessat().
|
||||||
|
* Fix non-Windows importing of XML topologies and CPUID dumps exported
|
||||||
|
on Windows.
|
||||||
|
* hwloc-calc --cpuset-output-format systemd-dbus-api now allows
|
||||||
|
to generate AllowedCPUs information for systemd slices.
|
||||||
|
See the hwloc-calc manpage for examples. Thanks to Pierre Neyron.
|
||||||
|
* Some fixes in manpage EXAMPLES and split them into subsections.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.11.1
|
||||||
|
--------------
|
||||||
|
* Fix bash completions, thanks Tavis Rudd.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.11.0
|
||||||
|
--------------
|
||||||
|
* API
|
||||||
|
+ Add HWLOC_MEMBIND_WEIGHTED_INTERLEAVE memory binding policy on
|
||||||
|
Linux 6.9+. Thanks to Honggyu Kim for the patch.
|
||||||
|
- weighted_interleave_membind is added to membind support bits.
|
||||||
|
- The "weighted" policy is added to the hwloc-bind tool.
|
||||||
|
+ Add hwloc_obj_set_subtype(). Thanks to Hadrien Grasland for the report.
|
||||||
|
* GPU support
|
||||||
|
+ Don't hide the GPU NUMA node on NVIDIA Grace Hopper.
|
||||||
|
+ Get Intel GPU OpenCL device locality.
|
||||||
|
+ Add bandwidths between subdevices in the LevelZero XeLinkBandwidth
|
||||||
|
matrix.
|
||||||
|
+ Fix PCI Gen4+ link speed of NVIDIA GPU obtained from NVML,
|
||||||
|
thanks to Akram Sbaih for the report.
|
||||||
|
* Windows support
|
||||||
|
+ Fix Windows support when UNICODE is enabled, several hwloc features
|
||||||
|
were missing, thanks to Martin for the report.
|
||||||
|
+ Fix the enabling of CUDA in Windows CMake build,
|
||||||
|
Thanks to Moritz Kreutzer for the patch.
|
||||||
|
+ Fix CUDA/OpenCL test source path in Windows CMake.
|
||||||
|
* Tools
|
||||||
|
+ Option --best-memattr may now return multiple nodes. Additional
|
||||||
|
configuration flags may be given to tweak its behavior.
|
||||||
|
+ hwloc-info has a new --get-attr option to get a single attribute.
|
||||||
|
+ hwloc-info now supports "levels", "support" and "topology"
|
||||||
|
special keywords for backward compatibility for hwloc 3.0.
|
||||||
|
+ The --taskset command-line option is superseded by the new
|
||||||
|
--cpuset-output-format which also allows to export as list.
|
||||||
|
+ hwloc-calc may now import bitmasks described as a list of bits
|
||||||
|
with the new "--cpuset-input-format list".
|
||||||
|
* Misc
|
||||||
|
+ The MemoryTiersNr info attribute in the root object now says how many
|
||||||
|
memory tiers were built. Thanks to Antoine Morvan for the report.
|
||||||
|
+ Fix the management of infinite cpusets in the bitmap printf/sscanf
|
||||||
|
API as well as in command-line tools.
|
||||||
|
+ Add section "Compiling software on top of hwloc's C API" in the
|
||||||
|
documentation with examples for GNU Make and CMake,
|
||||||
|
thanks to Florent Pruvost for the help.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.10.0
|
||||||
|
--------------
|
||||||
|
* Heterogeneous Memory core improvements
|
||||||
|
+ Better heuristics to identify the subtype of memory such as HBM,
|
||||||
|
DRAM, NVM, CXL-DRAM, etc.
|
||||||
|
+ Build memory tiers, i.e. sets of NUMA nodes with the same subtype
|
||||||
|
and similar performance.
|
||||||
|
- NUMA node tier ranks are exposed in the new MemoryTier info
|
||||||
|
attribute (starts from 0 for highest bandwidth tier)..
|
||||||
|
+ See the new Heterogeneous Memory section in the documentation.
|
||||||
|
* API
|
||||||
|
+ Add hwloc_topology_free_group_object() to discard a Group created
|
||||||
|
by hwloc_topology_alloc_group_object().
|
||||||
|
* Linux backend
|
||||||
|
+ Fix cpukinds on NVIDIA Grace to report identical cores even if they
|
||||||
|
actually have very small frequency differences.
|
||||||
|
Thanks to John C. Linford for the report.
|
||||||
|
+ Add CXLDevice attributes to CXL DAX objects and NUMA nodes to show
|
||||||
|
which PCI device implements which window.
|
||||||
|
+ Ignore buggy memory-side caches and memory attributes when fake NUMA
|
||||||
|
emulation is enabled on the Linux kernel command-line.
|
||||||
|
+ Add more info attributes in MemoryModule Misc objects,
|
||||||
|
thanks to Zubiao Xiong for the patch.
|
||||||
|
+ Get CPUModel and CPUFamily info attributes on LoongArch platforms.
|
||||||
|
* x86 backend
|
||||||
|
+ Add support for new AMD CPUID leaf 0x80000026 for better detection
|
||||||
|
of Core Complex and Die on Zen4 processors.
|
||||||
|
+ Improve Zhaoxin CPU topology detection.
|
||||||
|
* Tools
|
||||||
|
+ Input locations and many command-line options (e.g. hwloc-calc -I -N -H,
|
||||||
|
lstopo --only) now accept filters such as "NUMA[HBM]" so that only
|
||||||
|
objects are that type and subtype are considered.
|
||||||
|
- NUMA[tier=1] is also accepted for selecting NUMA nodes depending
|
||||||
|
on their MemoryTier info attribute.
|
||||||
|
+ Add --object-output to hwloc-calc to report the type as a prefix to
|
||||||
|
object indexes, e.g. Core:2 instead of 2 in the output of -I.
|
||||||
|
+ hwloc-info --ancestor and --descendants now accepts kinds of objects
|
||||||
|
instead of single types.
|
||||||
|
- The new --first option only shows the first matching object.
|
||||||
|
+ Add --children-of-pid to hwloc-ps to show a hierarchy of processes.
|
||||||
|
Thanks to Antoine Morvan for the suggestion.
|
||||||
|
+ Add --misc-from to lstopo to add Misc objects described in a file.
|
||||||
|
- To be combined with the new hwloc-ps --lstopo-misc for a customizable
|
||||||
|
lstopo --top replacement.
|
||||||
|
* Misc
|
||||||
|
+ lstopo may now configure the layout of memory object placed above,
|
||||||
|
for instance with --children-order memory:above:vert.
|
||||||
|
+ Fix XML import from memory or stdin when using libxml2 2.12.
|
||||||
|
+ Fix installation failures when configuring with --target,
|
||||||
|
thanks to Clement Foyer for the patch.
|
||||||
|
+ Fix support for 128bit pointer architectures.
|
||||||
|
+ Remove Netloc.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.9.3
|
||||||
|
-------------
|
||||||
|
* Handle Linux glibc allocation errors in binding routines (CVE-2022-47022).
|
||||||
|
* Fix hwloc-calc when searching objects on heterogeneous memory platforms,
|
||||||
|
thanks to Antoine Morvan for the report.
|
||||||
|
* Fix hwloc_get_next_child() when there are some memory-side caches.
|
||||||
|
* Don't crash if the topology is empty because Linux cgroups are wrong.
|
||||||
|
* Improve some hwloc-bind warnings in case of command-line parsing errors.
|
||||||
|
* Many documentation improvements all over the place, including:
|
||||||
|
+ hwloc_topology_restrict() and hwloc_topology_insert_group() may reorder
|
||||||
|
children, causing the logical indexes of objects to change.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.9.2
|
||||||
|
-------------
|
||||||
|
* Don't forget L3i when defining filters for multiple levels of caches
|
||||||
|
with hwloc_topology_set_cache/icache_types_filter().
|
||||||
|
* Fix object total_memory after hwloc_topology_insert_group_object().
|
||||||
|
* Fix the (non-yet) exporting in synthetic description for complex memory
|
||||||
|
hierarchies with memory-side caches, etc.
|
||||||
|
* Fix some default size attributes when building synthetic topologies.
|
||||||
|
* Fix size units in hwloc-annotate.
|
||||||
|
* Improve bitmap reallocation error management in many functions.
|
||||||
|
* Documentation improvements:
|
||||||
|
+ Better document return values of functions.
|
||||||
|
+ Add "Error reporting" section (in hwloc.h and in the doxygen doc).
|
||||||
|
+ Add FAQ entry "What may I disable to make hwloc faster?"
|
||||||
|
+ Improve FAQ entries "Why is lstopo slow?" and
|
||||||
|
"I only need ..., why should I use hwloc?"
|
||||||
|
+ Clarify how to deal with cpukinds in hwloc-calc and hwloc-bind
|
||||||
|
manpages.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.9.1
|
||||||
|
-------------
|
||||||
|
* Don't forget to apply object type filters to "perflevel" caches detected
|
||||||
|
on recent Mac OS X releases, thanks to Michel Lesoinne for the report.
|
||||||
|
* Fix a failed assertion in hwloc_topology_restrict() when some NUMA nodes
|
||||||
|
are removed because of HWLOC_RESTRICT_FLAG_REMOVE_CPULESS but no PUs are.
|
||||||
|
Thanks to Mark Grondona for reporting the issue.
|
||||||
|
* Mark HPE Cray Slingshot NICs with subtype "Slingshot".
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.9.0
|
||||||
|
-------------
|
||||||
|
* Backends
|
||||||
|
+ Expose the memory size of CXL memory devices (Type 3) on Linux.
|
||||||
|
+ The LevelZero backend now reports the "XeLinkBandwidth" distance
|
||||||
|
matrix between L0 devices (and subdevices) when available.
|
||||||
|
+ Add support for CUDA compute capability up to 9.0.
|
||||||
|
* Tools
|
||||||
|
+ lstopo now switches to console mode when its output is redirected.
|
||||||
|
Graphical window mode may be forced back with --of window.
|
||||||
|
+ hwloc-calc now accepts "numa" in -H, and I/O subtypes such as "gpu"
|
||||||
|
in -I and -N.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.8.0
|
||||||
|
-------------
|
||||||
|
* API
|
||||||
|
+ Add HWLOC_TOPOLOGY_FLAG_NO_DISTANCES, _NO_MEMATTRS and _NO_CPUKINDS
|
||||||
|
to reduce the overhead when unneeded.
|
||||||
|
+ Add separate Read/Write Bandwidth/Latency memory attributes and
|
||||||
|
implement them on Linux.
|
||||||
|
* Backends
|
||||||
|
+ NUMA nodes may now have a subtype such as DRAM, HBM, SPM, or NVM
|
||||||
|
on heterogeneous memory platforms on Linux.
|
||||||
|
- Add DAXType and DAXParent attributes on Linux to tell where a
|
||||||
|
DAX device or its corresponding NUMA node come from (SPM for
|
||||||
|
Specific-Purpose or NVM for Non-Volatile Memory).
|
||||||
|
+ Detect heterogeneous caches in hybrid CPUs on MacOS X,
|
||||||
|
thanks to Paul Bone for the help.
|
||||||
|
+ Max frequencies are not ignored in Linux cpukinds anymore (they were
|
||||||
|
ignored in hwloc 2.7.0), but they may be slightly adjusted to avoid
|
||||||
|
reporting hybrid CPUs because Intel Turbo Boost Max 3.0.
|
||||||
|
- See the documentation of environment variable HWLOC_CPUKINDS_MAXFREQ.
|
||||||
|
+ Hardwire the PCI locality of HPE Cray EX235a nodes.
|
||||||
|
* Tools
|
||||||
|
+ lstopo and other tools may now load Linux and x86 cpuid topology files
|
||||||
|
from a tarball.
|
||||||
|
+ lstopo may now replace the P# and L# index prefixes with custom strings
|
||||||
|
thanks to --os-index-prefix and --logical-index-prefix options.
|
||||||
|
* Misc
|
||||||
|
+ Add --disable-readme to avoid regenerating the top-level hwloc README
|
||||||
|
file from the documentation.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.7.2
|
||||||
|
-------------
|
||||||
|
* Fix a crash when LevelZero devices have multiple subdevices,
|
||||||
|
e.g. on PonteVecchio GPUs, thanks to Jonathan Peyton.
|
||||||
|
* Fix a leak when importing cpukinds from XML,
|
||||||
|
thanks to Hui Zhou.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.7.1
|
||||||
|
-------------
|
||||||
|
* Workaround crashes when virtual machines report incoherent x86 CPUID
|
||||||
|
information about numbers of cores and threads.
|
||||||
|
Thanks to Peter Bense for the report.
|
||||||
|
* Use setenv() instead of putenv() when trying to force enable oneAPI L0
|
||||||
|
support, to avoid issues with applications that touch the environment,
|
||||||
|
thanks to Josh Hursey for the patch.
|
||||||
|
* Add some warnings at the end of configure when GPU libraries are
|
||||||
|
missing on the system or their path is missing in the environment.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.7.0
|
||||||
|
-------------
|
||||||
|
* Backends
|
||||||
|
+ Add support for NUMA nodes and caches with more than 64 PUs across
|
||||||
|
multiple processor groups on Windows 11 and Windows Server 2022.
|
||||||
|
+ Group objects are not created for Windows processor groups anymore,
|
||||||
|
except if HWLOC_WINDOWS_PROCESSOR_GROUP_OBJS=1 in the environment.
|
||||||
|
+ Expose "Cluster" group objects on Linux kernel 5.16+ for CPUs
|
||||||
|
that share some internal cache or bus. This can be equivalent
|
||||||
|
to the L2 Cache level on some platforms (e.g. x86) or a specific
|
||||||
|
level between L2 and L3 on others (e.g. ARM Kungpeng 920).
|
||||||
|
Thanks to Jonathan Cameron for the help.
|
||||||
|
- HWLOC_DONT_MERGE_CLUSTER_GROUPS=1 may be set in the environment
|
||||||
|
to prevent these groups from being merged with identical caches, etc.
|
||||||
|
+ Improve the oneAPI LevelZero backend:
|
||||||
|
- Expose subdevices such as "ze0.1" inside root OS devices ("ze0")
|
||||||
|
when the hardware contains multiple subdevices.
|
||||||
|
- Add many new attributes to describe device type, and the
|
||||||
|
numbers of slices, subslices, execution units and threads.
|
||||||
|
- Expose the memory information as LevelZeroHBM/DDR/MemorySize infos.
|
||||||
|
+ Ignore the max frequencies of cores in Linux cpukinds when the
|
||||||
|
base frequencies are available (to avoid exposing hybrid CPUs
|
||||||
|
when Intel Turbo Boost Max 3.0 gives slightly different max
|
||||||
|
frequencies to CPU cores).
|
||||||
|
- May be reverted by setting HWLOC_CPUKINDS_MAXFREQ=1 in the environment.
|
||||||
|
* Tools
|
||||||
|
+ Add --grey and --palette options to switch lstopo to greyscale or
|
||||||
|
white-background-only graphics, or to tune individual colors.
|
||||||
|
* Build
|
||||||
|
+ Windows CMake builds now support non-MSVC compilers, detect several
|
||||||
|
features at build time, can build/run tests, etc.
|
||||||
|
Thanks to Michael Hirsch and Alexander Neumann .
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.6.0
|
||||||
|
-------------
|
||||||
|
* Backends
|
||||||
|
+ Expose two cpukinds for energy-efficient cores (icestorm) and
|
||||||
|
high-performance cores (firestorm) on Apple M1 on Mac OS X.
|
||||||
|
+ Use sysfs CPU "capacity" to rank hybrid cores by efficiency
|
||||||
|
on Linux when available (mostly on recent ARM platforms for now).
|
||||||
|
+ Improve HWLOC_MEMBIND_BIND (without the STRICT flag) on Linux kernel
|
||||||
|
>= 5.15: If more than one node is given, the kernel may now use all
|
||||||
|
of them instead of only the first one before falling back to others.
|
||||||
|
+ Expose cache os_index when available on Linux, it may be needed
|
||||||
|
when using resctrl to configure cache partitioning, memory bandwidth
|
||||||
|
monitoring, etc.
|
||||||
|
+ Add a "XGMIHops" distances matrix in the RSMI backend for AMD GPU
|
||||||
|
interconnected through XGMI links.
|
||||||
|
+ Expose AMD GPU memory information (VRAM and GTT) in the RSMI backend.
|
||||||
|
+ Add OS devices such as "bxi0" for Atos/Bull BXI HCAs on Linux.
|
||||||
|
* Tools
|
||||||
|
+ lstopo has a better placement algorithm with respect to I/O
|
||||||
|
objects, see --children-order in the manpage for details.
|
||||||
|
+ hwloc-annotate may now change object subtypes and cache or memory
|
||||||
|
sizes.
|
||||||
|
* Build
|
||||||
|
+ Allow to specify the ROCm installation for building the RSMI backend:
|
||||||
|
- Use a custom installation path if specified with --with-rocm=<dir>.
|
||||||
|
- Use /opt/rocm-<version> if specified with --with-rocm-version=<version>
|
||||||
|
or the ROCM_VERSION environment variable.
|
||||||
|
- Try /opt/rocm if it exists.
|
||||||
|
- See "How do I enable ROCm SMI and select which version to use?"
|
||||||
|
in the FAQ for details.
|
||||||
|
+ Add a CMakeLists for Windows under contrib/windows-cmake/ .
|
||||||
|
* Documentation
|
||||||
|
+ Add FAQ entry "How do I create a custom heterogeneous and
|
||||||
|
asymmetric topology?"
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.5.0
|
||||||
|
-------------
|
||||||
|
* API
|
||||||
|
+ Add hwloc/windows.h to query Windows processor groups.
|
||||||
|
+ Add hwloc_get_obj_with_same_locality() to convert between objects
|
||||||
|
with same locality, for instance NUMA nodes and Packages,
|
||||||
|
or OS devices within a PCI device.
|
||||||
|
+ Add hwloc_distances_transform() to modify distances structures.
|
||||||
|
- hwloc-annotate and lstopo have new distances-transform options.
|
||||||
|
+ hwloc_distances_add() is replaced with _add_create() followed by
|
||||||
|
_add_values() and _add_commit(). See hwloc/distances.h for details.
|
||||||
|
+ Add topology flags to mitigate binding modifications during
|
||||||
|
hwloc discovery, especially on Windows:
|
||||||
|
- HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING and _MEMBINDING
|
||||||
|
restrict discovery to PUs and NUMA nodes inside the binding.
|
||||||
|
- HWLOC_TOPOLOGY_FLAG_DONT_CHANGE_BINDING prevents from ever
|
||||||
|
changing the binding during discovery.
|
||||||
|
* Backends
|
||||||
|
+ Add a levelzero backend for oneAPI L0 devices, exposed as OS devices
|
||||||
|
of subtype "LevelZero" and name such as "ze0".
|
||||||
|
- Add hwloc/levelzero.h for interoperability between converting
|
||||||
|
between L0 API devices and hwloc cpusets or OS devices.
|
||||||
|
+ Expose NEC Vector Engine cards on Linux as OS devices of subtype
|
||||||
|
"VectorEngine" and name "ve0", etc.
|
||||||
|
Thanks to Anara Kozhokanova, Tim Cramer and Erich Focht for the help.
|
||||||
|
+ Add a NVLinkBandwidth distances structure between NVIDIA GPUs
|
||||||
|
(and POWER processor or NVSwitches) in the NVML backend,
|
||||||
|
and a XGMIBandwidth distances structure between AMD GPUs
|
||||||
|
in the RSMI backends.
|
||||||
|
- See "Topology Attributes: Distances, Memory Attributes and CPU Kinds"
|
||||||
|
in the documentation for details about these new distances.
|
||||||
|
+ Add support for NUMA node 0 being offline in Linux, thanks to Jirka Hladky.
|
||||||
|
* Build
|
||||||
|
+ Add --with-cuda-version=<version> or look at the CUDA_VERSION
|
||||||
|
environment variable to find the appropriate CUDA pkg-config files.
|
||||||
|
Thanks to Stephen Herbein for the suggestion.
|
||||||
|
- Also add --with-cuda=<dir> to specify the CUDA installation path
|
||||||
|
manually (and its NVML and OpenCL components).
|
||||||
|
Thanks to Andrea Bocci for the suggestion.
|
||||||
|
- See "How do I enable CUDA and select which CUDA version to use?"
|
||||||
|
in the FAQ for details.
|
||||||
|
* Tools
|
||||||
|
+ lstopo now has a --windows-processor-groups option on Windows.
|
||||||
|
+ hwloc-ps now has a --short-name option to avoid long/truncated
|
||||||
|
command path.
|
||||||
|
+ hwloc-ps now has a --single-ancestor option to return a single
|
||||||
|
(possibly too large) object where a process is bound.
|
||||||
|
+ hwloc-ps --pid-cmd may now query environment variables,
|
||||||
|
including MPI-specific variables to find out process ranks.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.4.1
|
||||||
|
-------------
|
||||||
|
* Fix AMD OpenCL device locality when PCI bus or device number >= 128.
|
||||||
|
Thanks to Edgar Leon for reporting the issue.
|
||||||
|
+ Applications using any of the following inline functions must
|
||||||
|
be recompiled to get the fix: hwloc_opencl_get_device_pci_busid()
|
||||||
|
hwloc_opencl_get_device_cpuset(), hwloc_opencl_get_device_osdev().
|
||||||
|
* Fix the ranking of cpukinds on non-Windows systems,
|
||||||
|
thanks to Ivan Kochin for the report.
|
||||||
|
* Fix the insertion of custom Groups after loading the topology,
|
||||||
|
thanks to Scott Hicks.
|
||||||
|
* Add support for CPU0 being offline in Linux, thanks to Garrett Clay.
|
||||||
|
* Fix missing x86 Package and Core objects FreeBSD/NetBSD.
|
||||||
|
Thanks to Thibault Payet and Yuri Victorovich for the report.
|
||||||
|
* Fix the import of very large distances with heterogeneous object types.
|
||||||
|
* Fix a memory leak in the Linux backend,
|
||||||
|
thanks to Perceval Anichini.
|
||||||
|
|
||||||
|
|
||||||
Version 2.4.0
|
Version 2.4.0
|
||||||
-------------
|
-------------
|
||||||
* API
|
* API
|
||||||
|
|||||||
492
src/3rdparty/hwloc/README
vendored
492
src/3rdparty/hwloc/README
vendored
@@ -1,4 +1,8 @@
|
|||||||
Introduction
|
This is a truncated and poorly-formatted version of the documentation main page.
|
||||||
|
See https://www.open-mpi.org/projects/hwloc/doc/ for more.
|
||||||
|
|
||||||
|
|
||||||
|
hwloc Overview
|
||||||
|
|
||||||
The Hardware Locality (hwloc) software project aims at easing the process of
|
The Hardware Locality (hwloc) software project aims at easing the process of
|
||||||
discovering hardware resources in parallel architectures. It offers
|
discovering hardware resources in parallel architectures. It offers
|
||||||
@@ -8,66 +12,450 @@ high-performance computing (HPC) applications, but is also applicable to any
|
|||||||
project seeking to exploit code and/or data locality on modern computing
|
project seeking to exploit code and/or data locality on modern computing
|
||||||
platforms.
|
platforms.
|
||||||
|
|
||||||
hwloc is actually made of two subprojects distributed together:
|
hwloc provides command line tools and a C API to obtain the hierarchical map of
|
||||||
|
key computing elements within a node, such as: NUMA memory nodes, shared
|
||||||
|
caches, processor packages, dies and cores, processing units (logical
|
||||||
|
processors or "threads") and even I/O devices. hwloc also gathers various
|
||||||
|
attributes such as cache and memory information, and is portable across a
|
||||||
|
variety of different operating systems and platforms.
|
||||||
|
|
||||||
* The original hwloc project for describing the internals of computing nodes.
|
hwloc primarily aims at helping high-performance computing (HPC) applications,
|
||||||
It is described in details starting at section Hardware Locality (hwloc)
|
but is also applicable to any project seeking to exploit code and/or data
|
||||||
Introduction.
|
locality on modern computing platforms.
|
||||||
* The network-oriented companion called netloc (Network Locality), described
|
|
||||||
in details starting with section Network Locality (netloc).
|
|
||||||
|
|
||||||
See also the Related pages tab above for links to other sections.
|
hwloc supports the following operating systems:
|
||||||
|
|
||||||
Netloc may be disabled, but the original hwloc cannot. Both hwloc and netloc
|
* Linux (with knowledge of cgroups and cpusets, memory targets/initiators,
|
||||||
APIs are documented after these sections.
|
etc.) on all supported hardware, including Intel Xeon Phi, ScaleMP vSMP,
|
||||||
|
and NumaScale NumaConnect.
|
||||||
|
* Solaris (with support for processor sets and logical domains)
|
||||||
|
* AIX
|
||||||
|
* Darwin / OS X
|
||||||
|
* FreeBSD and its variants (such as kFreeBSD/GNU)
|
||||||
|
* NetBSD
|
||||||
|
* HP-UX
|
||||||
|
* Microsoft Windows
|
||||||
|
* IBM BlueGene/Q Compute Node Kernel (CNK)
|
||||||
|
|
||||||
Installation
|
Since it uses standard Operating System information, hwloc's support is mostly
|
||||||
|
independant from the processor type (x86, powerpc, ...) and just relies on the
|
||||||
|
Operating System support. The main exception is BSD operating systems (NetBSD,
|
||||||
|
FreeBSD, etc.) because they do not provide support topology information, hence
|
||||||
|
hwloc uses an x86-only CPUID-based backend (which can be used for other OSes
|
||||||
|
too, see the Components and plugins section).
|
||||||
|
|
||||||
hwloc (https://www.open-mpi.org/projects/hwloc/) is available under the BSD
|
To check whether hwloc works on a particular machine, just try to build it and
|
||||||
license. It is hosted as a sub-project of the overall Open MPI project (https:/
|
run lstopo or lstopo-no-graphics. If some things do not look right (e.g. bogus
|
||||||
/www.open-mpi.org/). Note that hwloc does not require any functionality from
|
or missing cache information), see Questions and Bugs.
|
||||||
Open MPI -- it is a wholly separate (and much smaller!) project and code base.
|
|
||||||
It just happens to be hosted as part of the overall Open MPI project.
|
|
||||||
|
|
||||||
Basic Installation
|
hwloc only reports the number of processors on unsupported operating systems;
|
||||||
|
no topology information is available.
|
||||||
|
|
||||||
Installation is the fairly common GNU-based process:
|
For development and debugging purposes, hwloc also offers the ability to work
|
||||||
|
on "fake" topologies:
|
||||||
|
|
||||||
shell$ ./configure --prefix=...
|
* Symmetrical tree of resources generated from a list of level arities, see
|
||||||
shell$ make
|
Synthetic topologies.
|
||||||
shell$ make install
|
* Remote machine simulation through the gathering of topology as XML files,
|
||||||
|
see Importing and exporting topologies from/to XML files.
|
||||||
|
|
||||||
hwloc- and netloc-specific configure options and requirements are documented in
|
hwloc can display the topology in a human-readable format, either in graphical
|
||||||
sections hwloc Installation and Netloc Installation respectively.
|
mode (X11), or by exporting in one of several different formats, including:
|
||||||
|
plain text, LaTeX tikzpicture, PDF, PNG, and FIG (see Command-line Examples
|
||||||
|
below). Note that some of the export formats require additional support
|
||||||
|
libraries.
|
||||||
|
|
||||||
Also note that if you install supplemental libraries in non-standard locations,
|
hwloc offers a programming interface for manipulating topologies and objects.
|
||||||
hwloc's configure script may not be able to find them without some help. You
|
It also brings a powerful CPU bitmap API that is used to describe topology
|
||||||
may need to specify additional CPPFLAGS, LDFLAGS, or PKG_CONFIG_PATH values on
|
objects location on physical/logical processors. See the Programming Interface
|
||||||
the configure command line.
|
below. It may also be used to binding applications onto certain cores or memory
|
||||||
|
nodes. Several utility programs are also provided to ease command-line
|
||||||
|
manipulation of topology objects, binding of processes, and so on.
|
||||||
|
|
||||||
For example, if libpciaccess was installed into /opt/pciaccess, hwloc's
|
Bindings for several other languages are available from the project website.
|
||||||
configure script may not find it be default. Try adding PKG_CONFIG_PATH to the
|
|
||||||
./configure command line, like this:
|
|
||||||
|
|
||||||
./configure PKG_CONFIG_PATH=/opt/pciaccess/lib/pkgconfig ...
|
Command-line Examples
|
||||||
|
|
||||||
Running the "lstopo" tool is a good way to check as a graphical output whether
|
On a 4-package 2-core machine with hyper-threading, the lstopo tool may show
|
||||||
hwloc properly detected the architecture of your node. Netloc command-line
|
the following graphical output:
|
||||||
tools can be used to display the network topology interconnecting your nodes.
|
|
||||||
|
|
||||||
Installing from a Git clone
|
[dudley]
|
||||||
|
|
||||||
Additionally, the code can be directly cloned from Git:
|
Here's the equivalent output in textual form:
|
||||||
|
|
||||||
shell$ git clone https://github.com/open-mpi/hwloc.git
|
Machine
|
||||||
shell$ cd hwloc
|
NUMANode L#0 (P#0)
|
||||||
shell$ ./autogen.sh
|
Package L#0 + L3 L#0 (4096KB)
|
||||||
|
L2 L#0 (1024KB) + L1 L#0 (16KB) + Core L#0
|
||||||
|
PU L#0 (P#0)
|
||||||
|
PU L#1 (P#8)
|
||||||
|
L2 L#1 (1024KB) + L1 L#1 (16KB) + Core L#1
|
||||||
|
PU L#2 (P#4)
|
||||||
|
PU L#3 (P#12)
|
||||||
|
Package L#1 + L3 L#1 (4096KB)
|
||||||
|
L2 L#2 (1024KB) + L1 L#2 (16KB) + Core L#2
|
||||||
|
PU L#4 (P#1)
|
||||||
|
PU L#5 (P#9)
|
||||||
|
L2 L#3 (1024KB) + L1 L#3 (16KB) + Core L#3
|
||||||
|
PU L#6 (P#5)
|
||||||
|
PU L#7 (P#13)
|
||||||
|
Package L#2 + L3 L#2 (4096KB)
|
||||||
|
L2 L#4 (1024KB) + L1 L#4 (16KB) + Core L#4
|
||||||
|
PU L#8 (P#2)
|
||||||
|
PU L#9 (P#10)
|
||||||
|
L2 L#5 (1024KB) + L1 L#5 (16KB) + Core L#5
|
||||||
|
PU L#10 (P#6)
|
||||||
|
PU L#11 (P#14)
|
||||||
|
Package L#3 + L3 L#3 (4096KB)
|
||||||
|
L2 L#6 (1024KB) + L1 L#6 (16KB) + Core L#6
|
||||||
|
PU L#12 (P#3)
|
||||||
|
PU L#13 (P#11)
|
||||||
|
L2 L#7 (1024KB) + L1 L#7 (16KB) + Core L#7
|
||||||
|
PU L#14 (P#7)
|
||||||
|
PU L#15 (P#15)
|
||||||
|
|
||||||
Note that GNU Autoconf >=2.63, Automake >=1.11 and Libtool >=2.2.6 are required
|
Note that there is also an equivalent output in XML that is meant for exporting
|
||||||
when building from a Git clone.
|
/importing topologies but it is hardly readable to human-beings (see Importing
|
||||||
|
and exporting topologies from/to XML files for details).
|
||||||
|
|
||||||
Nightly development snapshots are available on the web site, they can be
|
On a 4-package 2-core Opteron NUMA machine (with two core cores disallowed by
|
||||||
configured and built without any need for Git or GNU Autotools.
|
the administrator), the lstopo tool may show the following graphical output
|
||||||
|
(with --disallowed for displaying disallowed objects):
|
||||||
|
|
||||||
|
[hagrid]
|
||||||
|
|
||||||
|
Here's the equivalent output in textual form:
|
||||||
|
|
||||||
|
Machine (32GB total)
|
||||||
|
Package L#0
|
||||||
|
NUMANode L#0 (P#0 8190MB)
|
||||||
|
L2 L#0 (1024KB) + L1 L#0 (64KB) + Core L#0 + PU L#0 (P#0)
|
||||||
|
L2 L#1 (1024KB) + L1 L#1 (64KB) + Core L#1 + PU L#1 (P#1)
|
||||||
|
Package L#1
|
||||||
|
NUMANode L#1 (P#1 8192MB)
|
||||||
|
L2 L#2 (1024KB) + L1 L#2 (64KB) + Core L#2 + PU L#2 (P#2)
|
||||||
|
L2 L#3 (1024KB) + L1 L#3 (64KB) + Core L#3 + PU L#3 (P#3)
|
||||||
|
Package L#2
|
||||||
|
NUMANode L#2 (P#2 8192MB)
|
||||||
|
L2 L#4 (1024KB) + L1 L#4 (64KB) + Core L#4 + PU L#4 (P#4)
|
||||||
|
L2 L#5 (1024KB) + L1 L#5 (64KB) + Core L#5 + PU L#5 (P#5)
|
||||||
|
Package L#3
|
||||||
|
NUMANode L#3 (P#3 8192MB)
|
||||||
|
L2 L#6 (1024KB) + L1 L#6 (64KB) + Core L#6 + PU L#6 (P#6)
|
||||||
|
L2 L#7 (1024KB) + L1 L#7 (64KB) + Core L#7 + PU L#7 (P#7)
|
||||||
|
|
||||||
|
On a 2-package quad-core Xeon (pre-Nehalem, with 2 dual-core dies into each
|
||||||
|
package):
|
||||||
|
|
||||||
|
[emmett]
|
||||||
|
|
||||||
|
Here's the same output in textual form:
|
||||||
|
|
||||||
|
Machine (total 16GB)
|
||||||
|
NUMANode L#0 (P#0 16GB)
|
||||||
|
Package L#0
|
||||||
|
L2 L#0 (4096KB)
|
||||||
|
L1 L#0 (32KB) + Core L#0 + PU L#0 (P#0)
|
||||||
|
L1 L#1 (32KB) + Core L#1 + PU L#1 (P#4)
|
||||||
|
L2 L#1 (4096KB)
|
||||||
|
L1 L#2 (32KB) + Core L#2 + PU L#2 (P#2)
|
||||||
|
L1 L#3 (32KB) + Core L#3 + PU L#3 (P#6)
|
||||||
|
Package L#1
|
||||||
|
L2 L#2 (4096KB)
|
||||||
|
L1 L#4 (32KB) + Core L#4 + PU L#4 (P#1)
|
||||||
|
L1 L#5 (32KB) + Core L#5 + PU L#5 (P#5)
|
||||||
|
L2 L#3 (4096KB)
|
||||||
|
L1 L#6 (32KB) + Core L#6 + PU L#6 (P#3)
|
||||||
|
L1 L#7 (32KB) + Core L#7 + PU L#7 (P#7)
|
||||||
|
|
||||||
|
Programming Interface
|
||||||
|
|
||||||
|
The basic interface is available in hwloc.h. Some higher-level functions are
|
||||||
|
available in hwloc/helper.h to reduce the need to manually manipulate objects
|
||||||
|
and follow links between them. Documentation for all these is provided later in
|
||||||
|
this document. Developers may also want to look at hwloc/inlines.h which
|
||||||
|
contains the actual inline code of some hwloc.h routines, and at this document,
|
||||||
|
which provides good higher-level topology traversal examples.
|
||||||
|
|
||||||
|
To precisely define the vocabulary used by hwloc, a Terms and Definitions
|
||||||
|
section is available and should probably be read first.
|
||||||
|
|
||||||
|
Each hwloc object contains a cpuset describing the list of processing units
|
||||||
|
that it contains. These bitmaps may be used for CPU binding and Memory binding.
|
||||||
|
hwloc offers an extensive bitmap manipulation interface in hwloc/bitmap.h.
|
||||||
|
|
||||||
|
Moreover, hwloc also comes with additional helpers for interoperability with
|
||||||
|
several commonly used environments. See the Interoperability With Other
|
||||||
|
Software section for details.
|
||||||
|
|
||||||
|
The complete API documentation is available in a full set of HTML pages, man
|
||||||
|
pages, and self-contained PDF files (formatted for both both US letter and A4
|
||||||
|
formats) in the source tarball in doc/doxygen-doc/.
|
||||||
|
|
||||||
|
NOTE: If you are building the documentation from a Git clone, you will need to
|
||||||
|
have Doxygen and pdflatex installed -- the documentation will be built during
|
||||||
|
the normal "make" process. The documentation is installed during "make install"
|
||||||
|
to $prefix/share/doc/hwloc/ and your systems default man page tree (under
|
||||||
|
$prefix, of course).
|
||||||
|
|
||||||
|
Portability
|
||||||
|
|
||||||
|
Operating System have varying support for CPU and memory binding, e.g. while
|
||||||
|
some Operating Systems provide interfaces for all kinds of CPU and memory
|
||||||
|
bindings, some others provide only interfaces for a limited number of kinds of
|
||||||
|
CPU and memory binding, and some do not provide any binding interface at all.
|
||||||
|
Hwloc's binding functions would then simply return the ENOSYS error (Function
|
||||||
|
not implemented), meaning that the underlying Operating System does not provide
|
||||||
|
any interface for them. CPU binding and Memory binding provide more information
|
||||||
|
on which hwloc binding functions should be preferred because interfaces for
|
||||||
|
them are usually available on the supported Operating Systems.
|
||||||
|
|
||||||
|
Similarly, the ability of reporting topology information varies from one
|
||||||
|
platform to another. As shown in Command-line Examples, hwloc can obtain
|
||||||
|
information on a wide variety of hardware topologies. However, some platforms
|
||||||
|
and/or operating system versions will only report a subset of this information.
|
||||||
|
For example, on an PPC64-based system with 8 cores (each with 2 hardware
|
||||||
|
threads) running a default 2.6.18-based kernel from RHEL 5.4, hwloc is only
|
||||||
|
able to glean information about NUMA nodes and processor units (PUs). No
|
||||||
|
information about caches, packages, or cores is available.
|
||||||
|
|
||||||
|
Here's the graphical output from lstopo on this platform when Simultaneous
|
||||||
|
Multi-Threading (SMT) is enabled:
|
||||||
|
|
||||||
|
[ppc64-with]
|
||||||
|
|
||||||
|
And here's the graphical output from lstopo on this platform when SMT is
|
||||||
|
disabled:
|
||||||
|
|
||||||
|
[ppc64-with]
|
||||||
|
|
||||||
|
Notice that hwloc only sees half the PUs when SMT is disabled. PU L#6, for
|
||||||
|
example, seems to change location from NUMA node #0 to #1. In reality, no PUs
|
||||||
|
"moved" -- they were simply re-numbered when hwloc only saw half as many (see
|
||||||
|
also Logical index in Indexes and Sets). Hence, PU L#6 in the SMT-disabled
|
||||||
|
picture probably corresponds to PU L#12 in the SMT-enabled picture.
|
||||||
|
|
||||||
|
This same "PUs have disappeared" effect can be seen on other platforms -- even
|
||||||
|
platforms / OSs that provide much more information than the above PPC64 system.
|
||||||
|
This is an unfortunate side-effect of how operating systems report information
|
||||||
|
to hwloc.
|
||||||
|
|
||||||
|
Note that upgrading the Linux kernel on the same PPC64 system mentioned above
|
||||||
|
to 2.6.34, hwloc is able to discover all the topology information. The
|
||||||
|
following picture shows the entire topology layout when SMT is enabled:
|
||||||
|
|
||||||
|
[ppc64-full]
|
||||||
|
|
||||||
|
Developers using the hwloc API or XML output for portable applications should
|
||||||
|
therefore be extremely careful to not make any assumptions about the structure
|
||||||
|
of data that is returned. For example, per the above reported PPC topology, it
|
||||||
|
is not safe to assume that PUs will always be descendants of cores.
|
||||||
|
|
||||||
|
Additionally, future hardware may insert new topology elements that are not
|
||||||
|
available in this version of hwloc. Long-lived applications that are meant to
|
||||||
|
span multiple different hardware platforms should also be careful about making
|
||||||
|
structure assumptions. For example, a new element may someday exist between a
|
||||||
|
core and a PU.
|
||||||
|
|
||||||
|
API Example
|
||||||
|
|
||||||
|
The following small C example (available in the source tree as ``doc/examples/
|
||||||
|
hwloc-hello.c'') prints the topology of the machine and performs some thread
|
||||||
|
and memory binding. More examples are available in the doc/examples/ directory
|
||||||
|
of the source tree.
|
||||||
|
|
||||||
|
/* Example hwloc API program.
|
||||||
|
*
|
||||||
|
* See other examples under doc/examples/ in the source tree
|
||||||
|
* for more details.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009-2016 Inria. All rights reserved.
|
||||||
|
* Copyright (c) 2009-2011 Universit?eacute; Bordeaux
|
||||||
|
* Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* See COPYING in top-level directory.
|
||||||
|
*
|
||||||
|
* hwloc-hello.c
|
||||||
|
*/
|
||||||
|
#include "hwloc.h"
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
static void print_children(hwloc_topology_t topology, hwloc_obj_t obj,
|
||||||
|
int depth)
|
||||||
|
{
|
||||||
|
char type[32], attr[1024];
|
||||||
|
unsigned i;
|
||||||
|
hwloc_obj_type_snprintf(type, sizeof(type), obj, 0);
|
||||||
|
printf("%*s%s", 2*depth, "", type);
|
||||||
|
if (obj->os_index != (unsigned) -1)
|
||||||
|
printf("#%u", obj->os_index);
|
||||||
|
hwloc_obj_attr_snprintf(attr, sizeof(attr), obj, " ", 0);
|
||||||
|
if (*attr)
|
||||||
|
printf("(%s)", attr);
|
||||||
|
printf("\n");
|
||||||
|
for (i = 0; i < obj->arity; i++) {
|
||||||
|
print_children(topology, obj->children[i], depth + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int depth;
|
||||||
|
unsigned i, n;
|
||||||
|
unsigned long size;
|
||||||
|
int levels;
|
||||||
|
char string[128];
|
||||||
|
int topodepth;
|
||||||
|
void *m;
|
||||||
|
hwloc_topology_t topology;
|
||||||
|
hwloc_cpuset_t cpuset;
|
||||||
|
hwloc_obj_t obj;
|
||||||
|
/* Allocate and initialize topology object. */
|
||||||
|
hwloc_topology_init(&topology);
|
||||||
|
/* ... Optionally, put detection configuration here to ignore
|
||||||
|
some objects types, define a synthetic topology, etc....
|
||||||
|
The default is to detect all the objects of the machine that
|
||||||
|
the caller is allowed to access. See Configure Topology
|
||||||
|
Detection. */
|
||||||
|
/* Perform the topology detection. */
|
||||||
|
hwloc_topology_load(topology);
|
||||||
|
/* Optionally, get some additional topology information
|
||||||
|
in case we need the topology depth later. */
|
||||||
|
topodepth = hwloc_topology_get_depth(topology);
|
||||||
|
/*****************************************************************
|
||||||
|
* First example:
|
||||||
|
* Walk the topology with an array style, from level 0 (always
|
||||||
|
* the system level) to the lowest level (always the proc level).
|
||||||
|
*****************************************************************/
|
||||||
|
for (depth = 0; depth < topodepth; depth++) {
|
||||||
|
printf("*** Objects at level %d\n", depth);
|
||||||
|
for (i = 0; i < hwloc_get_nbobjs_by_depth(topology, depth);
|
||||||
|
i++) {
|
||||||
|
hwloc_obj_type_snprintf(string, sizeof(string),
|
||||||
|
hwloc_get_obj_by_depth(topology, depth, i), 0);
|
||||||
|
printf("Index %u: %s\n", i, string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*****************************************************************
|
||||||
|
* Second example:
|
||||||
|
* Walk the topology with a tree style.
|
||||||
|
*****************************************************************/
|
||||||
|
printf("*** Printing overall tree\n");
|
||||||
|
print_children(topology, hwloc_get_root_obj(topology), 0);
|
||||||
|
/*****************************************************************
|
||||||
|
* Third example:
|
||||||
|
* Print the number of packages.
|
||||||
|
*****************************************************************/
|
||||||
|
depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PACKAGE);
|
||||||
|
if (depth == HWLOC_TYPE_DEPTH_UNKNOWN) {
|
||||||
|
printf("*** The number of packages is unknown\n");
|
||||||
|
} else {
|
||||||
|
printf("*** %u package(s)\n",
|
||||||
|
hwloc_get_nbobjs_by_depth(topology, depth));
|
||||||
|
}
|
||||||
|
/*****************************************************************
|
||||||
|
* Fourth example:
|
||||||
|
* Compute the amount of cache that the first logical processor
|
||||||
|
* has above it.
|
||||||
|
*****************************************************************/
|
||||||
|
levels = 0;
|
||||||
|
size = 0;
|
||||||
|
for (obj = hwloc_get_obj_by_type(topology, HWLOC_OBJ_PU, 0);
|
||||||
|
obj;
|
||||||
|
obj = obj->parent)
|
||||||
|
if (hwloc_obj_type_is_cache(obj->type)) {
|
||||||
|
levels++;
|
||||||
|
size += obj->attr->cache.size;
|
||||||
|
}
|
||||||
|
printf("*** Logical processor 0 has %d caches totaling %luKB\n",
|
||||||
|
levels, size / 1024);
|
||||||
|
/*****************************************************************
|
||||||
|
* Fifth example:
|
||||||
|
* Bind to only one thread of the last core of the machine.
|
||||||
|
*
|
||||||
|
* First find out where cores are, or else smaller sets of CPUs if
|
||||||
|
* the OS doesn't have the notion of a "core".
|
||||||
|
*****************************************************************/
|
||||||
|
depth = hwloc_get_type_or_below_depth(topology, HWLOC_OBJ_CORE);
|
||||||
|
/* Get last core. */
|
||||||
|
obj = hwloc_get_obj_by_depth(topology, depth,
|
||||||
|
hwloc_get_nbobjs_by_depth(topology, depth) - 1);
|
||||||
|
if (obj) {
|
||||||
|
/* Get a copy of its cpuset that we may modify. */
|
||||||
|
cpuset = hwloc_bitmap_dup(obj->cpuset);
|
||||||
|
/* Get only one logical processor (in case the core is
|
||||||
|
SMT/hyper-threaded). */
|
||||||
|
hwloc_bitmap_singlify(cpuset);
|
||||||
|
/* And try to bind ourself there. */
|
||||||
|
if (hwloc_set_cpubind(topology, cpuset, 0)) {
|
||||||
|
char *str;
|
||||||
|
int error = errno;
|
||||||
|
hwloc_bitmap_asprintf(&str, obj->cpuset);
|
||||||
|
printf("Couldn't bind to cpuset %s: %s\n", str, strerror(error));
|
||||||
|
free(str);
|
||||||
|
}
|
||||||
|
/* Free our cpuset copy */
|
||||||
|
hwloc_bitmap_free(cpuset);
|
||||||
|
}
|
||||||
|
/*****************************************************************
|
||||||
|
* Sixth example:
|
||||||
|
* Allocate some memory on the last NUMA node, bind some existing
|
||||||
|
* memory to the last NUMA node.
|
||||||
|
*****************************************************************/
|
||||||
|
/* Get last node. There's always at least one. */
|
||||||
|
n = hwloc_get_nbobjs_by_type(topology, HWLOC_OBJ_NUMANODE);
|
||||||
|
obj = hwloc_get_obj_by_type(topology, HWLOC_OBJ_NUMANODE, n - 1);
|
||||||
|
size = 1024*1024;
|
||||||
|
m = hwloc_alloc_membind(topology, size, obj->nodeset,
|
||||||
|
HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_BYNODESET);
|
||||||
|
hwloc_free(topology, m, size);
|
||||||
|
m = malloc(size);
|
||||||
|
hwloc_set_area_membind(topology, m, size, obj->nodeset,
|
||||||
|
HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_BYNODESET);
|
||||||
|
free(m);
|
||||||
|
/* Destroy topology object. */
|
||||||
|
hwloc_topology_destroy(topology);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hwloc provides a pkg-config executable to obtain relevant compiler and linker
|
||||||
|
flags. See Compiling software on top of hwloc's C API for details on building
|
||||||
|
program on top of hwloc's API using GNU Make or CMake.
|
||||||
|
|
||||||
|
On a machine 2 processor packages -- each package of which has two processing
|
||||||
|
cores -- the output from running hwloc-hello could be something like the
|
||||||
|
following:
|
||||||
|
|
||||||
|
shell$ ./hwloc-hello
|
||||||
|
*** Objects at level 0
|
||||||
|
Index 0: Machine
|
||||||
|
*** Objects at level 1
|
||||||
|
Index 0: Package#0
|
||||||
|
Index 1: Package#1
|
||||||
|
*** Objects at level 2
|
||||||
|
Index 0: Core#0
|
||||||
|
Index 1: Core#1
|
||||||
|
Index 2: Core#3
|
||||||
|
Index 3: Core#2
|
||||||
|
*** Objects at level 3
|
||||||
|
Index 0: PU#0
|
||||||
|
Index 1: PU#1
|
||||||
|
Index 2: PU#2
|
||||||
|
Index 3: PU#3
|
||||||
|
*** Printing overall tree
|
||||||
|
Machine
|
||||||
|
Package#0
|
||||||
|
Core#0
|
||||||
|
PU#0
|
||||||
|
Core#1
|
||||||
|
PU#1
|
||||||
|
Package#1
|
||||||
|
Core#3
|
||||||
|
PU#2
|
||||||
|
Core#2
|
||||||
|
PU#3
|
||||||
|
*** 2 package(s)
|
||||||
|
*** Logical processor 0 has 0 caches totaling 0KB
|
||||||
|
shell$
|
||||||
|
|
||||||
Questions and Bugs
|
Questions and Bugs
|
||||||
|
|
||||||
@@ -78,8 +466,22 @@ debug and report issues.
|
|||||||
Questions may be sent to the users or developers mailing lists (https://
|
Questions may be sent to the users or developers mailing lists (https://
|
||||||
www.open-mpi.org/community/lists/hwloc.php).
|
www.open-mpi.org/community/lists/hwloc.php).
|
||||||
|
|
||||||
There is also a #hwloc IRC channel on Freenode (irc.freenode.net).
|
There is also a #hwloc IRC channel on Libera Chat (irc.libera.chat).
|
||||||
|
|
||||||
|
History / Credits
|
||||||
|
|
||||||
|
hwloc is the evolution and merger of the libtopology project and the Portable
|
||||||
|
Linux Processor Affinity (PLPA) (https://www.open-mpi.org/projects/plpa/)
|
||||||
|
project. Because of functional and ideological overlap, these two code bases
|
||||||
|
and ideas were merged and released under the name "hwloc" as an Open MPI
|
||||||
|
sub-project.
|
||||||
|
|
||||||
|
libtopology was initially developed by the Inria Runtime Team-Project. PLPA was
|
||||||
|
initially developed by the Open MPI development team as a sub-project. Both are
|
||||||
|
now deprecated in favor of hwloc, which is distributed as an Open MPI
|
||||||
|
sub-project.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
See https://www.open-mpi.org/projects/hwloc/doc/ for more hwloc documentation.
|
See https://www.open-mpi.org/projects/hwloc/doc/ for more hwloc documentation,
|
||||||
|
actual links to related pages, images, etc.
|
||||||
|
|||||||
9
src/3rdparty/hwloc/VERSION
vendored
9
src/3rdparty/hwloc/VERSION
vendored
@@ -8,8 +8,8 @@
|
|||||||
# Please update HWLOC_VERSION* in contrib/windows/hwloc_config.h too.
|
# Please update HWLOC_VERSION* in contrib/windows/hwloc_config.h too.
|
||||||
|
|
||||||
major=2
|
major=2
|
||||||
minor=4
|
minor=11
|
||||||
release=0
|
release=2
|
||||||
|
|
||||||
# greek is used for alpha or beta release tags. If it is non-empty,
|
# 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
|
# 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
|
# The date when this release was created
|
||||||
|
|
||||||
date="Nov 26, 2020"
|
date="Sep 26, 2024"
|
||||||
|
|
||||||
# If snapshot=1, then use the value from snapshot_version as the
|
# If snapshot=1, then use the value from snapshot_version as the
|
||||||
# entire hwloc version (i.e., ignore major, minor, release, and
|
# entire hwloc version (i.e., ignore major, minor, release, and
|
||||||
@@ -41,7 +41,6 @@ snapshot_version=${major}.${minor}.${release}${greek}-git
|
|||||||
# 2. Version numbers are described in the Libtool current:revision:age
|
# 2. Version numbers are described in the Libtool current:revision:age
|
||||||
# format.
|
# format.
|
||||||
|
|
||||||
libhwloc_so_version=19:0:4
|
libhwloc_so_version=23:1:8
|
||||||
libnetloc_so_version=0:0:0
|
|
||||||
|
|
||||||
# Please also update the <TargetName> lines in contrib/windows/libhwloc.vcxproj
|
# Please also update the <TargetName> lines in contrib/windows/libhwloc.vcxproj
|
||||||
|
|||||||
637
src/3rdparty/hwloc/include/hwloc.h
vendored
637
src/3rdparty/hwloc/include/hwloc.h
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009 CNRS
|
* Copyright © 2009 CNRS
|
||||||
* Copyright © 2009-2020 Inria. All rights reserved.
|
* Copyright © 2009-2024 Inria. All rights reserved.
|
||||||
* Copyright © 2009-2012 Université Bordeaux
|
* Copyright © 2009-2012 Université Bordeaux
|
||||||
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -11,10 +11,10 @@
|
|||||||
#ifndef HWLOC_CONFIG_H
|
#ifndef HWLOC_CONFIG_H
|
||||||
#define HWLOC_CONFIG_H
|
#define HWLOC_CONFIG_H
|
||||||
|
|
||||||
#define HWLOC_VERSION "2.4.1"
|
#define HWLOC_VERSION "2.11.2"
|
||||||
#define HWLOC_VERSION_MAJOR 2
|
#define HWLOC_VERSION_MAJOR 2
|
||||||
#define HWLOC_VERSION_MINOR 4
|
#define HWLOC_VERSION_MINOR 11
|
||||||
#define HWLOC_VERSION_RELEASE 1
|
#define HWLOC_VERSION_RELEASE 2
|
||||||
#define HWLOC_VERSION_GREEK ""
|
#define HWLOC_VERSION_GREEK ""
|
||||||
|
|
||||||
#define __hwloc_restrict
|
#define __hwloc_restrict
|
||||||
|
|||||||
63
src/3rdparty/hwloc/include/hwloc/bitmap.h
vendored
63
src/3rdparty/hwloc/include/hwloc/bitmap.h
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009 CNRS
|
* Copyright © 2009 CNRS
|
||||||
* Copyright © 2009-2020 Inria. All rights reserved.
|
* Copyright © 2009-2023 Inria. All rights reserved.
|
||||||
* Copyright © 2009-2012 Université Bordeaux
|
* Copyright © 2009-2012 Université Bordeaux
|
||||||
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -50,9 +50,10 @@ extern "C" {
|
|||||||
* hwloc_bitmap_free(set);
|
* hwloc_bitmap_free(set);
|
||||||
* \endcode
|
* \endcode
|
||||||
*
|
*
|
||||||
* \note Most functions below return an int that may be negative in case of
|
* \note Most functions below return 0 on success and -1 on error.
|
||||||
* error. The usual error case would be an internal failure to realloc/extend
|
* The usual error case would be an internal failure to realloc/extend
|
||||||
* the storage of the bitmap (\p errno would be set to \c ENOMEM).
|
* the storage of the bitmap (\p errno would be set to \c ENOMEM).
|
||||||
|
* See also \ref hwlocality_api_error_reporting.
|
||||||
*
|
*
|
||||||
* \note Several examples of using the bitmap API are available under the
|
* \note Several examples of using the bitmap API are available under the
|
||||||
* doc/examples/ directory in the source tree.
|
* doc/examples/ directory in the source tree.
|
||||||
@@ -83,7 +84,13 @@ typedef const struct hwloc_bitmap_s * hwloc_const_bitmap_t;
|
|||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC hwloc_bitmap_t hwloc_bitmap_alloc(void) __hwloc_attribute_malloc;
|
HWLOC_DECLSPEC hwloc_bitmap_t hwloc_bitmap_alloc(void) __hwloc_attribute_malloc;
|
||||||
|
|
||||||
/** \brief Allocate a new full bitmap. */
|
/** \brief Allocate a new full bitmap.
|
||||||
|
*
|
||||||
|
* \returns A valid bitmap or \c NULL.
|
||||||
|
*
|
||||||
|
* The bitmap should be freed by a corresponding call to
|
||||||
|
* hwloc_bitmap_free().
|
||||||
|
*/
|
||||||
HWLOC_DECLSPEC hwloc_bitmap_t hwloc_bitmap_alloc_full(void) __hwloc_attribute_malloc;
|
HWLOC_DECLSPEC hwloc_bitmap_t hwloc_bitmap_alloc_full(void) __hwloc_attribute_malloc;
|
||||||
|
|
||||||
/** \brief Free bitmap \p bitmap.
|
/** \brief Free bitmap \p bitmap.
|
||||||
@@ -112,18 +119,20 @@ HWLOC_DECLSPEC int hwloc_bitmap_copy(hwloc_bitmap_t dst, hwloc_const_bitmap_t sr
|
|||||||
*
|
*
|
||||||
* If \p buflen is 0, \p buf may safely be \c NULL.
|
* If \p buflen is 0, \p buf may safely be \c NULL.
|
||||||
*
|
*
|
||||||
* \return the number of character that were actually written if not truncating,
|
* \return the number of characters that were actually written if not truncating,
|
||||||
* or that would have been written (not including the ending \\0).
|
* or that would have been written (not including the ending \\0).
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
|
HWLOC_DECLSPEC int hwloc_bitmap_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
|
||||||
|
|
||||||
/** \brief Stringify a bitmap into a newly allocated string.
|
/** \brief Stringify a bitmap into a newly allocated string.
|
||||||
*
|
*
|
||||||
* \return -1 on error.
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
|
HWLOC_DECLSPEC int hwloc_bitmap_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
|
||||||
|
|
||||||
/** \brief Parse a bitmap string and stores it in bitmap \p bitmap.
|
/** \brief Parse a bitmap string and stores it in bitmap \p bitmap.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
|
HWLOC_DECLSPEC int hwloc_bitmap_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
|
||||||
|
|
||||||
@@ -137,18 +146,20 @@ HWLOC_DECLSPEC int hwloc_bitmap_sscanf(hwloc_bitmap_t bitmap, const char * __hwl
|
|||||||
*
|
*
|
||||||
* If \p buflen is 0, \p buf may safely be \c NULL.
|
* If \p buflen is 0, \p buf may safely be \c NULL.
|
||||||
*
|
*
|
||||||
* \return the number of character that were actually written if not truncating,
|
* \return the number of characters that were actually written if not truncating,
|
||||||
* or that would have been written (not including the ending \\0).
|
* or that would have been written (not including the ending \\0).
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_list_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
|
HWLOC_DECLSPEC int hwloc_bitmap_list_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
|
||||||
|
|
||||||
/** \brief Stringify a bitmap into a newly allocated list string.
|
/** \brief Stringify a bitmap into a newly allocated list string.
|
||||||
*
|
*
|
||||||
* \return -1 on error.
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_list_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
|
HWLOC_DECLSPEC int hwloc_bitmap_list_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
|
||||||
|
|
||||||
/** \brief Parse a list string and stores it in bitmap \p bitmap.
|
/** \brief Parse a list string and stores it in bitmap \p bitmap.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_list_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
|
HWLOC_DECLSPEC int hwloc_bitmap_list_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
|
||||||
|
|
||||||
@@ -161,18 +172,20 @@ HWLOC_DECLSPEC int hwloc_bitmap_list_sscanf(hwloc_bitmap_t bitmap, const char *
|
|||||||
*
|
*
|
||||||
* If \p buflen is 0, \p buf may safely be \c NULL.
|
* If \p buflen is 0, \p buf may safely be \c NULL.
|
||||||
*
|
*
|
||||||
* \return the number of character that were actually written if not truncating,
|
* \return the number of characters that were actually written if not truncating,
|
||||||
* or that would have been written (not including the ending \\0).
|
* or that would have been written (not including the ending \\0).
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_taskset_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
|
HWLOC_DECLSPEC int hwloc_bitmap_taskset_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
|
||||||
|
|
||||||
/** \brief Stringify a bitmap into a newly allocated taskset-specific string.
|
/** \brief Stringify a bitmap into a newly allocated taskset-specific string.
|
||||||
*
|
*
|
||||||
* \return -1 on error.
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_taskset_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
|
HWLOC_DECLSPEC int hwloc_bitmap_taskset_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
|
||||||
|
|
||||||
/** \brief Parse a taskset-specific bitmap string and stores it in bitmap \p bitmap.
|
/** \brief Parse a taskset-specific bitmap string and stores it in bitmap \p bitmap.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_taskset_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
|
HWLOC_DECLSPEC int hwloc_bitmap_taskset_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
|
||||||
|
|
||||||
@@ -279,6 +292,7 @@ HWLOC_DECLSPEC int hwloc_bitmap_to_ulongs(hwloc_const_bitmap_t bitmap, unsigned
|
|||||||
* When called on the output of hwloc_topology_get_topology_cpuset(),
|
* When called on the output of hwloc_topology_get_topology_cpuset(),
|
||||||
* the returned number is large enough for all cpusets of the topology.
|
* the returned number is large enough for all cpusets of the topology.
|
||||||
*
|
*
|
||||||
|
* \return the number of unsigned longs required.
|
||||||
* \return -1 if \p bitmap is infinite.
|
* \return -1 if \p bitmap is infinite.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_nr_ulongs(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_nr_ulongs(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
||||||
@@ -305,21 +319,23 @@ HWLOC_DECLSPEC int hwloc_bitmap_isfull(hwloc_const_bitmap_t bitmap) __hwloc_attr
|
|||||||
|
|
||||||
/** \brief Compute the first index (least significant bit) in bitmap \p bitmap
|
/** \brief Compute the first index (least significant bit) in bitmap \p bitmap
|
||||||
*
|
*
|
||||||
* \return -1 if no index is set in \p bitmap.
|
* \return the first index set in \p bitmap.
|
||||||
|
* \return -1 if \p bitmap is empty.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_first(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_first(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
||||||
|
|
||||||
/** \brief Compute the next index in bitmap \p bitmap which is after index \p prev
|
/** \brief Compute the next index in bitmap \p bitmap which is after index \p prev
|
||||||
*
|
*
|
||||||
* If \p prev is -1, the first index is returned.
|
* \return the first index set in \p bitmap if \p prev is \c -1.
|
||||||
*
|
* \return the next index set in \p bitmap if \p prev is not \c -1.
|
||||||
* \return -1 if no index with higher index is set in \p bitmap.
|
* \return -1 if no index with higher index is set in \p bitmap.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_next(hwloc_const_bitmap_t bitmap, int prev) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_next(hwloc_const_bitmap_t bitmap, int prev) __hwloc_attribute_pure;
|
||||||
|
|
||||||
/** \brief Compute the last index (most significant bit) in bitmap \p bitmap
|
/** \brief Compute the last index (most significant bit) in bitmap \p bitmap
|
||||||
*
|
*
|
||||||
* \return -1 if no index is set in \p bitmap, or if \p bitmap is infinitely set.
|
* \return the last index set in \p bitmap.
|
||||||
|
* \return -1 if \p bitmap is empty, or if \p bitmap is infinitely set.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_last(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_last(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
||||||
|
|
||||||
@@ -327,28 +343,29 @@ HWLOC_DECLSPEC int hwloc_bitmap_last(hwloc_const_bitmap_t bitmap) __hwloc_attrib
|
|||||||
* indexes that are in the bitmap).
|
* indexes that are in the bitmap).
|
||||||
*
|
*
|
||||||
* \return the number of indexes that are in the bitmap.
|
* \return the number of indexes that are in the bitmap.
|
||||||
*
|
|
||||||
* \return -1 if \p bitmap is infinitely set.
|
* \return -1 if \p bitmap is infinitely set.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_weight(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_weight(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
||||||
|
|
||||||
/** \brief Compute the first unset index (least significant bit) in bitmap \p bitmap
|
/** \brief Compute the first unset index (least significant bit) in bitmap \p bitmap
|
||||||
*
|
*
|
||||||
* \return -1 if no index is unset in \p bitmap.
|
* \return the first unset index in \p bitmap.
|
||||||
|
* \return -1 if \p bitmap is full.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_first_unset(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_first_unset(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
||||||
|
|
||||||
/** \brief Compute the next unset index in bitmap \p bitmap which is after index \p prev
|
/** \brief Compute the next unset index in bitmap \p bitmap which is after index \p prev
|
||||||
*
|
*
|
||||||
* If \p prev is -1, the first unset index is returned.
|
* \return the first index unset in \p bitmap if \p prev is \c -1.
|
||||||
*
|
* \return the next index unset in \p bitmap if \p prev is not \c -1.
|
||||||
* \return -1 if no index with higher index is unset in \p bitmap.
|
* \return -1 if no index with higher index is unset in \p bitmap.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_next_unset(hwloc_const_bitmap_t bitmap, int prev) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_next_unset(hwloc_const_bitmap_t bitmap, int prev) __hwloc_attribute_pure;
|
||||||
|
|
||||||
/** \brief Compute the last unset index (most significant bit) in bitmap \p bitmap
|
/** \brief Compute the last unset index (most significant bit) in bitmap \p bitmap
|
||||||
*
|
*
|
||||||
* \return -1 if no index is unset in \p bitmap, or if \p bitmap is infinitely set.
|
* \return the last index unset in \p bitmap.
|
||||||
|
* \return -1 if \p bitmap is full, or if \p bitmap is not infinitely set.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_last_unset(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_last_unset(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
|
||||||
|
|
||||||
@@ -357,11 +374,11 @@ HWLOC_DECLSPEC int hwloc_bitmap_last_unset(hwloc_const_bitmap_t bitmap) __hwloc_
|
|||||||
* The loop must start with hwloc_bitmap_foreach_begin() and end
|
* The loop must start with hwloc_bitmap_foreach_begin() and end
|
||||||
* with hwloc_bitmap_foreach_end() followed by a terminating ';'.
|
* with hwloc_bitmap_foreach_end() followed by a terminating ';'.
|
||||||
*
|
*
|
||||||
* \p index is the loop variable; it should be an unsigned int. The
|
* \p id is the loop variable; it should be an unsigned int. The
|
||||||
* first iteration will set \p index to the lowest index in the bitmap.
|
* first iteration will set \p id to the lowest index in the bitmap.
|
||||||
* Successive iterations will iterate through, in order, all remaining
|
* Successive iterations will iterate through, in order, all remaining
|
||||||
* indexes set in the bitmap. To be specific: each iteration will return a
|
* indexes set in the bitmap. To be specific: each iteration will return a
|
||||||
* value for \p index such that hwloc_bitmap_isset(bitmap, index) is true.
|
* value for \p id such that hwloc_bitmap_isset(bitmap, id) is true.
|
||||||
*
|
*
|
||||||
* The assert prevents the loop from being infinite if the bitmap is infinitely set.
|
* The assert prevents the loop from being infinite if the bitmap is infinitely set.
|
||||||
*
|
*
|
||||||
@@ -428,6 +445,8 @@ HWLOC_DECLSPEC int hwloc_bitmap_not (hwloc_bitmap_t res, hwloc_const_bitmap_t bi
|
|||||||
/** \brief Test whether bitmaps \p bitmap1 and \p bitmap2 intersects.
|
/** \brief Test whether bitmaps \p bitmap1 and \p bitmap2 intersects.
|
||||||
*
|
*
|
||||||
* \return 1 if bitmaps intersect, 0 otherwise.
|
* \return 1 if bitmaps intersect, 0 otherwise.
|
||||||
|
*
|
||||||
|
* \note The empty bitmap does not intersect any other bitmap.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_bitmap_intersects (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure;
|
HWLOC_DECLSPEC int hwloc_bitmap_intersects (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure;
|
||||||
|
|
||||||
|
|||||||
25
src/3rdparty/hwloc/include/hwloc/cpukinds.h
vendored
25
src/3rdparty/hwloc/include/hwloc/cpukinds.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2020 Inria. All rights reserved.
|
* Copyright © 2020-2021 Inria. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -42,18 +42,23 @@ extern "C" {
|
|||||||
* (for instance the "CoreType" and "FrequencyMaxMHz",
|
* (for instance the "CoreType" and "FrequencyMaxMHz",
|
||||||
* see \ref topoattrs_cpukinds).
|
* see \ref topoattrs_cpukinds).
|
||||||
*
|
*
|
||||||
* A higher efficiency value means intrinsic greater performance
|
* A higher efficiency value means greater intrinsic performance
|
||||||
* (and possibly less performance/power efficiency).
|
* (and possibly less performance/power efficiency).
|
||||||
* Kinds with lower efficiency are ranked first:
|
* Kinds with lower efficiency values are ranked first:
|
||||||
* Passing 0 as \p kind_index to hwloc_cpukinds_get_info() will
|
* Passing 0 as \p kind_index to hwloc_cpukinds_get_info() will
|
||||||
* return information about the less efficient CPU kind.
|
* return information about the CPU kind with lower performance
|
||||||
|
* but higher energy-efficiency.
|
||||||
|
* Higher \p kind_index values would rather return information
|
||||||
|
* about power-hungry high-performance cores.
|
||||||
*
|
*
|
||||||
* When available, efficiency values are gathered from the operating
|
* When available, efficiency values are gathered from the operating system.
|
||||||
* system (when \p cpukind_efficiency is set in the
|
* If so, \p cpukind_efficiency is set in the struct hwloc_topology_discovery_support array.
|
||||||
* struct hwloc_topology_discovery_support array, only on Windows 10 for now).
|
* This is currently available on Windows 10, Mac OS X (Darwin),
|
||||||
* Otherwise hwloc tries to compute efficiencies
|
* and on some Linux platforms where core "capacity" is exposed in sysfs.
|
||||||
* by comparing CPU kinds using frequencies (on ARM),
|
*
|
||||||
* or core types and frequencies (on other architectures).
|
* If the operating system does not expose core efficiencies natively,
|
||||||
|
* hwloc tries to compute efficiencies by comparing CPU kinds using
|
||||||
|
* frequencies (on ARM), or core types and frequencies (on other architectures).
|
||||||
* The environment variable HWLOC_CPUKINDS_RANKING may be used
|
* The environment variable HWLOC_CPUKINDS_RANKING may be used
|
||||||
* to change this heuristics, see \ref envvar.
|
* to change this heuristics, see \ref envvar.
|
||||||
*
|
*
|
||||||
|
|||||||
22
src/3rdparty/hwloc/include/hwloc/cuda.h
vendored
22
src/3rdparty/hwloc/include/hwloc/cuda.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2010-2020 Inria. All rights reserved.
|
* Copyright © 2010-2023 Inria. All rights reserved.
|
||||||
* Copyright © 2010-2011 Université Bordeaux
|
* Copyright © 2010-2011 Université Bordeaux
|
||||||
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -42,6 +42,9 @@ extern "C" {
|
|||||||
/** \brief Return the domain, bus and device IDs of the CUDA device \p cudevice.
|
/** \brief Return the domain, bus and device IDs of the CUDA device \p cudevice.
|
||||||
*
|
*
|
||||||
* Device \p cudevice must match the local machine.
|
* Device \p cudevice must match the local machine.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cuda_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused,
|
hwloc_cuda_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
@@ -75,7 +78,7 @@ hwloc_cuda_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused
|
|||||||
/** \brief Get the CPU set of processors that are physically
|
/** \brief Get the CPU set of processors that are physically
|
||||||
* close to device \p cudevice.
|
* close to device \p cudevice.
|
||||||
*
|
*
|
||||||
* Return the CPU set describing the locality of the CUDA device \p cudevice.
|
* Store in \p set the CPU-set describing the locality of the CUDA device \p cudevice.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p cudevice must match the local machine.
|
* Topology \p topology and device \p cudevice must match the local machine.
|
||||||
* I/O devices detection and the CUDA component are not needed in the topology.
|
* I/O devices detection and the CUDA component are not needed in the topology.
|
||||||
@@ -87,6 +90,9 @@ hwloc_cuda_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused
|
|||||||
*
|
*
|
||||||
* This function is currently only implemented in a meaningful way for
|
* This function is currently only implemented in a meaningful way for
|
||||||
* Linux; other systems will simply get a full cpuset.
|
* Linux; other systems will simply get a full cpuset.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cuda_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
hwloc_cuda_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
@@ -120,8 +126,8 @@ hwloc_cuda_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
|||||||
/** \brief Get the hwloc PCI device object corresponding to the
|
/** \brief Get the hwloc PCI device object corresponding to the
|
||||||
* CUDA device \p cudevice.
|
* CUDA device \p cudevice.
|
||||||
*
|
*
|
||||||
* Return the PCI device object describing the CUDA device \p cudevice.
|
* \return The hwloc PCI device object describing the CUDA device \p cudevice.
|
||||||
* Return NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p cudevice must match the local machine.
|
* Topology \p topology and device \p cudevice must match the local machine.
|
||||||
* I/O devices detection must be enabled in topology \p topology.
|
* I/O devices detection must be enabled in topology \p topology.
|
||||||
@@ -140,8 +146,8 @@ hwloc_cuda_get_device_pcidev(hwloc_topology_t topology, CUdevice cudevice)
|
|||||||
|
|
||||||
/** \brief Get the hwloc OS device object corresponding to CUDA device \p cudevice.
|
/** \brief Get the hwloc OS device object corresponding to CUDA device \p cudevice.
|
||||||
*
|
*
|
||||||
* Return the hwloc OS device object that describes the given
|
* \return The hwloc OS device object that describes the given CUDA device \p cudevice.
|
||||||
* CUDA device \p cudevice. Return NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p cudevice must match the local machine.
|
* Topology \p topology and device \p cudevice must match the local machine.
|
||||||
* I/O devices detection and the CUDA component must be enabled in the topology.
|
* I/O devices detection and the CUDA component must be enabled in the topology.
|
||||||
@@ -183,8 +189,8 @@ hwloc_cuda_get_device_osdev(hwloc_topology_t topology, CUdevice cudevice)
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the
|
/** \brief Get the hwloc OS device object corresponding to the
|
||||||
* CUDA device whose index is \p idx.
|
* CUDA device whose index is \p idx.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the CUDA device whose
|
* \return The hwloc OS device object describing the CUDA device whose index is \p idx.
|
||||||
* index is \p idx. Return NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
* machine. For instance the topology may be an XML import of a remote host.
|
||||||
|
|||||||
18
src/3rdparty/hwloc/include/hwloc/cudart.h
vendored
18
src/3rdparty/hwloc/include/hwloc/cudart.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2010-2020 Inria. All rights reserved.
|
* Copyright © 2010-2023 Inria. All rights reserved.
|
||||||
* Copyright © 2010-2011 Université Bordeaux
|
* Copyright © 2010-2011 Université Bordeaux
|
||||||
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -43,6 +43,9 @@ extern "C" {
|
|||||||
/** \brief Return the domain, bus and device IDs of the CUDA device whose index is \p idx.
|
/** \brief Return the domain, bus and device IDs of the CUDA device whose index is \p idx.
|
||||||
*
|
*
|
||||||
* Device index \p idx must match the local machine.
|
* Device index \p idx must match the local machine.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cudart_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused,
|
hwloc_cudart_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
@@ -72,7 +75,7 @@ hwloc_cudart_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unus
|
|||||||
/** \brief Get the CPU set of processors that are physically
|
/** \brief Get the CPU set of processors that are physically
|
||||||
* close to device \p idx.
|
* close to device \p idx.
|
||||||
*
|
*
|
||||||
* Return the CPU set describing the locality of the CUDA device
|
* Store in \p set the CPU-set describing the locality of the CUDA device
|
||||||
* whose index is \p idx.
|
* whose index is \p idx.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p idx must match the local machine.
|
* Topology \p topology and device \p idx must match the local machine.
|
||||||
@@ -84,6 +87,9 @@ hwloc_cudart_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unus
|
|||||||
*
|
*
|
||||||
* This function is currently only implemented in a meaningful way for
|
* This function is currently only implemented in a meaningful way for
|
||||||
* Linux; other systems will simply get a full cpuset.
|
* Linux; other systems will simply get a full cpuset.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cudart_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
hwloc_cudart_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
@@ -117,8 +123,8 @@ hwloc_cudart_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unuse
|
|||||||
/** \brief Get the hwloc PCI device object corresponding to the
|
/** \brief Get the hwloc PCI device object corresponding to the
|
||||||
* CUDA device whose index is \p idx.
|
* CUDA device whose index is \p idx.
|
||||||
*
|
*
|
||||||
* Return the PCI device object describing the CUDA device whose
|
* \return The hwloc PCI device object describing the CUDA device whose index is \p idx.
|
||||||
* index is \p idx. Return NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p idx must match the local machine.
|
* Topology \p topology and device \p idx must match the local machine.
|
||||||
* I/O devices detection must be enabled in topology \p topology.
|
* I/O devices detection must be enabled in topology \p topology.
|
||||||
@@ -138,8 +144,8 @@ hwloc_cudart_get_device_pcidev(hwloc_topology_t topology, int idx)
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the
|
/** \brief Get the hwloc OS device object corresponding to the
|
||||||
* CUDA device whose index is \p idx.
|
* CUDA device whose index is \p idx.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the CUDA device whose
|
* \return The hwloc OS device object describing the CUDA device whose index is \p idx.
|
||||||
* index is \p idx. Return NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
* machine. For instance the topology may be an XML import of a remote host.
|
||||||
|
|||||||
13
src/3rdparty/hwloc/include/hwloc/deprecated.h
vendored
13
src/3rdparty/hwloc/include/hwloc/deprecated.h
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009 CNRS
|
* Copyright © 2009 CNRS
|
||||||
* Copyright © 2009-2018 Inria. All rights reserved.
|
* Copyright © 2009-2022 Inria. All rights reserved.
|
||||||
* Copyright © 2009-2012 Université Bordeaux
|
* Copyright © 2009-2012 Université Bordeaux
|
||||||
* Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -30,6 +30,15 @@ extern "C" {
|
|||||||
/* backward compat with v1.10 before Node->NUMANode clarification */
|
/* backward compat with v1.10 before Node->NUMANode clarification */
|
||||||
#define HWLOC_OBJ_NODE HWLOC_OBJ_NUMANODE
|
#define HWLOC_OBJ_NODE HWLOC_OBJ_NUMANODE
|
||||||
|
|
||||||
|
/** \brief Add a distances structure.
|
||||||
|
*
|
||||||
|
* Superseded by hwloc_distances_add_create()+hwloc_distances_add_values()+hwloc_distances_add_commit()
|
||||||
|
* in v2.5.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC 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_attribute_deprecated;
|
||||||
|
|
||||||
/** \brief Insert a misc object by parent.
|
/** \brief Insert a misc object by parent.
|
||||||
*
|
*
|
||||||
* Identical to hwloc_topology_insert_misc_object().
|
* Identical to hwloc_topology_insert_misc_object().
|
||||||
@@ -46,7 +55,7 @@ hwloc_topology_insert_misc_object_by_parent(hwloc_topology_t topology, hwloc_obj
|
|||||||
*
|
*
|
||||||
* If \p size is 0, \p string may safely be \c NULL.
|
* If \p size is 0, \p string may safely be \c NULL.
|
||||||
*
|
*
|
||||||
* \return the number of character that were actually written if not truncating,
|
* \return the number of characters that were actually written if not truncating,
|
||||||
* or that would have been written (not including the ending \\0).
|
* or that would have been written (not including the ending \\0).
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
|
|||||||
17
src/3rdparty/hwloc/include/hwloc/diff.h
vendored
17
src/3rdparty/hwloc/include/hwloc/diff.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2013-2020 Inria. All rights reserved.
|
* Copyright © 2013-2023 Inria. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -222,6 +222,8 @@ enum hwloc_topology_diff_apply_flags_e {
|
|||||||
HWLOC_DECLSPEC int hwloc_topology_diff_apply(hwloc_topology_t topology, hwloc_topology_diff_t diff, unsigned long flags);
|
HWLOC_DECLSPEC int hwloc_topology_diff_apply(hwloc_topology_t topology, hwloc_topology_diff_t diff, unsigned long flags);
|
||||||
|
|
||||||
/** \brief Destroy a list of topology differences.
|
/** \brief Destroy a list of topology differences.
|
||||||
|
*
|
||||||
|
* \return 0.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff);
|
HWLOC_DECLSPEC int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff);
|
||||||
|
|
||||||
@@ -233,6 +235,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff);
|
|||||||
* This identifier is usually the name of the other XML file
|
* This identifier is usually the name of the other XML file
|
||||||
* that contains the reference topology.
|
* that contains the reference topology.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
|
*
|
||||||
* \note the pointer returned in refname should later be freed
|
* \note the pointer returned in refname should later be freed
|
||||||
* by the caller.
|
* by the caller.
|
||||||
*/
|
*/
|
||||||
@@ -246,10 +250,17 @@ HWLOC_DECLSPEC int hwloc_topology_diff_load_xml(const char *xmlpath, hwloc_topol
|
|||||||
* This identifier is usually the name of the other XML file
|
* This identifier is usually the name of the other XML file
|
||||||
* that contains the reference topology.
|
* that contains the reference topology.
|
||||||
* This attribute is given back when reading the diff from XML.
|
* This attribute is given back when reading the diff from XML.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, const char *refname, const char *xmlpath);
|
HWLOC_DECLSPEC int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, const char *refname, const char *xmlpath);
|
||||||
|
|
||||||
/** \brief Load a list of topology differences from a XML buffer.
|
/** \brief Load a list of topology differences from a XML buffer.
|
||||||
|
*
|
||||||
|
* Build a list of differences from the XML memory buffer given
|
||||||
|
* at \p xmlbuffer and of length \p buflen (including an ending \0).
|
||||||
|
* This buffer may have been filled earlier with
|
||||||
|
* hwloc_topology_diff_export_xmlbuffer().
|
||||||
*
|
*
|
||||||
* If not \c NULL, \p refname will be filled with the identifier
|
* If not \c NULL, \p refname will be filled with the identifier
|
||||||
* string of the reference topology for the difference file,
|
* string of the reference topology for the difference file,
|
||||||
@@ -257,6 +268,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, co
|
|||||||
* This identifier is usually the name of the other XML file
|
* This identifier is usually the name of the other XML file
|
||||||
* that contains the reference topology.
|
* that contains the reference topology.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
|
*
|
||||||
* \note the pointer returned in refname should later be freed
|
* \note the pointer returned in refname should later be freed
|
||||||
* by the caller.
|
* by the caller.
|
||||||
*/
|
*/
|
||||||
@@ -274,6 +287,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_load_xmlbuffer(const char *xmlbuffer, int
|
|||||||
* The returned buffer ends with a \0 that is included in the returned
|
* The returned buffer ends with a \0 that is included in the returned
|
||||||
* length.
|
* length.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
|
*
|
||||||
* \note The XML buffer should later be freed with hwloc_free_xmlbuffer().
|
* \note The XML buffer should later be freed with hwloc_free_xmlbuffer().
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_topology_diff_export_xmlbuffer(hwloc_topology_diff_t diff, const char *refname, char **xmlbuffer, int *buflen);
|
HWLOC_DECLSPEC int hwloc_topology_diff_export_xmlbuffer(hwloc_topology_diff_t diff, const char *refname, char **xmlbuffer, int *buflen);
|
||||||
|
|||||||
244
src/3rdparty/hwloc/include/hwloc/distances.h
vendored
244
src/3rdparty/hwloc/include/hwloc/distances.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2010-2020 Inria. All rights reserved.
|
* Copyright © 2010-2024 Inria. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -28,16 +28,27 @@ extern "C" {
|
|||||||
|
|
||||||
/** \brief Matrix of distances between a set of objects.
|
/** \brief Matrix of distances between a set of objects.
|
||||||
*
|
*
|
||||||
* This matrix often contains latencies between NUMA nodes
|
* The most common matrix contains latencies between NUMA nodes
|
||||||
* (as reported in the System Locality Distance Information Table (SLIT)
|
* (as reported in the System Locality Distance Information Table (SLIT)
|
||||||
* in the ACPI specification), which may or may not be physically accurate.
|
* in the ACPI specification), which may or may not be physically accurate.
|
||||||
* It corresponds to the latency for accessing the memory of one node
|
* It corresponds to the latency for accessing the memory of one node
|
||||||
* from a core in another node.
|
* from a core in another node.
|
||||||
* The corresponding kind is ::HWLOC_DISTANCES_KIND_FROM_OS | ::HWLOC_DISTANCES_KIND_FROM_USER.
|
* The corresponding kind is ::HWLOC_DISTANCES_KIND_MEANS_LATENCY | ::HWLOC_DISTANCES_KIND_FROM_USER.
|
||||||
* The name of this distances structure is "NUMALatency".
|
* The name of this distances structure is "NUMALatency".
|
||||||
*
|
*
|
||||||
* The matrix may also contain bandwidths between random sets of objects,
|
* The matrix may also contain bandwidths between random sets of objects,
|
||||||
* possibly provided by the user, as specified in the \p kind attribute.
|
* possibly provided by the user, as specified in the \p kind attribute.
|
||||||
|
* Others common distance structures include and "XGMIBandwidth", "XGMIHops",
|
||||||
|
* "XeLinkBandwidth" and "NVLinkBandwidth".
|
||||||
|
*
|
||||||
|
* Pointers \p objs and \p values should not be replaced, reallocated, freed, etc.
|
||||||
|
* However callers are allowed to modify \p kind as well as the contents
|
||||||
|
* of \p objs and \p values arrays.
|
||||||
|
* For instance, if there is a single NUMA node per Package,
|
||||||
|
* hwloc_get_obj_with_same_locality() may be used to convert between them
|
||||||
|
* and replace NUMA nodes in the \p objs array with the corresponding Packages.
|
||||||
|
* See also hwloc_distances_transform() for applying some transformations
|
||||||
|
* to the structure.
|
||||||
*/
|
*/
|
||||||
struct hwloc_distances_s {
|
struct hwloc_distances_s {
|
||||||
unsigned nbobjs; /**< \brief Number of objects described by the distance matrix. */
|
unsigned nbobjs; /**< \brief Number of objects described by the distance matrix. */
|
||||||
@@ -59,11 +70,10 @@ struct hwloc_distances_s {
|
|||||||
* The \p kind attribute of struct hwloc_distances_s is a OR'ed set
|
* The \p kind attribute of struct hwloc_distances_s is a OR'ed set
|
||||||
* of kinds.
|
* of kinds.
|
||||||
*
|
*
|
||||||
* A kind of format HWLOC_DISTANCES_KIND_FROM_* specifies where the
|
* Each distance matrix may have only one kind among HWLOC_DISTANCES_KIND_FROM_*
|
||||||
* distance information comes from, if known.
|
* specifying where distance information comes from,
|
||||||
*
|
* and one kind among HWLOC_DISTANCES_KIND_MEANS_* specifying
|
||||||
* A kind of format HWLOC_DISTANCES_KIND_MEANS_* specifies whether
|
* whether values are latencies or bandwidths.
|
||||||
* values are latencies or bandwidths, if applicable.
|
|
||||||
*/
|
*/
|
||||||
enum hwloc_distances_kind_e {
|
enum hwloc_distances_kind_e {
|
||||||
/** \brief These distances were obtained from the operating system or hardware.
|
/** \brief These distances were obtained from the operating system or hardware.
|
||||||
@@ -91,6 +101,8 @@ enum hwloc_distances_kind_e {
|
|||||||
HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH = (1UL<<3),
|
HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH = (1UL<<3),
|
||||||
|
|
||||||
/** \brief This distances structure covers objects of different types.
|
/** \brief This distances structure covers objects of different types.
|
||||||
|
* This may apply to the "NVLinkBandwidth" structure in presence
|
||||||
|
* of a NVSwitch or POWER processor NVLink port.
|
||||||
* \hideinitializer
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES = (1UL<<4)
|
HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES = (1UL<<4)
|
||||||
@@ -118,6 +130,8 @@ enum hwloc_distances_kind_e {
|
|||||||
*
|
*
|
||||||
* Each distance matrix returned in the \p distances array should be released
|
* Each distance matrix returned in the \p distances array should be released
|
||||||
* by the caller using hwloc_distances_release().
|
* by the caller using hwloc_distances_release().
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int
|
HWLOC_DECLSPEC int
|
||||||
hwloc_distances_get(hwloc_topology_t topology,
|
hwloc_distances_get(hwloc_topology_t topology,
|
||||||
@@ -127,6 +141,8 @@ hwloc_distances_get(hwloc_topology_t topology,
|
|||||||
/** \brief Retrieve distance matrices for object at a specific depth in the topology.
|
/** \brief Retrieve distance matrices for object at a specific depth in the topology.
|
||||||
*
|
*
|
||||||
* Identical to hwloc_distances_get() with the additional \p depth filter.
|
* Identical to hwloc_distances_get() with the additional \p depth filter.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int
|
HWLOC_DECLSPEC int
|
||||||
hwloc_distances_get_by_depth(hwloc_topology_t topology, int depth,
|
hwloc_distances_get_by_depth(hwloc_topology_t topology, int depth,
|
||||||
@@ -136,6 +152,8 @@ hwloc_distances_get_by_depth(hwloc_topology_t topology, int depth,
|
|||||||
/** \brief Retrieve distance matrices for object of a specific type.
|
/** \brief Retrieve distance matrices for object of a specific type.
|
||||||
*
|
*
|
||||||
* Identical to hwloc_distances_get() with the additional \p type filter.
|
* Identical to hwloc_distances_get() with the additional \p type filter.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int
|
HWLOC_DECLSPEC int
|
||||||
hwloc_distances_get_by_type(hwloc_topology_t topology, hwloc_obj_type_t type,
|
hwloc_distances_get_by_type(hwloc_topology_t topology, hwloc_obj_type_t type,
|
||||||
@@ -147,6 +165,10 @@ hwloc_distances_get_by_type(hwloc_topology_t topology, hwloc_obj_type_t type,
|
|||||||
* Usually only one distances structure may match a given name.
|
* Usually only one distances structure may match a given name.
|
||||||
*
|
*
|
||||||
* The name of the most common structure is "NUMALatency".
|
* The name of the most common structure is "NUMALatency".
|
||||||
|
* Others include "XGMIBandwidth", "XGMIHops", "XeLinkBandwidth",
|
||||||
|
* and "NVLinkBandwidth".
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int
|
HWLOC_DECLSPEC int
|
||||||
hwloc_distances_get_by_name(hwloc_topology_t topology, const char *name,
|
hwloc_distances_get_by_name(hwloc_topology_t topology, const char *name,
|
||||||
@@ -156,7 +178,12 @@ hwloc_distances_get_by_name(hwloc_topology_t topology, const char *name,
|
|||||||
/** \brief Get a description of what a distances structure contains.
|
/** \brief Get a description of what a distances structure contains.
|
||||||
*
|
*
|
||||||
* For instance "NUMALatency" for hardware-provided NUMA distances (ACPI SLIT),
|
* For instance "NUMALatency" for hardware-provided NUMA distances (ACPI SLIT),
|
||||||
* or NULL if unknown.
|
* or \c NULL if unknown.
|
||||||
|
*
|
||||||
|
* \return the constant string with the name of the distance structure.
|
||||||
|
*
|
||||||
|
* \note The returned name should not be freed by the caller,
|
||||||
|
* it belongs to the hwloc library.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC const char *
|
HWLOC_DECLSPEC const char *
|
||||||
hwloc_distances_get_name(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
hwloc_distances_get_name(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
||||||
@@ -168,6 +195,87 @@ hwloc_distances_get_name(hwloc_topology_t topology, struct hwloc_distances_s *di
|
|||||||
HWLOC_DECLSPEC void
|
HWLOC_DECLSPEC void
|
||||||
hwloc_distances_release(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
hwloc_distances_release(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
||||||
|
|
||||||
|
/** \brief Transformations of distances structures. */
|
||||||
|
enum hwloc_distances_transform_e {
|
||||||
|
/** \brief Remove \c NULL objects from the distances structure.
|
||||||
|
*
|
||||||
|
* Every object that was replaced with \c NULL in the \p objs array
|
||||||
|
* is removed and the \p values array is updated accordingly.
|
||||||
|
*
|
||||||
|
* At least \c 2 objects must remain, otherwise hwloc_distances_transform()
|
||||||
|
* will return \c -1 with \p errno set to \c EINVAL.
|
||||||
|
*
|
||||||
|
* \p kind will be updated with or without ::HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES
|
||||||
|
* according to the remaining objects.
|
||||||
|
*
|
||||||
|
* \hideinitializer
|
||||||
|
*/
|
||||||
|
HWLOC_DISTANCES_TRANSFORM_REMOVE_NULL = 0,
|
||||||
|
|
||||||
|
/** \brief Replace bandwidth values with a number of links.
|
||||||
|
*
|
||||||
|
* Usually all values will be either \c 0 (no link) or \c 1 (one link).
|
||||||
|
* However some matrices could get larger values if some pairs of
|
||||||
|
* peers are connected by different numbers of links.
|
||||||
|
*
|
||||||
|
* Values on the diagonal are set to \c 0.
|
||||||
|
*
|
||||||
|
* This transformation only applies to bandwidth matrices.
|
||||||
|
*
|
||||||
|
* \hideinitializer
|
||||||
|
*/
|
||||||
|
HWLOC_DISTANCES_TRANSFORM_LINKS = 1,
|
||||||
|
|
||||||
|
/** \brief Merge switches with multiple ports into a single object.
|
||||||
|
* This currently only applies to NVSwitches where GPUs seem connected to different
|
||||||
|
* separate switch ports in the NVLinkBandwidth matrix. This transformation will
|
||||||
|
* replace all of them with the same port connected to all GPUs.
|
||||||
|
* Other ports are removed by applying ::HWLOC_DISTANCES_TRANSFORM_REMOVE_NULL internally.
|
||||||
|
* \hideinitializer
|
||||||
|
*/
|
||||||
|
HWLOC_DISTANCES_TRANSFORM_MERGE_SWITCH_PORTS = 2,
|
||||||
|
|
||||||
|
/** \brief Apply a transitive closure to the matrix to connect objects across switches.
|
||||||
|
* This currently only applies to GPUs and NVSwitches in the NVLinkBandwidth matrix.
|
||||||
|
* All pairs of GPUs will be reported as directly connected.
|
||||||
|
* \hideinitializer
|
||||||
|
*/
|
||||||
|
HWLOC_DISTANCES_TRANSFORM_TRANSITIVE_CLOSURE = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
/** \brief Apply a transformation to a distances structure.
|
||||||
|
*
|
||||||
|
* Modify a distances structure that was previously obtained with
|
||||||
|
* hwloc_distances_get() or one of its variants.
|
||||||
|
*
|
||||||
|
* This modifies the local copy of the distances structures but does
|
||||||
|
* not modify the distances information stored inside the topology
|
||||||
|
* (retrieved by another call to hwloc_distances_get() or exported to XML).
|
||||||
|
* To do so, one should add a new distances structure with same
|
||||||
|
* name, kind, objects and values (see \ref hwlocality_distances_add)
|
||||||
|
* and then remove this old one with hwloc_distances_release_remove().
|
||||||
|
*
|
||||||
|
* \p transform must be one of the transformations listed
|
||||||
|
* in ::hwloc_distances_transform_e.
|
||||||
|
*
|
||||||
|
* These transformations may modify the contents of the \p objs or \p values arrays.
|
||||||
|
*
|
||||||
|
* \p transform_attr must be \c NULL for now.
|
||||||
|
*
|
||||||
|
* \p flags must be \c 0 for now.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error for instance if flags are invalid.
|
||||||
|
*
|
||||||
|
* \note Objects in distances array \p objs may be directly modified
|
||||||
|
* in place without using hwloc_distances_transform().
|
||||||
|
* One may use hwloc_get_obj_with_same_locality() to easily convert
|
||||||
|
* between similar objects of different types.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int hwloc_distances_transform(hwloc_topology_t topology, struct hwloc_distances_s *distances,
|
||||||
|
enum hwloc_distances_transform_e transform,
|
||||||
|
void *transform_attr,
|
||||||
|
unsigned long flags);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
@@ -178,6 +286,7 @@ hwloc_distances_release(hwloc_topology_t topology, struct hwloc_distances_s *dis
|
|||||||
|
|
||||||
/** \brief Find the index of an object in a distances structure.
|
/** \brief Find the index of an object in a distances structure.
|
||||||
*
|
*
|
||||||
|
* \return the index of the object in the distances structure if any.
|
||||||
* \return -1 if object \p obj is not involved in structure \p distances.
|
* \return -1 if object \p obj is not involved in structure \p distances.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
@@ -195,6 +304,7 @@ hwloc_distances_obj_index(struct hwloc_distances_s *distances, hwloc_obj_t obj)
|
|||||||
* The distance from \p obj1 to \p obj2 is stored in the value pointed by
|
* The distance from \p obj1 to \p obj2 is stored in the value pointed by
|
||||||
* \p value1to2 and reciprocally.
|
* \p value1to2 and reciprocally.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success.
|
||||||
* \return -1 if object \p obj1 or \p obj2 is not involved in structure \p distances.
|
* \return -1 if object \p obj1 or \p obj2 is not involved in structure \p distances.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
@@ -215,13 +325,87 @@ hwloc_distances_obj_pair_values(struct hwloc_distances_s *distances,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_distances_add Add or remove distances between objects
|
/** \defgroup hwlocality_distances_add Add distances between objects
|
||||||
|
*
|
||||||
|
* The usual way to add distances is:
|
||||||
|
* \code
|
||||||
|
* hwloc_distances_add_handle_t handle;
|
||||||
|
* int err = -1;
|
||||||
|
* handle = hwloc_distances_add_create(topology, "name", kind, 0);
|
||||||
|
* if (handle) {
|
||||||
|
* err = hwloc_distances_add_values(topology, handle, nbobjs, objs, values, 0);
|
||||||
|
* if (!err)
|
||||||
|
* err = hwloc_distances_add_commit(topology, handle, flags);
|
||||||
|
* }
|
||||||
|
* \endcode
|
||||||
|
* If \p err is \c 0 at the end, then addition was successful.
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** \brief Handle to a new distances structure during its addition to the topology. */
|
||||||
|
typedef void * hwloc_distances_add_handle_t;
|
||||||
|
|
||||||
|
/** \brief Create a new empty distances structure.
|
||||||
|
*
|
||||||
|
* Create an empty distances structure
|
||||||
|
* to be filled with hwloc_distances_add_values()
|
||||||
|
* and then committed with hwloc_distances_add_commit().
|
||||||
|
*
|
||||||
|
* Parameter \p name is optional, it may be \c NULL.
|
||||||
|
* Otherwise, it will be copied internally and may later be freed by the caller.
|
||||||
|
*
|
||||||
|
* \p kind specifies the kind of distance as a OR'ed set of ::hwloc_distances_kind_e.
|
||||||
|
* Only one kind of meaning and one kind of provenance may be given if appropriate
|
||||||
|
* (e.g. ::HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH and ::HWLOC_DISTANCES_KIND_FROM_USER).
|
||||||
|
* Kind ::HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES will be automatically set
|
||||||
|
* according to objects having different types in hwloc_distances_add_values().
|
||||||
|
*
|
||||||
|
* \p flags must be \c 0 for now.
|
||||||
|
*
|
||||||
|
* \return A hwloc_distances_add_handle_t that should then be passed
|
||||||
|
* to hwloc_distances_add_values() and hwloc_distances_add_commit().
|
||||||
|
*
|
||||||
|
* \return \c NULL on error.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC hwloc_distances_add_handle_t
|
||||||
|
hwloc_distances_add_create(hwloc_topology_t topology,
|
||||||
|
const char *name, unsigned long kind,
|
||||||
|
unsigned long flags);
|
||||||
|
|
||||||
|
/** \brief Specify the objects and values in a new empty distances structure.
|
||||||
|
*
|
||||||
|
* Specify the objects and values for a new distances structure
|
||||||
|
* that was returned as a handle by hwloc_distances_add_create().
|
||||||
|
* The structure must then be committed with hwloc_distances_add_commit().
|
||||||
|
*
|
||||||
|
* The number of objects is \p nbobjs and the array of objects is \p objs.
|
||||||
|
* Distance values are stored as a one-dimension array in \p values.
|
||||||
|
* The distance from object i to object j is in slot i*nbobjs+j.
|
||||||
|
*
|
||||||
|
* \p nbobjs must be at least 2.
|
||||||
|
*
|
||||||
|
* Arrays \p objs and \p values will be copied internally,
|
||||||
|
* they may later be freed by the caller.
|
||||||
|
*
|
||||||
|
* On error, the temporary distances structure and its content are destroyed.
|
||||||
|
*
|
||||||
|
* \p flags must be \c 0 for now.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int hwloc_distances_add_values(hwloc_topology_t topology,
|
||||||
|
hwloc_distances_add_handle_t handle,
|
||||||
|
unsigned nbobjs, hwloc_obj_t *objs,
|
||||||
|
hwloc_uint64_t *values,
|
||||||
|
unsigned long flags);
|
||||||
|
|
||||||
/** \brief Flags for adding a new distances to a topology. */
|
/** \brief Flags for adding a new distances to a topology. */
|
||||||
enum hwloc_distances_add_flag_e {
|
enum hwloc_distances_add_flag_e {
|
||||||
/** \brief Try to group objects based on the newly provided distance information.
|
/** \brief Try to group objects based on the newly provided distance information.
|
||||||
|
* Grouping is only performed when the distances structure contains latencies,
|
||||||
|
* and when all objects are of the same type.
|
||||||
* \hideinitializer
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
HWLOC_DISTANCES_ADD_FLAG_GROUP = (1UL<<0),
|
HWLOC_DISTANCES_ADD_FLAG_GROUP = (1UL<<0),
|
||||||
@@ -233,23 +417,33 @@ enum hwloc_distances_add_flag_e {
|
|||||||
HWLOC_DISTANCES_ADD_FLAG_GROUP_INACCURATE = (1UL<<1)
|
HWLOC_DISTANCES_ADD_FLAG_GROUP_INACCURATE = (1UL<<1)
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \brief Provide a new distance matrix.
|
/** \brief Commit a new distances structure.
|
||||||
*
|
*
|
||||||
* Provide the matrix of distances between a set of objects given by \p nbobjs
|
* This function finalizes the distances structure and inserts in it the topology.
|
||||||
* and the \p objs array. \p nbobjs must be at least 2.
|
|
||||||
* The distances are stored as a one-dimension array in \p values.
|
|
||||||
* 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.
|
* Parameter \p handle was previously returned by hwloc_distances_add_create().
|
||||||
* Kind ::HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES will be automatically added
|
* Then objects and values were specified with hwloc_distances_add_values().
|
||||||
* if objects of different types are given.
|
|
||||||
*
|
*
|
||||||
* \p flags configures the behavior of the function using an optional OR'ed set of
|
* \p flags configures the behavior of the function using an optional OR'ed set of
|
||||||
* ::hwloc_distances_add_flag_e.
|
* ::hwloc_distances_add_flag_e.
|
||||||
|
* It may be used to request the grouping of existing objects based on distances.
|
||||||
|
*
|
||||||
|
* On error, the temporary distances structure and its content are destroyed.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int hwloc_distances_add_commit(hwloc_topology_t topology,
|
||||||
|
hwloc_distances_add_handle_t handle,
|
||||||
|
unsigned long flags);
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** \defgroup hwlocality_distances_remove Remove distances between objects
|
||||||
|
* @{
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_distances_add(hwloc_topology_t topology,
|
|
||||||
unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t *values,
|
|
||||||
unsigned long kind, unsigned long flags);
|
|
||||||
|
|
||||||
/** \brief Remove all distance matrices from a topology.
|
/** \brief Remove all distance matrices from a topology.
|
||||||
*
|
*
|
||||||
@@ -258,18 +452,24 @@ HWLOC_DECLSPEC int hwloc_distances_add(hwloc_topology_t topology,
|
|||||||
*
|
*
|
||||||
* If these distances were used to group objects, these additional
|
* 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.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_distances_remove(hwloc_topology_t topology);
|
HWLOC_DECLSPEC int hwloc_distances_remove(hwloc_topology_t topology);
|
||||||
|
|
||||||
/** \brief Remove distance matrices for objects at a specific depth in the topology.
|
/** \brief Remove distance matrices for objects at a specific depth in the topology.
|
||||||
*
|
*
|
||||||
* Identical to hwloc_distances_remove() but only applies to one level of the topology.
|
* Identical to hwloc_distances_remove() but only applies to one level of the topology.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_distances_remove_by_depth(hwloc_topology_t topology, int depth);
|
HWLOC_DECLSPEC int hwloc_distances_remove_by_depth(hwloc_topology_t topology, int depth);
|
||||||
|
|
||||||
/** \brief Remove distance matrices for objects of a specific type in the topology.
|
/** \brief Remove distance matrices for objects of a specific type in the topology.
|
||||||
*
|
*
|
||||||
* Identical to hwloc_distances_remove() but only applies to one level of the topology.
|
* Identical to hwloc_distances_remove() but only applies to one level of the topology.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_distances_remove_by_type(hwloc_topology_t topology, hwloc_obj_type_t type)
|
hwloc_distances_remove_by_type(hwloc_topology_t topology, hwloc_obj_type_t type)
|
||||||
@@ -283,6 +483,8 @@ hwloc_distances_remove_by_type(hwloc_topology_t topology, hwloc_obj_type_t type)
|
|||||||
/** \brief Release and remove the given distance matrice from the topology.
|
/** \brief Release and remove the given distance matrice from the topology.
|
||||||
*
|
*
|
||||||
* This function includes a call to hwloc_distances_release().
|
* This function includes a call to hwloc_distances_release().
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_distances_release_remove(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
HWLOC_DECLSPEC int hwloc_distances_release_remove(hwloc_topology_t topology, struct hwloc_distances_s *distances);
|
||||||
|
|
||||||
|
|||||||
16
src/3rdparty/hwloc/include/hwloc/export.h
vendored
16
src/3rdparty/hwloc/include/hwloc/export.h
vendored
@@ -55,7 +55,7 @@ enum hwloc_topology_export_xml_flags_e {
|
|||||||
*
|
*
|
||||||
* \p flags is a OR'ed set of ::hwloc_topology_export_xml_flags_e.
|
* \p flags is a OR'ed set of ::hwloc_topology_export_xml_flags_e.
|
||||||
*
|
*
|
||||||
* \return -1 if a failure occured.
|
* \return 0 on success, or -1 on error.
|
||||||
*
|
*
|
||||||
* \note See also hwloc_topology_set_userdata_export_callback()
|
* \note See also hwloc_topology_set_userdata_export_callback()
|
||||||
* for exporting application-specific object userdata.
|
* for exporting application-specific object userdata.
|
||||||
@@ -91,7 +91,7 @@ HWLOC_DECLSPEC int hwloc_topology_export_xml(hwloc_topology_t topology, const ch
|
|||||||
*
|
*
|
||||||
* \p flags is a OR'ed set of ::hwloc_topology_export_xml_flags_e.
|
* \p flags is a OR'ed set of ::hwloc_topology_export_xml_flags_e.
|
||||||
*
|
*
|
||||||
* \return -1 if a failure occured.
|
* \return 0 on success, or -1 on error.
|
||||||
*
|
*
|
||||||
* \note See also hwloc_topology_set_userdata_export_callback()
|
* \note See also hwloc_topology_set_userdata_export_callback()
|
||||||
* for exporting application-specific object userdata.
|
* for exporting application-specific object userdata.
|
||||||
@@ -145,13 +145,15 @@ HWLOC_DECLSPEC void hwloc_topology_set_userdata_export_callback(hwloc_topology_t
|
|||||||
* that were given to the export callback.
|
* that were given to the export callback.
|
||||||
*
|
*
|
||||||
* Only printable characters may be exported to XML string attributes.
|
* Only printable characters may be exported to XML string attributes.
|
||||||
* If a non-printable character is passed in \p name or \p buffer,
|
|
||||||
* the function returns -1 with errno set to EINVAL.
|
|
||||||
*
|
*
|
||||||
* If exporting binary data, the application should first encode into
|
* If exporting binary data, the application should first encode into
|
||||||
* printable characters only (or use hwloc_export_obj_userdata_base64()).
|
* printable characters only (or use hwloc_export_obj_userdata_base64()).
|
||||||
* It should also take care of portability issues if the export may
|
* It should also take care of portability issues if the export may
|
||||||
* be reimported on a different architecture.
|
* be reimported on a different architecture.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c EINVAL if a non-printable character is
|
||||||
|
* passed in \p name or \b buffer.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_export_obj_userdata(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length);
|
HWLOC_DECLSPEC int hwloc_export_obj_userdata(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length);
|
||||||
|
|
||||||
@@ -165,8 +167,14 @@ HWLOC_DECLSPEC int hwloc_export_obj_userdata(void *reserved, hwloc_topology_t to
|
|||||||
* This function may only be called from within the export() callback passed
|
* This function may only be called from within the export() callback passed
|
||||||
* to hwloc_topology_set_userdata_export_callback().
|
* to hwloc_topology_set_userdata_export_callback().
|
||||||
*
|
*
|
||||||
|
* The name must be made of printable characters for export to XML string attributes.
|
||||||
|
*
|
||||||
* The function does not take care of portability issues if the export
|
* The function does not take care of portability issues if the export
|
||||||
* may be reimported on a different architecture.
|
* may be reimported on a different architecture.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c EINVAL if a non-printable character is
|
||||||
|
* passed in \p name.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_export_obj_userdata_base64(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length);
|
HWLOC_DECLSPEC int hwloc_export_obj_userdata_base64(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length);
|
||||||
|
|
||||||
|
|||||||
16
src/3rdparty/hwloc/include/hwloc/gl.h
vendored
16
src/3rdparty/hwloc/include/hwloc/gl.h
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2012 Blue Brain Project, EPFL. All rights reserved.
|
* Copyright © 2012 Blue Brain Project, EPFL. All rights reserved.
|
||||||
* Copyright © 2012-2013 Inria. All rights reserved.
|
* Copyright © 2012-2023 Inria. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -39,9 +39,9 @@ extern "C" {
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the
|
/** \brief Get the hwloc OS device object corresponding to the
|
||||||
* OpenGL display given by port and device index.
|
* OpenGL display given by port and device index.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the OpenGL display
|
* \return The hwloc OS device object describing the OpenGL display
|
||||||
* whose port (server) is \p port and device (screen) is \p device.
|
* whose port (server) is \p port and device (screen) is \p device.
|
||||||
* Return NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
* machine. For instance the topology may be an XML import of a remote host.
|
||||||
@@ -70,9 +70,9 @@ hwloc_gl_get_display_osdev_by_port_device(hwloc_topology_t topology,
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the
|
/** \brief Get the hwloc OS device object corresponding to the
|
||||||
* OpenGL display given by name.
|
* OpenGL display given by name.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the OpenGL display
|
* \return The hwloc OS device object describing the OpenGL display
|
||||||
* whose name is \p name, built as ":port.device" such as ":0.0" .
|
* whose name is \p name, built as ":port.device" such as ":0.0" .
|
||||||
* Return NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
* machine. For instance the topology may be an XML import of a remote host.
|
||||||
@@ -99,9 +99,11 @@ hwloc_gl_get_display_osdev_by_name(hwloc_topology_t topology,
|
|||||||
/** \brief Get the OpenGL display port and device corresponding
|
/** \brief Get the OpenGL display port and device corresponding
|
||||||
* to the given hwloc OS object.
|
* to the given hwloc OS object.
|
||||||
*
|
*
|
||||||
* Return the OpenGL display port (server) in \p port and device (screen)
|
* Retrieves the OpenGL display port (server) in \p port and device (screen)
|
||||||
* in \p screen that correspond to the given hwloc OS device object.
|
* in \p screen that correspond to the given hwloc OS device object.
|
||||||
* Return \c -1 if there is none.
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 if none could be found.
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
* machine. For instance the topology may be an XML import of a remote host.
|
||||||
|
|||||||
13
src/3rdparty/hwloc/include/hwloc/glibc-sched.h
vendored
13
src/3rdparty/hwloc/include/hwloc/glibc-sched.h
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009 CNRS
|
* Copyright © 2009 CNRS
|
||||||
* Copyright © 2009-2020 Inria. All rights reserved.
|
* Copyright © 2009-2023 Inria. All rights reserved.
|
||||||
* Copyright © 2009-2011 Université Bordeaux
|
* Copyright © 2009-2011 Université Bordeaux
|
||||||
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -52,6 +52,8 @@ extern "C" {
|
|||||||
* that takes a cpu_set_t as input parameter.
|
* that takes a cpu_set_t as input parameter.
|
||||||
*
|
*
|
||||||
* \p schedsetsize should be sizeof(cpu_set_t) unless \p schedset was dynamically allocated with CPU_ALLOC
|
* \p schedsetsize should be sizeof(cpu_set_t) unless \p schedset was dynamically allocated with CPU_ALLOC
|
||||||
|
*
|
||||||
|
* \return 0.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cpuset_to_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_const_cpuset_t hwlocset,
|
hwloc_cpuset_to_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_const_cpuset_t hwlocset,
|
||||||
@@ -80,6 +82,9 @@ hwloc_cpuset_to_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribute
|
|||||||
* that takes a cpu_set_t as input parameter.
|
* that takes a cpu_set_t as input parameter.
|
||||||
*
|
*
|
||||||
* \p schedsetsize should be sizeof(cpu_set_t) unless \p schedset was dynamically allocated with CPU_ALLOC
|
* \p schedsetsize should be sizeof(cpu_set_t) unless \p schedset was dynamically allocated with CPU_ALLOC
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c ENOMEM if some internal reallocation failed.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cpuset_from_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_cpuset_t hwlocset,
|
hwloc_cpuset_from_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_cpuset_t hwlocset,
|
||||||
@@ -95,7 +100,8 @@ hwloc_cpuset_from_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribu
|
|||||||
cpu = 0;
|
cpu = 0;
|
||||||
while (count) {
|
while (count) {
|
||||||
if (CPU_ISSET_S(cpu, schedsetsize, schedset)) {
|
if (CPU_ISSET_S(cpu, schedsetsize, schedset)) {
|
||||||
hwloc_bitmap_set(hwlocset, cpu);
|
if (hwloc_bitmap_set(hwlocset, cpu) < 0)
|
||||||
|
return -1;
|
||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
cpu++;
|
cpu++;
|
||||||
@@ -107,7 +113,8 @@ hwloc_cpuset_from_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribu
|
|||||||
assert(schedsetsize == sizeof(cpu_set_t));
|
assert(schedsetsize == sizeof(cpu_set_t));
|
||||||
for(cpu=0; cpu<CPU_SETSIZE; cpu++)
|
for(cpu=0; cpu<CPU_SETSIZE; cpu++)
|
||||||
if (CPU_ISSET(cpu, schedset))
|
if (CPU_ISSET(cpu, schedset))
|
||||||
hwloc_bitmap_set(hwlocset, cpu);
|
if (hwloc_bitmap_set(hwlocset, cpu) < 0)
|
||||||
|
return -1;
|
||||||
#endif /* !CPU_ZERO_S */
|
#endif /* !CPU_ZERO_S */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
1095
src/3rdparty/hwloc/include/hwloc/helper.h
vendored
1095
src/3rdparty/hwloc/include/hwloc/helper.h
vendored
File diff suppressed because it is too large
Load Diff
136
src/3rdparty/hwloc/include/hwloc/intel-mic.h
vendored
136
src/3rdparty/hwloc/include/hwloc/intel-mic.h
vendored
@@ -1,136 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2013-2016 Inria. All rights reserved.
|
|
||||||
* See COPYING in top-level directory.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** \file
|
|
||||||
* \brief Macros to help interaction between hwloc and Intel Xeon Phi (MIC).
|
|
||||||
*
|
|
||||||
* Applications that use both hwloc and Intel Xeon Phi (MIC) may want to
|
|
||||||
* include this file so as to get topology information for MIC devices.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef HWLOC_INTEL_MIC_H
|
|
||||||
#define HWLOC_INTEL_MIC_H
|
|
||||||
|
|
||||||
#include "hwloc.h"
|
|
||||||
#include "hwloc/autogen/config.h"
|
|
||||||
#include "hwloc/helper.h"
|
|
||||||
|
|
||||||
#ifdef HWLOC_LINUX_SYS
|
|
||||||
#include "hwloc/linux.h"
|
|
||||||
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <string.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_intel_mic Interoperability with Intel Xeon Phi (MIC)
|
|
||||||
*
|
|
||||||
* This interface offers ways to retrieve topology information about
|
|
||||||
* Intel Xeon Phi (MIC) devices.
|
|
||||||
*
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** \brief Get the CPU set of logical processors that are physically
|
|
||||||
* close to MIC device whose index is \p idx.
|
|
||||||
*
|
|
||||||
* Return the CPU set describing the locality of the MIC device whose index is \p idx.
|
|
||||||
*
|
|
||||||
* Topology \p topology and device index \p idx must match the local machine.
|
|
||||||
* I/O devices detection is not needed in the topology.
|
|
||||||
*
|
|
||||||
* The function only returns the locality of the device.
|
|
||||||
* If more information about the device is needed, OS objects should
|
|
||||||
* be used instead, see hwloc_intel_mic_get_device_osdev_by_index().
|
|
||||||
*
|
|
||||||
* This function is currently only implemented in a meaningful way for
|
|
||||||
* Linux; other systems will simply get a full cpuset.
|
|
||||||
*/
|
|
||||||
static __hwloc_inline int
|
|
||||||
hwloc_intel_mic_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
|
||||||
int idx __hwloc_attribute_unused,
|
|
||||||
hwloc_cpuset_t set)
|
|
||||||
{
|
|
||||||
#ifdef HWLOC_LINUX_SYS
|
|
||||||
/* If we're on Linux, use the sysfs mechanism to get the local cpus */
|
|
||||||
#define HWLOC_INTEL_MIC_DEVICE_SYSFS_PATH_MAX 128
|
|
||||||
char path[HWLOC_INTEL_MIC_DEVICE_SYSFS_PATH_MAX];
|
|
||||||
DIR *sysdir = NULL;
|
|
||||||
struct dirent *dirent;
|
|
||||||
unsigned pcibus, pcidev, pcifunc;
|
|
||||||
|
|
||||||
if (!hwloc_topology_is_thissystem(topology)) {
|
|
||||||
errno = EINVAL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf(path, "/sys/class/mic/mic%d", idx);
|
|
||||||
sysdir = opendir(path);
|
|
||||||
if (!sysdir)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
while ((dirent = readdir(sysdir)) != NULL) {
|
|
||||||
if (sscanf(dirent->d_name, "pci_%02x:%02x.%02x", &pcibus, &pcidev, &pcifunc) == 3) {
|
|
||||||
sprintf(path, "/sys/class/mic/mic%d/pci_%02x:%02x.%02x/local_cpus", idx, 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));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir(sysdir);
|
|
||||||
#else
|
|
||||||
/* Non-Linux systems simply get a full cpuset */
|
|
||||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** \brief Get the hwloc OS device object corresponding to the
|
|
||||||
* MIC device for the given index.
|
|
||||||
*
|
|
||||||
* Return the OS device object describing the MIC device whose index is \p idx.
|
|
||||||
* Return NULL if there is none.
|
|
||||||
*
|
|
||||||
* The topology \p topology does not necessarily have to match the current
|
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
|
||||||
* I/O devices detection must be enabled in the topology.
|
|
||||||
*
|
|
||||||
* \note The corresponding PCI device object can be obtained by looking
|
|
||||||
* at the OS device parent object.
|
|
||||||
*/
|
|
||||||
static __hwloc_inline hwloc_obj_t
|
|
||||||
hwloc_intel_mic_get_device_osdev_by_index(hwloc_topology_t topology,
|
|
||||||
unsigned idx)
|
|
||||||
{
|
|
||||||
hwloc_obj_t osdev = NULL;
|
|
||||||
while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
|
|
||||||
if (HWLOC_OBJ_OSDEV_COPROC == osdev->attr->osdev.type
|
|
||||||
&& osdev->name
|
|
||||||
&& !strncmp("mic", osdev->name, 3)
|
|
||||||
&& atoi(osdev->name + 3) == (int) idx)
|
|
||||||
return osdev;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* HWLOC_INTEL_MIC_H */
|
|
||||||
161
src/3rdparty/hwloc/include/hwloc/levelzero.h
vendored
Normal file
161
src/3rdparty/hwloc/include/hwloc/levelzero.h
vendored
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2021-2023 Inria. All rights reserved.
|
||||||
|
* See COPYING in top-level directory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** \file
|
||||||
|
* \brief Macros to help interaction between hwloc and the oneAPI Level Zero interface.
|
||||||
|
*
|
||||||
|
* Applications that use both hwloc and Level Zero may want to
|
||||||
|
* include this file so as to get topology information for L0 devices.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HWLOC_LEVELZERO_H
|
||||||
|
#define HWLOC_LEVELZERO_H
|
||||||
|
|
||||||
|
#include "hwloc.h"
|
||||||
|
#include "hwloc/autogen/config.h"
|
||||||
|
#include "hwloc/helper.h"
|
||||||
|
#ifdef HWLOC_LINUX_SYS
|
||||||
|
#include "hwloc/linux.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <level_zero/ze_api.h>
|
||||||
|
#include <level_zero/zes_api.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/** \defgroup hwlocality_levelzero Interoperability with the oneAPI Level Zero interface.
|
||||||
|
*
|
||||||
|
* This interface offers ways to retrieve topology information about
|
||||||
|
* devices managed by the Level Zero API.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** \brief Get the CPU set of logical processors that are physically
|
||||||
|
* close to the Level Zero device \p device
|
||||||
|
*
|
||||||
|
* Store in \p set the CPU-set describing the locality of
|
||||||
|
* the Level Zero device \p device.
|
||||||
|
*
|
||||||
|
* Topology \p topology and device \p device must match the local machine.
|
||||||
|
* The Level Zero library must have been initialized with Sysman enabled
|
||||||
|
* (by calling zesInit(0) if supported,
|
||||||
|
* or by setting ZES_ENABLE_SYSMAN=1 in the environment).
|
||||||
|
* I/O devices detection and the Level Zero component are not needed in the
|
||||||
|
* topology.
|
||||||
|
*
|
||||||
|
* The function only returns the locality of the device.
|
||||||
|
* If more information about the device is needed, OS objects should
|
||||||
|
* be used instead, see hwloc_levelzero_get_device_osdev().
|
||||||
|
*
|
||||||
|
* This function is currently only implemented in a meaningful way for
|
||||||
|
* Linux; other systems will simply get a full cpuset.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
|
*/
|
||||||
|
static __hwloc_inline int
|
||||||
|
hwloc_levelzero_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
|
ze_device_handle_t device, hwloc_cpuset_t set)
|
||||||
|
{
|
||||||
|
#ifdef HWLOC_LINUX_SYS
|
||||||
|
/* If we're on Linux, use the sysfs mechanism to get the local cpus */
|
||||||
|
#define HWLOC_LEVELZERO_DEVICE_SYSFS_PATH_MAX 128
|
||||||
|
char path[HWLOC_LEVELZERO_DEVICE_SYSFS_PATH_MAX];
|
||||||
|
zes_pci_properties_t pci;
|
||||||
|
zes_device_handle_t sdevice = device;
|
||||||
|
ze_result_t res;
|
||||||
|
|
||||||
|
if (!hwloc_topology_is_thissystem(topology)) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
res = zesDevicePciGetProperties(sdevice, &pci);
|
||||||
|
if (res != ZE_RESULT_SUCCESS) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sprintf(path, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/local_cpus",
|
||||||
|
pci.address.domain, pci.address.bus, pci.address.device, pci.address.function);
|
||||||
|
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 systems simply get a full cpuset */
|
||||||
|
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Get the hwloc OS device object corresponding to Level Zero device
|
||||||
|
* \p device.
|
||||||
|
*
|
||||||
|
* \return The hwloc OS device object that describes the given Level Zero device \p device.
|
||||||
|
* \return \c NULL if none could be found.
|
||||||
|
*
|
||||||
|
* Topology \p topology and device \p dv_ind must match the local machine.
|
||||||
|
* I/O devices detection and the Level Zero component must be enabled in the
|
||||||
|
* topology. If not, the locality of the object may still be found using
|
||||||
|
* hwloc_levelzero_get_device_cpuset().
|
||||||
|
*
|
||||||
|
* \note The corresponding hwloc PCI device may be found by looking
|
||||||
|
* at the result parent pointer (unless PCI devices are filtered out).
|
||||||
|
*/
|
||||||
|
static __hwloc_inline hwloc_obj_t
|
||||||
|
hwloc_levelzero_get_device_osdev(hwloc_topology_t topology, ze_device_handle_t device)
|
||||||
|
{
|
||||||
|
zes_device_handle_t sdevice = device;
|
||||||
|
zes_pci_properties_t pci;
|
||||||
|
ze_result_t res;
|
||||||
|
hwloc_obj_t osdev;
|
||||||
|
|
||||||
|
if (!hwloc_topology_is_thissystem(topology)) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
res = zesDevicePciGetProperties(sdevice, &pci);
|
||||||
|
if (res != ZE_RESULT_SUCCESS) {
|
||||||
|
/* L0 was likely initialized without sysman, don't bother */
|
||||||
|
errno = EINVAL;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
osdev = NULL;
|
||||||
|
while ((osdev = hwloc_get_next_osdev(topology, osdev)) != NULL) {
|
||||||
|
hwloc_obj_t pcidev = osdev->parent;
|
||||||
|
|
||||||
|
if (strncmp(osdev->name, "ze", 2))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (pcidev
|
||||||
|
&& pcidev->type == HWLOC_OBJ_PCI_DEVICE
|
||||||
|
&& pcidev->attr->pcidev.domain == pci.address.domain
|
||||||
|
&& pcidev->attr->pcidev.bus == pci.address.bus
|
||||||
|
&& pcidev->attr->pcidev.dev == pci.address.device
|
||||||
|
&& pcidev->attr->pcidev.func == pci.address.function)
|
||||||
|
return osdev;
|
||||||
|
|
||||||
|
/* FIXME: when we'll have serialnumber, try it in case PCI is filtered-out */
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* HWLOC_LEVELZERO_H */
|
||||||
34
src/3rdparty/hwloc/include/hwloc/linux-libnuma.h
vendored
34
src/3rdparty/hwloc/include/hwloc/linux-libnuma.h
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009 CNRS
|
* Copyright © 2009 CNRS
|
||||||
* Copyright © 2009-2017 Inria. All rights reserved.
|
* Copyright © 2009-2023 Inria. All rights reserved.
|
||||||
* Copyright © 2009-2010, 2012 Université Bordeaux
|
* Copyright © 2009-2010, 2012 Université Bordeaux
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
@@ -50,6 +50,8 @@ extern "C" {
|
|||||||
* This function may be used before calling set_mempolicy, mbind, migrate_pages
|
* This function may be used before calling set_mempolicy, mbind, migrate_pages
|
||||||
* or any other function that takes an array of unsigned long and a maximal
|
* or any other function that takes an array of unsigned long and a maximal
|
||||||
* node number as input parameter.
|
* node number as input parameter.
|
||||||
|
*
|
||||||
|
* \return 0.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cpuset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset,
|
hwloc_cpuset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset,
|
||||||
@@ -84,6 +86,8 @@ hwloc_cpuset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_cpus
|
|||||||
* This function may be used before calling set_mempolicy, mbind, migrate_pages
|
* This function may be used before calling set_mempolicy, mbind, migrate_pages
|
||||||
* or any other function that takes an array of unsigned long and a maximal
|
* or any other function that takes an array of unsigned long and a maximal
|
||||||
* node number as input parameter.
|
* node number as input parameter.
|
||||||
|
*
|
||||||
|
* \return 0.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_nodeset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset,
|
hwloc_nodeset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset,
|
||||||
@@ -119,6 +123,9 @@ hwloc_nodeset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_nod
|
|||||||
* This function may be used after calling get_mempolicy or any other function
|
* This function may be used after calling get_mempolicy or any other function
|
||||||
* that takes an array of unsigned long as output parameter (and possibly
|
* that takes an array of unsigned long as output parameter (and possibly
|
||||||
* a maximal node number as input parameter).
|
* a maximal node number as input parameter).
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if failing an internal reallocation.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cpuset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_cpuset_t cpuset,
|
hwloc_cpuset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_cpuset_t cpuset,
|
||||||
@@ -130,7 +137,8 @@ hwloc_cpuset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_cpuset_t
|
|||||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||||
if (node->os_index < maxnode
|
if (node->os_index < maxnode
|
||||||
&& (mask[node->os_index/sizeof(*mask)/8] & (1UL << (node->os_index % (sizeof(*mask)*8)))))
|
&& (mask[node->os_index/sizeof(*mask)/8] & (1UL << (node->os_index % (sizeof(*mask)*8)))))
|
||||||
hwloc_bitmap_or(cpuset, cpuset, node->cpuset);
|
if (hwloc_bitmap_or(cpuset, cpuset, node->cpuset) < 0)
|
||||||
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,6 +150,9 @@ hwloc_cpuset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_cpuset_t
|
|||||||
* This function may be used after calling get_mempolicy or any other function
|
* This function may be used after calling get_mempolicy or any other function
|
||||||
* that takes an array of unsigned long as output parameter (and possibly
|
* that takes an array of unsigned long as output parameter (and possibly
|
||||||
* a maximal node number as input parameter).
|
* a maximal node number as input parameter).
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c ENOMEM if some internal reallocation failed.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_nodeset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_nodeset_t nodeset,
|
hwloc_nodeset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_nodeset_t nodeset,
|
||||||
@@ -153,7 +164,8 @@ hwloc_nodeset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_nodeset
|
|||||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||||
if (node->os_index < maxnode
|
if (node->os_index < maxnode
|
||||||
&& (mask[node->os_index/sizeof(*mask)/8] & (1UL << (node->os_index % (sizeof(*mask)*8)))))
|
&& (mask[node->os_index/sizeof(*mask)/8] & (1UL << (node->os_index % (sizeof(*mask)*8)))))
|
||||||
hwloc_bitmap_set(nodeset, node->os_index);
|
if (hwloc_bitmap_set(nodeset, node->os_index) < 0)
|
||||||
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +196,7 @@ hwloc_nodeset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_nodeset
|
|||||||
* This function may be used before calling many numa_ functions
|
* This function may be used before calling many numa_ functions
|
||||||
* that use a struct bitmask as an input parameter.
|
* that use a struct bitmask as an input parameter.
|
||||||
*
|
*
|
||||||
* \return newly allocated struct bitmask.
|
* \return newly allocated struct bitmask, or \c NULL on error.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline struct bitmask *
|
static __hwloc_inline struct bitmask *
|
||||||
hwloc_cpuset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset) __hwloc_attribute_malloc;
|
hwloc_cpuset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset) __hwloc_attribute_malloc;
|
||||||
@@ -209,7 +221,7 @@ hwloc_cpuset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_cpu
|
|||||||
* This function may be used before calling many numa_ functions
|
* This function may be used before calling many numa_ functions
|
||||||
* that use a struct bitmask as an input parameter.
|
* that use a struct bitmask as an input parameter.
|
||||||
*
|
*
|
||||||
* \return newly allocated struct bitmask.
|
* \return newly allocated struct bitmask, or \c NULL on error.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline struct bitmask *
|
static __hwloc_inline struct bitmask *
|
||||||
hwloc_nodeset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset) __hwloc_attribute_malloc;
|
hwloc_nodeset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset) __hwloc_attribute_malloc;
|
||||||
@@ -231,6 +243,9 @@ hwloc_nodeset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_no
|
|||||||
*
|
*
|
||||||
* This function may be used after calling many numa_ functions
|
* This function may be used after calling many numa_ functions
|
||||||
* that use a struct bitmask as an output parameter.
|
* that use a struct bitmask as an output parameter.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c ENOMEM if some internal reallocation failed.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_cpuset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_cpuset_t cpuset,
|
hwloc_cpuset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_cpuset_t cpuset,
|
||||||
@@ -241,7 +256,8 @@ hwloc_cpuset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_cpuset_
|
|||||||
hwloc_bitmap_zero(cpuset);
|
hwloc_bitmap_zero(cpuset);
|
||||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||||
if (numa_bitmask_isbitset(bitmask, node->os_index))
|
if (numa_bitmask_isbitset(bitmask, node->os_index))
|
||||||
hwloc_bitmap_or(cpuset, cpuset, node->cpuset);
|
if (hwloc_bitmap_or(cpuset, cpuset, node->cpuset) < 0)
|
||||||
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,6 +265,9 @@ hwloc_cpuset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_cpuset_
|
|||||||
*
|
*
|
||||||
* This function may be used after calling many numa_ functions
|
* This function may be used after calling many numa_ functions
|
||||||
* that use a struct bitmask as an output parameter.
|
* that use a struct bitmask as an output parameter.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c ENOMEM if some internal reallocation failed.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_nodeset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_nodeset_t nodeset,
|
hwloc_nodeset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_nodeset_t nodeset,
|
||||||
@@ -259,7 +278,8 @@ hwloc_nodeset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_nodese
|
|||||||
hwloc_bitmap_zero(nodeset);
|
hwloc_bitmap_zero(nodeset);
|
||||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||||
if (numa_bitmask_isbitset(bitmask, node->os_index))
|
if (numa_bitmask_isbitset(bitmask, node->os_index))
|
||||||
hwloc_bitmap_set(nodeset, node->os_index);
|
if (hwloc_bitmap_set(nodeset, node->os_index) < 0)
|
||||||
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
17
src/3rdparty/hwloc/include/hwloc/linux.h
vendored
17
src/3rdparty/hwloc/include/hwloc/linux.h
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009 CNRS
|
* Copyright © 2009 CNRS
|
||||||
* Copyright © 2009-2016 Inria. All rights reserved.
|
* Copyright © 2009-2023 Inria. All rights reserved.
|
||||||
* Copyright © 2009-2011 Université Bordeaux
|
* Copyright © 2009-2011 Université Bordeaux
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
@@ -38,22 +38,35 @@ extern "C" {
|
|||||||
* The behavior is exactly the same as the Linux sched_setaffinity system call,
|
* The behavior is exactly the same as the Linux sched_setaffinity system call,
|
||||||
* but uses a hwloc cpuset.
|
* but uses a hwloc cpuset.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
|
*
|
||||||
* \note This is equivalent to calling hwloc_set_proc_cpubind() with
|
* \note This is equivalent to calling hwloc_set_proc_cpubind() with
|
||||||
* HWLOC_CPUBIND_THREAD as flags.
|
* HWLOC_CPUBIND_THREAD as flags.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set);
|
HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set);
|
||||||
|
|
||||||
/** \brief Get the current binding of thread \p tid
|
/** \brief Get the current binding of thread \p tid
|
||||||
|
*
|
||||||
|
* The CPU-set \p set (previously allocated by the caller)
|
||||||
|
* is filled with the list of PUs which the thread
|
||||||
|
* was last bound to.
|
||||||
*
|
*
|
||||||
* The behavior is exactly the same as the Linux sched_getaffinity system call,
|
* The behavior is exactly the same as the Linux sched_getaffinity system call,
|
||||||
* but uses a hwloc cpuset.
|
* but uses a hwloc cpuset.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
|
*
|
||||||
* \note This is equivalent to calling hwloc_get_proc_cpubind() with
|
* \note This is equivalent to calling hwloc_get_proc_cpubind() with
|
||||||
* ::HWLOC_CPUBIND_THREAD as flags.
|
* ::HWLOC_CPUBIND_THREAD as flags.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);
|
HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);
|
||||||
|
|
||||||
/** \brief Get the last physical CPU where thread \p tid ran.
|
/** \brief Get the last physical CPU where thread \p tid ran.
|
||||||
|
*
|
||||||
|
* The CPU-set \p set (previously allocated by the caller)
|
||||||
|
* is filled with the PU which the thread last ran on.
|
||||||
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
*
|
*
|
||||||
* \note This is equivalent to calling hwloc_get_proc_last_cpu_location() with
|
* \note This is equivalent to calling hwloc_get_proc_last_cpu_location() with
|
||||||
* ::HWLOC_CPUBIND_THREAD as flags.
|
* ::HWLOC_CPUBIND_THREAD as flags.
|
||||||
@@ -65,6 +78,8 @@ HWLOC_DECLSPEC int hwloc_linux_get_tid_last_cpu_location(hwloc_topology_t topolo
|
|||||||
* Might be used when reading CPU set from sysfs attributes such as topology
|
* Might be used when reading CPU set from sysfs attributes such as topology
|
||||||
* and caches for processors, or local_cpus for devices.
|
* and caches for processors, or local_cpus for devices.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success, -1 on error.
|
||||||
|
*
|
||||||
* \note This function ignores the HWLOC_FSROOT environment variable.
|
* \note This function ignores the HWLOC_FSROOT environment variable.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_linux_read_path_as_cpumask(const char *path, hwloc_bitmap_t set);
|
HWLOC_DECLSPEC int hwloc_linux_read_path_as_cpumask(const char *path, hwloc_bitmap_t set);
|
||||||
|
|||||||
355
src/3rdparty/hwloc/include/hwloc/memattrs.h
vendored
355
src/3rdparty/hwloc/include/hwloc/memattrs.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2019-2020 Inria. All rights reserved.
|
* Copyright © 2019-2024 Inria. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -54,6 +54,12 @@ extern "C" {
|
|||||||
* Attribute values for these nodes, if any, may then be obtained with
|
* Attribute values for these nodes, if any, may then be obtained with
|
||||||
* hwloc_memattr_get_value() and manually compared with the desired criteria.
|
* hwloc_memattr_get_value() and manually compared with the desired criteria.
|
||||||
*
|
*
|
||||||
|
* Memory attributes are also used internally to build Memory Tiers which provide
|
||||||
|
* an easy way to distinguish NUMA nodes of different kinds, as explained
|
||||||
|
* in \ref heteromem.
|
||||||
|
*
|
||||||
|
* \sa An example is available in doc/examples/memory-attributes.c in the source tree.
|
||||||
|
*
|
||||||
* \note The API also supports specific objects as initiator,
|
* \note The API also supports specific objects as initiator,
|
||||||
* but it is currently not used internally by hwloc.
|
* but it is currently not used internally by hwloc.
|
||||||
* Users may for instance use it to provide custom performance
|
* Users may for instance use it to provide custom performance
|
||||||
@@ -63,21 +69,26 @@ extern "C" {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \brief Memory node attributes. */
|
/** \brief Predefined memory attribute IDs.
|
||||||
|
* See ::hwloc_memattr_id_t for the generic definition of IDs
|
||||||
|
* for predefined or custom attributes.
|
||||||
|
*/
|
||||||
enum hwloc_memattr_id_e {
|
enum hwloc_memattr_id_e {
|
||||||
/** \brief "Capacity".
|
/** \brief
|
||||||
* The capacity is returned in bytes
|
* The \"Capacity\" is returned in bytes (local_memory attribute in objects).
|
||||||
* (local_memory attribute in objects).
|
|
||||||
*
|
*
|
||||||
* Best capacity nodes are nodes with <b>higher capacity</b>.
|
* Best capacity nodes are nodes with <b>higher capacity</b>.
|
||||||
*
|
*
|
||||||
* No initiator is involved when looking at this attribute.
|
* No initiator is involved when looking at this attribute.
|
||||||
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST.
|
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST.
|
||||||
|
*
|
||||||
|
* Capacity values may not be modified using hwloc_memattr_set_value().
|
||||||
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
HWLOC_MEMATTR_ID_CAPACITY = 0,
|
HWLOC_MEMATTR_ID_CAPACITY = 0,
|
||||||
|
|
||||||
/** \brief "Locality".
|
/** \brief
|
||||||
* The locality is returned as the number of PUs in that locality
|
* The \"Locality\" is returned as the number of PUs in that locality
|
||||||
* (e.g. the weight of its cpuset).
|
* (e.g. the weight of its cpuset).
|
||||||
*
|
*
|
||||||
* Best locality nodes are nodes with <b>smaller locality</b>
|
* Best locality nodes are nodes with <b>smaller locality</b>
|
||||||
@@ -87,34 +98,108 @@ enum hwloc_memattr_id_e {
|
|||||||
*
|
*
|
||||||
* No initiator is involved when looking at this attribute.
|
* No initiator is involved when looking at this attribute.
|
||||||
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST.
|
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST.
|
||||||
|
|
||||||
|
* Locality values may not be modified using hwloc_memattr_set_value().
|
||||||
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
HWLOC_MEMATTR_ID_LOCALITY = 1,
|
HWLOC_MEMATTR_ID_LOCALITY = 1,
|
||||||
|
|
||||||
/** \brief "Bandwidth".
|
/** \brief
|
||||||
* The bandwidth is returned in MiB/s, as seen from the given initiator location.
|
* The \"Bandwidth\" is returned in MiB/s, as seen from the given initiator location.
|
||||||
|
*
|
||||||
* Best bandwidth nodes are nodes with <b>higher bandwidth</b>.
|
* Best bandwidth nodes are nodes with <b>higher bandwidth</b>.
|
||||||
|
*
|
||||||
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST
|
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST
|
||||||
* and ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR.
|
* and ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR.
|
||||||
|
*
|
||||||
|
* This is the average bandwidth for read and write accesses. If the platform
|
||||||
|
* provides individual read and write bandwidths but no explicit average value,
|
||||||
|
* hwloc computes and returns the average.
|
||||||
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
HWLOC_MEMATTR_ID_BANDWIDTH = 2,
|
HWLOC_MEMATTR_ID_BANDWIDTH = 2,
|
||||||
|
|
||||||
/** \brief "Latency".
|
/** \brief
|
||||||
* The latency is returned as nanoseconds, as seen from the given initiator location.
|
* The \"ReadBandwidth\" is returned in MiB/s, as seen from the given initiator location.
|
||||||
|
*
|
||||||
|
* Best bandwidth nodes are nodes with <b>higher bandwidth</b>.
|
||||||
|
*
|
||||||
|
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST
|
||||||
|
* and ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR.
|
||||||
|
* \hideinitializer
|
||||||
|
*/
|
||||||
|
HWLOC_MEMATTR_ID_READ_BANDWIDTH = 4,
|
||||||
|
|
||||||
|
/** \brief
|
||||||
|
* The \"WriteBandwidth\" is returned in MiB/s, as seen from the given initiator location.
|
||||||
|
*
|
||||||
|
* Best bandwidth nodes are nodes with <b>higher bandwidth</b>.
|
||||||
|
*
|
||||||
|
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST
|
||||||
|
* and ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR.
|
||||||
|
* \hideinitializer
|
||||||
|
*/
|
||||||
|
HWLOC_MEMATTR_ID_WRITE_BANDWIDTH = 5,
|
||||||
|
|
||||||
|
/** \brief
|
||||||
|
* The \"Latency\" is returned as nanoseconds, as seen from the given initiator location.
|
||||||
|
*
|
||||||
* Best latency nodes are nodes with <b>smaller latency</b>.
|
* Best latency nodes are nodes with <b>smaller latency</b>.
|
||||||
|
*
|
||||||
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_LOWER_FIRST
|
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_LOWER_FIRST
|
||||||
* and ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR.
|
* and ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR.
|
||||||
|
*
|
||||||
|
* This is the average latency for read and write accesses. If the platform
|
||||||
|
* provides individual read and write latencies but no explicit average value,
|
||||||
|
* hwloc computes and returns the average.
|
||||||
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
HWLOC_MEMATTR_ID_LATENCY = 3
|
HWLOC_MEMATTR_ID_LATENCY = 3,
|
||||||
|
|
||||||
/* TODO read vs write, persistence? */
|
/** \brief
|
||||||
|
* The \"ReadLatency\" is returned as nanoseconds, as seen from the given initiator location.
|
||||||
|
*
|
||||||
|
* Best latency nodes are nodes with <b>smaller latency</b>.
|
||||||
|
*
|
||||||
|
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_LOWER_FIRST
|
||||||
|
* and ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR.
|
||||||
|
* \hideinitializer
|
||||||
|
*/
|
||||||
|
HWLOC_MEMATTR_ID_READ_LATENCY = 6,
|
||||||
|
|
||||||
|
/** \brief
|
||||||
|
* The \"WriteLatency\" is returned as nanoseconds, as seen from the given initiator location.
|
||||||
|
*
|
||||||
|
* Best latency nodes are nodes with <b>smaller latency</b>.
|
||||||
|
*
|
||||||
|
* The corresponding attribute flags are ::HWLOC_MEMATTR_FLAG_LOWER_FIRST
|
||||||
|
* and ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR.
|
||||||
|
* \hideinitializer
|
||||||
|
*/
|
||||||
|
HWLOC_MEMATTR_ID_WRITE_LATENCY = 7,
|
||||||
|
|
||||||
|
/* TODO persistence? */
|
||||||
|
|
||||||
|
HWLOC_MEMATTR_ID_MAX /**< \private
|
||||||
|
* Sentinel value for predefined attributes.
|
||||||
|
* Dynamically registered custom attributes start here.
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \brief A memory attribute identifier.
|
/** \brief A memory attribute identifier.
|
||||||
* May be either one of ::hwloc_memattr_id_e or a new id returned by hwloc_memattr_register().
|
*
|
||||||
|
* hwloc predefines some commonly-used attributes in ::hwloc_memattr_id_e.
|
||||||
|
* One may then dynamically register custom ones with hwloc_memattr_register(),
|
||||||
|
* they will be assigned IDs immediately after the predefined ones.
|
||||||
|
* See \ref hwlocality_memattrs_manage for more information about
|
||||||
|
* existing attribute IDs.
|
||||||
*/
|
*/
|
||||||
typedef unsigned hwloc_memattr_id_t;
|
typedef unsigned hwloc_memattr_id_t;
|
||||||
|
|
||||||
/** \brief Return the identifier of the memory attribute with the given name.
|
/** \brief Return the identifier of the memory attribute with the given name.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c EINVAL if no such attribute exists.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int
|
HWLOC_DECLSPEC int
|
||||||
hwloc_memattr_get_by_name(hwloc_topology_t topology,
|
hwloc_memattr_get_by_name(hwloc_topology_t topology,
|
||||||
@@ -184,6 +269,8 @@ enum hwloc_local_numanode_flag_e {
|
|||||||
* or the number of nodes that would have been stored if there were
|
* or the number of nodes that would have been stored if there were
|
||||||
* enough room.
|
* enough room.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success or -1 on error.
|
||||||
|
*
|
||||||
* \note Some of these NUMA nodes may not have any memory attribute
|
* \note Some of these NUMA nodes may not have any memory attribute
|
||||||
* values and hence not be reported as actual targets in other functions.
|
* values and hence not be reported as actual targets in other functions.
|
||||||
*
|
*
|
||||||
@@ -211,8 +298,16 @@ hwloc_get_local_numanode_objs(hwloc_topology_t topology,
|
|||||||
* (it does not have the flag ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR),
|
* (it does not have the flag ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR),
|
||||||
* location \p initiator is ignored and may be \c NULL.
|
* location \p initiator is ignored and may be \c NULL.
|
||||||
*
|
*
|
||||||
|
* \p target_node cannot be \c NULL. If \p attribute is ::HWLOC_MEMATTR_ID_CAPACITY,
|
||||||
|
* \p target_node must be a NUMA node. If it is ::HWLOC_MEMATTR_ID_LOCALITY,
|
||||||
|
* \p target_node must have a CPU set.
|
||||||
|
*
|
||||||
* \p flags must be \c 0 for now.
|
* \p flags must be \c 0 for now.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance with errno set to \c EINVAL if flags
|
||||||
|
* are invalid or no such attribute exists.
|
||||||
|
*
|
||||||
* \note The initiator \p initiator should be of type ::HWLOC_LOCATION_TYPE_CPUSET
|
* \note The initiator \p initiator should be of type ::HWLOC_LOCATION_TYPE_CPUSET
|
||||||
* when refering to accesses performed by CPU cores.
|
* when refering to accesses performed by CPU cores.
|
||||||
* ::HWLOC_LOCATION_TYPE_OBJECT is currently unused internally by hwloc,
|
* ::HWLOC_LOCATION_TYPE_OBJECT is currently unused internally by hwloc,
|
||||||
@@ -244,7 +339,10 @@ hwloc_memattr_get_value(hwloc_topology_t topology,
|
|||||||
*
|
*
|
||||||
* \p flags must be \c 0 for now.
|
* \p flags must be \c 0 for now.
|
||||||
*
|
*
|
||||||
* If there are no matching targets, \c -1 is returned with \p errno set to \c ENOENT;
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c ENOENT if there are no matching targets.
|
||||||
|
* \return -1 with errno set to \c EINVAL if flags are invalid,
|
||||||
|
* or no such attribute exists.
|
||||||
*
|
*
|
||||||
* \note The initiator \p initiator should be of type ::HWLOC_LOCATION_TYPE_CPUSET
|
* \note The initiator \p initiator should be of type ::HWLOC_LOCATION_TYPE_CPUSET
|
||||||
* when refering to accesses performed by CPU cores.
|
* when refering to accesses performed by CPU cores.
|
||||||
@@ -260,10 +358,6 @@ hwloc_memattr_get_best_target(hwloc_topology_t topology,
|
|||||||
hwloc_obj_t *best_target, hwloc_uint64_t *value);
|
hwloc_obj_t *best_target, hwloc_uint64_t *value);
|
||||||
|
|
||||||
/** \brief Return the best initiator for the given attribute and target NUMA node.
|
/** \brief Return the best initiator for the given attribute and target NUMA node.
|
||||||
*
|
|
||||||
* If the attribute does not relate to a specific initiator
|
|
||||||
* (it does not have the flag ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR),
|
|
||||||
* \c -1 is returned and \p errno is set to \c EINVAL.
|
|
||||||
*
|
*
|
||||||
* If \p value is non \c NULL, the corresponding value is returned there.
|
* If \p value is non \c NULL, the corresponding value is returned there.
|
||||||
*
|
*
|
||||||
@@ -277,96 +371,22 @@ hwloc_memattr_get_best_target(hwloc_topology_t topology,
|
|||||||
* The returned initiator should not be modified or freed,
|
* The returned initiator should not be modified or freed,
|
||||||
* it belongs to the topology.
|
* it belongs to the topology.
|
||||||
*
|
*
|
||||||
|
* \p target_node cannot be \c NULL.
|
||||||
|
*
|
||||||
* \p flags must be \c 0 for now.
|
* \p flags must be \c 0 for now.
|
||||||
*
|
*
|
||||||
* If there are no matching initiators, \c -1 is returned with \p errno set to \c ENOENT;
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c ENOENT if there are no matching initiators.
|
||||||
|
* \return -1 with errno set to \c EINVAL if the attribute does not relate to a specific initiator
|
||||||
|
* (it does not have the flag ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR).
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int
|
HWLOC_DECLSPEC int
|
||||||
hwloc_memattr_get_best_initiator(hwloc_topology_t topology,
|
hwloc_memattr_get_best_initiator(hwloc_topology_t topology,
|
||||||
hwloc_memattr_id_t attribute,
|
hwloc_memattr_id_t attribute,
|
||||||
hwloc_obj_t target,
|
hwloc_obj_t target_node,
|
||||||
unsigned long flags,
|
unsigned long flags,
|
||||||
struct hwloc_location *best_initiator, hwloc_uint64_t *value);
|
struct hwloc_location *best_initiator, hwloc_uint64_t *value);
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_memattrs_manage Managing memory attributes
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** \brief Return the name of a memory attribute.
|
|
||||||
*/
|
|
||||||
HWLOC_DECLSPEC int
|
|
||||||
hwloc_memattr_get_name(hwloc_topology_t topology,
|
|
||||||
hwloc_memattr_id_t attribute,
|
|
||||||
const char **name);
|
|
||||||
|
|
||||||
/** \brief Return the flags of the given attribute.
|
|
||||||
*
|
|
||||||
* Flags are a OR'ed set of ::hwloc_memattr_flag_e.
|
|
||||||
*/
|
|
||||||
HWLOC_DECLSPEC int
|
|
||||||
hwloc_memattr_get_flags(hwloc_topology_t topology,
|
|
||||||
hwloc_memattr_id_t attribute,
|
|
||||||
unsigned long *flags);
|
|
||||||
|
|
||||||
/** \brief Memory attribute flags.
|
|
||||||
* Given to hwloc_memattr_register() and returned by hwloc_memattr_get_flags().
|
|
||||||
*/
|
|
||||||
enum hwloc_memattr_flag_e {
|
|
||||||
/** \brief The best nodes for this memory attribute are those with the higher values.
|
|
||||||
* For instance Bandwidth.
|
|
||||||
*/
|
|
||||||
HWLOC_MEMATTR_FLAG_HIGHER_FIRST = (1UL<<0),
|
|
||||||
/** \brief The best nodes for this memory attribute are those with the lower values.
|
|
||||||
* For instance Latency.
|
|
||||||
*/
|
|
||||||
HWLOC_MEMATTR_FLAG_LOWER_FIRST = (1UL<<1),
|
|
||||||
/** \brief The value returned for this memory attribute depends on the given initiator.
|
|
||||||
* For instance Bandwidth and Latency, but not Capacity.
|
|
||||||
*/
|
|
||||||
HWLOC_MEMATTR_FLAG_NEED_INITIATOR = (1UL<<2)
|
|
||||||
};
|
|
||||||
|
|
||||||
/** \brief Register a new memory attribute.
|
|
||||||
*
|
|
||||||
* Add a specific memory attribute that is not defined in ::hwloc_memattr_id_e.
|
|
||||||
* Flags are a OR'ed set of ::hwloc_memattr_flag_e. It must contain at least
|
|
||||||
* one of ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST or ::HWLOC_MEMATTR_FLAG_LOWER_FIRST.
|
|
||||||
*/
|
|
||||||
HWLOC_DECLSPEC int
|
|
||||||
hwloc_memattr_register(hwloc_topology_t topology,
|
|
||||||
const char *name,
|
|
||||||
unsigned long flags,
|
|
||||||
hwloc_memattr_id_t *id);
|
|
||||||
|
|
||||||
/** \brief Set an attribute value for a specific target NUMA node.
|
|
||||||
*
|
|
||||||
* If the attribute does not relate to a specific initiator
|
|
||||||
* (it does not have the flag ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR),
|
|
||||||
* location \p initiator is ignored and may be \c NULL.
|
|
||||||
*
|
|
||||||
* The initiator will be copied into the topology,
|
|
||||||
* the caller should free anything allocated to store the initiator,
|
|
||||||
* for instance the cpuset.
|
|
||||||
*
|
|
||||||
* \p flags must be \c 0 for now.
|
|
||||||
*
|
|
||||||
* \note The initiator \p initiator should be of type ::HWLOC_LOCATION_TYPE_CPUSET
|
|
||||||
* when refering to accesses performed by CPU cores.
|
|
||||||
* ::HWLOC_LOCATION_TYPE_OBJECT is currently unused internally by hwloc,
|
|
||||||
* but users may for instance use it to provide custom information about
|
|
||||||
* host memory accesses performed by GPUs.
|
|
||||||
*/
|
|
||||||
HWLOC_DECLSPEC int
|
|
||||||
hwloc_memattr_set_value(hwloc_topology_t topology,
|
|
||||||
hwloc_memattr_id_t attribute,
|
|
||||||
hwloc_obj_t target_node,
|
|
||||||
struct hwloc_location *initiator,
|
|
||||||
unsigned long flags,
|
|
||||||
hwloc_uint64_t value);
|
|
||||||
|
|
||||||
/** \brief Return the target NUMA nodes that have some values for a given attribute.
|
/** \brief Return the target NUMA nodes that have some values for a given attribute.
|
||||||
*
|
*
|
||||||
* Return targets for the given attribute in the \p targets array
|
* Return targets for the given attribute in the \p targets array
|
||||||
@@ -397,8 +417,10 @@ hwloc_memattr_set_value(hwloc_topology_t topology,
|
|||||||
* NUMA nodes with hwloc_get_local_numanode_objs() and then look at their attribute
|
* NUMA nodes with hwloc_get_local_numanode_objs() and then look at their attribute
|
||||||
* values.
|
* values.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success or -1 on error.
|
||||||
|
*
|
||||||
* \note The initiator \p initiator should be of type ::HWLOC_LOCATION_TYPE_CPUSET
|
* \note The initiator \p initiator should be of type ::HWLOC_LOCATION_TYPE_CPUSET
|
||||||
* when refering to accesses performed by CPU cores.
|
* when referring to accesses performed by CPU cores.
|
||||||
* ::HWLOC_LOCATION_TYPE_OBJECT is currently unused internally by hwloc,
|
* ::HWLOC_LOCATION_TYPE_OBJECT is currently unused internally by hwloc,
|
||||||
* but users may for instance use it to provide custom information about
|
* but users may for instance use it to provide custom information about
|
||||||
* host memory accesses performed by GPUs.
|
* host memory accesses performed by GPUs.
|
||||||
@@ -408,7 +430,7 @@ hwloc_memattr_get_targets(hwloc_topology_t topology,
|
|||||||
hwloc_memattr_id_t attribute,
|
hwloc_memattr_id_t attribute,
|
||||||
struct hwloc_location *initiator,
|
struct hwloc_location *initiator,
|
||||||
unsigned long flags,
|
unsigned long flags,
|
||||||
unsigned *nrp, hwloc_obj_t *targets, hwloc_uint64_t *values);
|
unsigned *nr, hwloc_obj_t *targets, hwloc_uint64_t *values);
|
||||||
|
|
||||||
/** \brief Return the initiators that have values for a given attribute for a specific target NUMA node.
|
/** \brief Return the initiators that have values for a given attribute for a specific target NUMA node.
|
||||||
*
|
*
|
||||||
@@ -428,12 +450,16 @@ hwloc_memattr_get_targets(hwloc_topology_t topology,
|
|||||||
* The returned initiators should not be modified or freed,
|
* The returned initiators should not be modified or freed,
|
||||||
* they belong to the topology.
|
* they belong to the topology.
|
||||||
*
|
*
|
||||||
|
* \p target_node cannot be \c NULL.
|
||||||
|
*
|
||||||
* \p flags must be \c 0 for now.
|
* \p flags must be \c 0 for now.
|
||||||
*
|
*
|
||||||
* If the attribute does not relate to a specific initiator
|
* If the attribute does not relate to a specific initiator
|
||||||
* (it does not have the flag ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR),
|
* (it does not have the flag ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR),
|
||||||
* no initiator is returned.
|
* no initiator is returned.
|
||||||
*
|
*
|
||||||
|
* \return 0 on success or -1 on error.
|
||||||
|
*
|
||||||
* \note This function is meant for tools and debugging (listing internal information)
|
* \note This function is meant for tools and debugging (listing internal information)
|
||||||
* rather than for application queries. Applications should rather select useful
|
* rather than for application queries. Applications should rather select useful
|
||||||
* NUMA nodes with hwloc_get_local_numanode_objs() and then look at their attribute
|
* NUMA nodes with hwloc_get_local_numanode_objs() and then look at their attribute
|
||||||
@@ -445,6 +471,131 @@ hwloc_memattr_get_initiators(hwloc_topology_t topology,
|
|||||||
hwloc_obj_t target_node,
|
hwloc_obj_t target_node,
|
||||||
unsigned long flags,
|
unsigned long flags,
|
||||||
unsigned *nr, struct hwloc_location *initiators, hwloc_uint64_t *values);
|
unsigned *nr, struct hwloc_location *initiators, hwloc_uint64_t *values);
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
/** \defgroup hwlocality_memattrs_manage Managing memory attributes
|
||||||
|
*
|
||||||
|
* Memory attribues are identified by an ID (::hwloc_memattr_id_t)
|
||||||
|
* and a name. hwloc_memattr_get_name() and hwloc_memattr_get_by_name()
|
||||||
|
* convert between them (or return error if the attribute does not exist).
|
||||||
|
*
|
||||||
|
* The set of valid ::hwloc_memattr_id_t is a contigous set starting at \c 0.
|
||||||
|
* It first contains predefined attributes, as listed
|
||||||
|
* in ::hwloc_memattr_id_e (from \c 0 to \c HWLOC_MEMATTR_ID_MAX-1).
|
||||||
|
* Then custom attributes may be dynamically registered with
|
||||||
|
* hwloc_memattr_register(). They will get the following IDs
|
||||||
|
* (\c HWLOC_MEMATTR_ID_MAX for the first one, etc.).
|
||||||
|
*
|
||||||
|
* To iterate over all valid attributes
|
||||||
|
* (either predefined or dynamically registered custom ones),
|
||||||
|
* one may iterate over IDs starting from \c 0 until hwloc_memattr_get_name()
|
||||||
|
* or hwloc_memattr_get_flags() returns an error.
|
||||||
|
*
|
||||||
|
* The values for an existing attribute or for custom dynamically registered ones
|
||||||
|
* may be set or modified with hwloc_memattr_set_value().
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** \brief Return the name of a memory attribute.
|
||||||
|
*
|
||||||
|
* The output pointer \p name cannot be \c NULL.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c EINVAL if the attribute does not exist.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int
|
||||||
|
hwloc_memattr_get_name(hwloc_topology_t topology,
|
||||||
|
hwloc_memattr_id_t attribute,
|
||||||
|
const char **name);
|
||||||
|
|
||||||
|
/** \brief Return the flags of the given attribute.
|
||||||
|
*
|
||||||
|
* Flags are a OR'ed set of ::hwloc_memattr_flag_e.
|
||||||
|
*
|
||||||
|
* The output pointer \p flags cannot be \c NULL.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c EINVAL if the attribute does not exist.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int
|
||||||
|
hwloc_memattr_get_flags(hwloc_topology_t topology,
|
||||||
|
hwloc_memattr_id_t attribute,
|
||||||
|
unsigned long *flags);
|
||||||
|
|
||||||
|
/** \brief Memory attribute flags.
|
||||||
|
* Given to hwloc_memattr_register() and returned by hwloc_memattr_get_flags().
|
||||||
|
*/
|
||||||
|
enum hwloc_memattr_flag_e {
|
||||||
|
/** \brief The best nodes for this memory attribute are those with the higher values.
|
||||||
|
* For instance Bandwidth.
|
||||||
|
*/
|
||||||
|
HWLOC_MEMATTR_FLAG_HIGHER_FIRST = (1UL<<0),
|
||||||
|
/** \brief The best nodes for this memory attribute are those with the lower values.
|
||||||
|
* For instance Latency.
|
||||||
|
*/
|
||||||
|
HWLOC_MEMATTR_FLAG_LOWER_FIRST = (1UL<<1),
|
||||||
|
/** \brief The value returned for this memory attribute depends on the given initiator.
|
||||||
|
* For instance Bandwidth and Latency, but not Capacity.
|
||||||
|
*/
|
||||||
|
HWLOC_MEMATTR_FLAG_NEED_INITIATOR = (1UL<<2)
|
||||||
|
};
|
||||||
|
|
||||||
|
/** \brief Register a new memory attribute.
|
||||||
|
*
|
||||||
|
* Add a new custom memory attribute.
|
||||||
|
* Flags are a OR'ed set of ::hwloc_memattr_flag_e. It must contain one of
|
||||||
|
* ::HWLOC_MEMATTR_FLAG_HIGHER_FIRST or ::HWLOC_MEMATTR_FLAG_LOWER_FIRST but not both.
|
||||||
|
*
|
||||||
|
* The new attribute \p id is immediately after the last existing attribute ID
|
||||||
|
* (which is either the ID of the last registered attribute if any,
|
||||||
|
* or the ID of the last predefined attribute in ::hwloc_memattr_id_e).
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c EINVAL if an invalid set of flags is given.
|
||||||
|
* \return -1 with errno set to \c EBUSY if another attribute already uses this name.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int
|
||||||
|
hwloc_memattr_register(hwloc_topology_t topology,
|
||||||
|
const char *name,
|
||||||
|
unsigned long flags,
|
||||||
|
hwloc_memattr_id_t *id);
|
||||||
|
|
||||||
|
/** \brief Set an attribute value for a specific target NUMA node.
|
||||||
|
*
|
||||||
|
* If the attribute does not relate to a specific initiator
|
||||||
|
* (it does not have the flag ::HWLOC_MEMATTR_FLAG_NEED_INITIATOR),
|
||||||
|
* location \p initiator is ignored and may be \c NULL.
|
||||||
|
*
|
||||||
|
* The initiator will be copied into the topology,
|
||||||
|
* the caller should free anything allocated to store the initiator,
|
||||||
|
* for instance the cpuset.
|
||||||
|
*
|
||||||
|
* \p target_node cannot be \c NULL.
|
||||||
|
*
|
||||||
|
* \p attribute cannot be ::HWLOC_MEMATTR_FLAG_ID_CAPACITY or
|
||||||
|
* ::HWLOC_MEMATTR_FLAG_ID_LOCALITY.
|
||||||
|
*
|
||||||
|
* \p flags must be \c 0 for now.
|
||||||
|
*
|
||||||
|
* \note The initiator \p initiator should be of type ::HWLOC_LOCATION_TYPE_CPUSET
|
||||||
|
* when referring to accesses performed by CPU cores.
|
||||||
|
* ::HWLOC_LOCATION_TYPE_OBJECT is currently unused internally by hwloc,
|
||||||
|
* but users may for instance use it to provide custom information about
|
||||||
|
* host memory accesses performed by GPUs.
|
||||||
|
*
|
||||||
|
* \return 0 on success or -1 on error.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int
|
||||||
|
hwloc_memattr_set_value(hwloc_topology_t topology,
|
||||||
|
hwloc_memattr_id_t attribute,
|
||||||
|
hwloc_obj_t target_node,
|
||||||
|
struct hwloc_location *initiator,
|
||||||
|
unsigned long flags,
|
||||||
|
hwloc_uint64_t value);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
15
src/3rdparty/hwloc/include/hwloc/nvml.h
vendored
15
src/3rdparty/hwloc/include/hwloc/nvml.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2012-2020 Inria. All rights reserved.
|
* Copyright © 2012-2023 Inria. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ extern "C" {
|
|||||||
/** \brief Get the CPU set of processors that are physically
|
/** \brief Get the CPU set of processors that are physically
|
||||||
* close to NVML device \p device.
|
* close to NVML device \p device.
|
||||||
*
|
*
|
||||||
* Return the CPU set describing the locality of the NVML device \p device.
|
* Store in \p set the CPU-set describing the locality of the NVML device \p device.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p device must match the local machine.
|
* Topology \p topology and device \p device must match the local machine.
|
||||||
* I/O devices detection and the NVML component are not needed in the topology.
|
* I/O devices detection and the NVML component are not needed in the topology.
|
||||||
@@ -51,6 +51,9 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* This function is currently only implemented in a meaningful way for
|
* This function is currently only implemented in a meaningful way for
|
||||||
* Linux; other systems will simply get a full cpuset.
|
* Linux; other systems will simply get a full cpuset.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_nvml_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
hwloc_nvml_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
@@ -88,8 +91,8 @@ hwloc_nvml_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the
|
/** \brief Get the hwloc OS device object corresponding to the
|
||||||
* NVML device whose index is \p idx.
|
* NVML device whose index is \p idx.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the NVML device whose
|
* \return The hwloc OS device object describing the NVML device whose index is \p idx.
|
||||||
* index is \p idx. Returns NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
* machine. For instance the topology may be an XML import of a remote host.
|
||||||
@@ -114,8 +117,8 @@ hwloc_nvml_get_device_osdev_by_index(hwloc_topology_t topology, unsigned idx)
|
|||||||
|
|
||||||
/** \brief Get the hwloc OS device object corresponding to NVML device \p device.
|
/** \brief Get the hwloc OS device object corresponding to NVML device \p device.
|
||||||
*
|
*
|
||||||
* Return the hwloc OS device object that describes the given
|
* \return The hwloc OS device object that describes the given NVML device \p device.
|
||||||
* NVML device \p device. Return NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p device must match the local machine.
|
* Topology \p topology and device \p device must match the local machine.
|
||||||
* I/O devices detection and the NVML component must be enabled in the topology.
|
* I/O devices detection and the NVML component must be enabled in the topology.
|
||||||
|
|||||||
38
src/3rdparty/hwloc/include/hwloc/opencl.h
vendored
38
src/3rdparty/hwloc/include/hwloc/opencl.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2012-2021 Inria. All rights reserved.
|
* Copyright © 2012-2023 Inria. All rights reserved.
|
||||||
* Copyright © 2013, 2018 Université Bordeaux. All right reserved.
|
* Copyright © 2013, 2018 Université Bordeaux. All right reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
@@ -41,6 +41,15 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
/* Copyright (c) 2008-2018 The Khronos Group Inc. */
|
/* Copyright (c) 2008-2018 The Khronos Group Inc. */
|
||||||
|
|
||||||
|
/* needs "cl_khr_pci_bus_info" device extension, but not strictly required for clGetDeviceInfo() */
|
||||||
|
typedef struct {
|
||||||
|
cl_uint pci_domain;
|
||||||
|
cl_uint pci_bus;
|
||||||
|
cl_uint pci_device;
|
||||||
|
cl_uint pci_function;
|
||||||
|
} hwloc_cl_device_pci_bus_info_khr;
|
||||||
|
#define HWLOC_CL_DEVICE_PCI_BUS_INFO_KHR 0x410F
|
||||||
|
|
||||||
/* needs "cl_amd_device_attribute_query" device extension, but not strictly required for clGetDeviceInfo() */
|
/* needs "cl_amd_device_attribute_query" device extension, but not strictly required for clGetDeviceInfo() */
|
||||||
#define HWLOC_CL_DEVICE_TOPOLOGY_AMD 0x4037
|
#define HWLOC_CL_DEVICE_TOPOLOGY_AMD 0x4037
|
||||||
typedef union {
|
typedef union {
|
||||||
@@ -69,15 +78,28 @@ typedef union {
|
|||||||
/** \brief Return the domain, bus and device IDs of the OpenCL device \p device.
|
/** \brief Return the domain, bus and device IDs of the OpenCL device \p device.
|
||||||
*
|
*
|
||||||
* Device \p device must match the local machine.
|
* Device \p device must match the local machine.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_opencl_get_device_pci_busid(cl_device_id device,
|
hwloc_opencl_get_device_pci_busid(cl_device_id device,
|
||||||
unsigned *domain, unsigned *bus, unsigned *dev, unsigned *func)
|
unsigned *domain, unsigned *bus, unsigned *dev, unsigned *func)
|
||||||
{
|
{
|
||||||
hwloc_cl_device_topology_amd amdtopo;
|
hwloc_cl_device_topology_amd amdtopo;
|
||||||
|
hwloc_cl_device_pci_bus_info_khr khrbusinfo;
|
||||||
cl_uint nvbus, nvslot, nvdomain;
|
cl_uint nvbus, nvslot, nvdomain;
|
||||||
cl_int clret;
|
cl_int clret;
|
||||||
|
|
||||||
|
clret = clGetDeviceInfo(device, HWLOC_CL_DEVICE_PCI_BUS_INFO_KHR, sizeof(khrbusinfo), &khrbusinfo, NULL);
|
||||||
|
if (CL_SUCCESS == clret) {
|
||||||
|
*domain = (unsigned) khrbusinfo.pci_domain;
|
||||||
|
*bus = (unsigned) khrbusinfo.pci_bus;
|
||||||
|
*dev = (unsigned) khrbusinfo.pci_device;
|
||||||
|
*func = (unsigned) khrbusinfo.pci_function;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
clret = clGetDeviceInfo(device, HWLOC_CL_DEVICE_TOPOLOGY_AMD, sizeof(amdtopo), &amdtopo, NULL);
|
clret = clGetDeviceInfo(device, HWLOC_CL_DEVICE_TOPOLOGY_AMD, sizeof(amdtopo), &amdtopo, NULL);
|
||||||
if (CL_SUCCESS == clret
|
if (CL_SUCCESS == clret
|
||||||
&& HWLOC_CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD == amdtopo.raw.type) {
|
&& HWLOC_CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD == amdtopo.raw.type) {
|
||||||
@@ -113,7 +135,7 @@ hwloc_opencl_get_device_pci_busid(cl_device_id device,
|
|||||||
/** \brief Get the CPU set of processors that are physically
|
/** \brief Get the CPU set of processors that are physically
|
||||||
* close to OpenCL device \p device.
|
* close to OpenCL device \p device.
|
||||||
*
|
*
|
||||||
* Return the CPU set describing the locality of the OpenCL device \p device.
|
* Store in \p set the CPU-set describing the locality of the OpenCL device \p device.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p device must match the local machine.
|
* Topology \p topology and device \p device must match the local machine.
|
||||||
* I/O devices detection and the OpenCL component are not needed in the topology.
|
* I/O devices detection and the OpenCL component are not needed in the topology.
|
||||||
@@ -126,6 +148,9 @@ hwloc_opencl_get_device_pci_busid(cl_device_id device,
|
|||||||
* This function is currently only implemented in a meaningful way for
|
* This function is currently only implemented in a meaningful way for
|
||||||
* Linux with the AMD or NVIDIA OpenCL implementation; other systems will simply
|
* Linux with the AMD or NVIDIA OpenCL implementation; other systems will simply
|
||||||
* get a full cpuset.
|
* get a full cpuset.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if the device could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_opencl_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
hwloc_opencl_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
@@ -162,10 +187,10 @@ hwloc_opencl_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unuse
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the
|
/** \brief Get the hwloc OS device object corresponding to the
|
||||||
* OpenCL device for the given indexes.
|
* OpenCL device for the given indexes.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the OpenCL device
|
* \return The hwloc OS device object describing the OpenCL device
|
||||||
* whose platform index is \p platform_index,
|
* whose platform index is \p platform_index,
|
||||||
* and whose device index within this platform if \p device_index.
|
* and whose device index within this platform if \p device_index.
|
||||||
* Return NULL if there is none.
|
* \return \c NULL if there is none.
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
* machine. For instance the topology may be an XML import of a remote host.
|
||||||
@@ -192,8 +217,9 @@ hwloc_opencl_get_device_osdev_by_index(hwloc_topology_t topology,
|
|||||||
|
|
||||||
/** \brief Get the hwloc OS device object corresponding to OpenCL device \p deviceX.
|
/** \brief Get the hwloc OS device object corresponding to OpenCL device \p deviceX.
|
||||||
*
|
*
|
||||||
* Use OpenCL device attributes to find the corresponding hwloc OS device object.
|
* \return The hwloc OS device object corresponding to the given OpenCL device \p device.
|
||||||
* Return NULL if there is none or if useful attributes are not available.
|
* \return \c NULL if none could be found, for instance
|
||||||
|
* if required OpenCL attributes are not available.
|
||||||
*
|
*
|
||||||
* This function currently only works on AMD and NVIDIA OpenCL devices that support
|
* This function currently only works on AMD and NVIDIA OpenCL devices that support
|
||||||
* relevant OpenCL extensions. hwloc_opencl_get_device_osdev_by_index()
|
* relevant OpenCL extensions. hwloc_opencl_get_device_osdev_by_index()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009 CNRS
|
* Copyright © 2009 CNRS
|
||||||
* Copyright © 2009-2020 Inria. All rights reserved.
|
* Copyright © 2009-2023 Inria. All rights reserved.
|
||||||
* Copyright © 2009-2010 Université Bordeaux
|
* Copyright © 2009-2010 Université Bordeaux
|
||||||
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -44,7 +44,7 @@ extern "C" {
|
|||||||
/** \brief Get the CPU set of processors that are physically
|
/** \brief Get the CPU set of processors that are physically
|
||||||
* close to device \p ibdev.
|
* close to device \p ibdev.
|
||||||
*
|
*
|
||||||
* Return the CPU set describing the locality of the OpenFabrics
|
* Store in \p set the CPU-set describing the locality of the OpenFabrics
|
||||||
* device \p ibdev (InfiniBand, etc).
|
* device \p ibdev (InfiniBand, etc).
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p ibdev must match the local machine.
|
* Topology \p topology and device \p ibdev must match the local machine.
|
||||||
@@ -57,6 +57,9 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* This function is currently only implemented in a meaningful way for
|
* This function is currently only implemented in a meaningful way for
|
||||||
* Linux; other systems will simply get a full cpuset.
|
* Linux; other systems will simply get a full cpuset.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_ibv_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
hwloc_ibv_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
@@ -88,10 +91,11 @@ hwloc_ibv_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the OpenFabrics
|
/** \brief Get the hwloc OS device object corresponding to the OpenFabrics
|
||||||
* device named \p ibname.
|
* device named \p ibname.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the OpenFabrics device
|
* \return The hwloc OS device object describing the OpenFabrics device
|
||||||
* (InfiniBand, Omni-Path, usNIC, etc) whose name is \p ibname
|
* (InfiniBand, Omni-Path, usNIC, etc) whose name is \p ibname
|
||||||
* (mlx5_0, hfi1_0, usnic_0, qib0, etc).
|
* (mlx5_0, hfi1_0, usnic_0, qib0, etc).
|
||||||
* Returns NULL if there is none.
|
* \return \c NULL if none could be found.
|
||||||
|
*
|
||||||
* The name \p ibname is usually obtained from ibv_get_device_name().
|
* The name \p ibname is usually obtained from ibv_get_device_name().
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
@@ -117,8 +121,9 @@ hwloc_ibv_get_device_osdev_by_name(hwloc_topology_t topology,
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the OpenFabrics
|
/** \brief Get the hwloc OS device object corresponding to the OpenFabrics
|
||||||
* device \p ibdev.
|
* device \p ibdev.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the OpenFabrics device \p ibdev
|
* \return The hwloc OS device object describing the OpenFabrics
|
||||||
* (InfiniBand, etc). Returns NULL if there is none.
|
* device \p ibdev (InfiniBand, etc).
|
||||||
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p ibdev must match the local machine.
|
* Topology \p topology and device \p ibdev must match the local machine.
|
||||||
* I/O devices detection must be enabled in the topology.
|
* I/O devices detection must be enabled in the topology.
|
||||||
|
|||||||
125
src/3rdparty/hwloc/include/hwloc/plugins.h
vendored
125
src/3rdparty/hwloc/include/hwloc/plugins.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2013-2020 Inria. All rights reserved.
|
* Copyright © 2013-2024 Inria. All rights reserved.
|
||||||
* Copyright © 2016 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2016 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
@@ -27,6 +27,9 @@ struct hwloc_backend;
|
|||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_disc_components Components and Plugins: Discovery components
|
/** \defgroup hwlocality_disc_components Components and Plugins: Discovery components
|
||||||
|
*
|
||||||
|
* \note These structures and functions may change when ::HWLOC_COMPONENT_ABI is modified.
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -93,6 +96,9 @@ struct hwloc_disc_component {
|
|||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_disc_backends Components and Plugins: Discovery backends
|
/** \defgroup hwlocality_disc_backends Components and Plugins: Discovery backends
|
||||||
|
*
|
||||||
|
* \note These structures and functions may change when ::HWLOC_COMPONENT_ABI is modified.
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -158,7 +164,7 @@ struct hwloc_disc_status {
|
|||||||
*/
|
*/
|
||||||
unsigned excluded_phases;
|
unsigned excluded_phases;
|
||||||
|
|
||||||
/** \brief OR'ed set of hwloc_disc_status_flag_e */
|
/** \brief OR'ed set of ::hwloc_disc_status_flag_e */
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -241,6 +247,9 @@ HWLOC_DECLSPEC int hwloc_backend_enable(struct hwloc_backend *backend);
|
|||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_generic_components Components and Plugins: Generic components
|
/** \defgroup hwlocality_generic_components Components and Plugins: Generic components
|
||||||
|
*
|
||||||
|
* \note These structures and functions may change when ::HWLOC_COMPONENT_ABI is modified.
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -310,12 +319,34 @@ struct hwloc_component {
|
|||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_components_core_funcs Components and Plugins: Core functions to be used by components
|
/** \defgroup hwlocality_components_core_funcs Components and Plugins: Core functions to be used by components
|
||||||
|
*
|
||||||
|
* \note These structures and functions may change when ::HWLOC_COMPONENT_ABI is modified.
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \brief Check whether insertion errors are hidden */
|
/** \brief Check whether error messages are hidden.
|
||||||
|
*
|
||||||
|
* Callers should print critical error messages
|
||||||
|
* (e.g. invalid hw topo info, invalid config)
|
||||||
|
* only if this function returns strictly less than 2.
|
||||||
|
*
|
||||||
|
* Callers should print non-critical error messages
|
||||||
|
* (e.g. failure to initialize CUDA)
|
||||||
|
* if this function returns 0.
|
||||||
|
*
|
||||||
|
* This function return 1 by default (show critical only),
|
||||||
|
* 0 in lstopo (show all),
|
||||||
|
* or anything set in HWLOC_HIDE_ERRORS in the environment.
|
||||||
|
*
|
||||||
|
* Use macros HWLOC_SHOW_CRITICAL_ERRORS() and HWLOC_SHOW_ALL_ERRORS()
|
||||||
|
* for clarity.
|
||||||
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_hide_errors(void);
|
HWLOC_DECLSPEC int hwloc_hide_errors(void);
|
||||||
|
|
||||||
|
#define HWLOC_SHOW_CRITICAL_ERRORS() (hwloc_hide_errors() < 2)
|
||||||
|
#define HWLOC_SHOW_ALL_ERRORS() (hwloc_hide_errors() == 0)
|
||||||
|
|
||||||
/** \brief Add an object to the topology.
|
/** \brief Add an object to the topology.
|
||||||
*
|
*
|
||||||
* Insert new object \p obj in the topology starting under existing object \p root
|
* Insert new object \p obj in the topology starting under existing object \p root
|
||||||
@@ -455,6 +486,9 @@ hwloc_plugin_check_namespace(const char *pluginname __hwloc_attribute_unused, co
|
|||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_components_filtering Components and Plugins: Filtering objects
|
/** \defgroup hwlocality_components_filtering Components and Plugins: Filtering objects
|
||||||
|
*
|
||||||
|
* \note These structures and functions may change when ::HWLOC_COMPONENT_ABI is modified.
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -469,9 +503,12 @@ hwloc_filter_check_pcidev_subtype_important(unsigned classid)
|
|||||||
return (baseclass == 0x03 /* PCI_BASE_CLASS_DISPLAY */
|
return (baseclass == 0x03 /* PCI_BASE_CLASS_DISPLAY */
|
||||||
|| baseclass == 0x02 /* PCI_BASE_CLASS_NETWORK */
|
|| baseclass == 0x02 /* PCI_BASE_CLASS_NETWORK */
|
||||||
|| baseclass == 0x01 /* PCI_BASE_CLASS_STORAGE */
|
|| baseclass == 0x01 /* PCI_BASE_CLASS_STORAGE */
|
||||||
|
|| baseclass == 0x00 /* Unclassified, for Atos/Bull BXI */
|
||||||
|| baseclass == 0x0b /* PCI_BASE_CLASS_PROCESSOR */
|
|| baseclass == 0x0b /* PCI_BASE_CLASS_PROCESSOR */
|
||||||
|| classid == 0x0c04 /* PCI_CLASS_SERIAL_FIBER */
|
|| classid == 0x0c04 /* PCI_CLASS_SERIAL_FIBER */
|
||||||
|| classid == 0x0c06 /* PCI_CLASS_SERIAL_INFINIBAND */
|
|| classid == 0x0c06 /* PCI_CLASS_SERIAL_INFINIBAND */
|
||||||
|
|| classid == 0x0502 /* PCI_CLASS_MEMORY_CXL */
|
||||||
|
|| baseclass == 0x06 /* PCI_BASE_CLASS_BRIDGE with non-PCI downstream. the core will drop the useless ones later */
|
||||||
|| baseclass == 0x12 /* Processing Accelerators */);
|
|| baseclass == 0x12 /* Processing Accelerators */);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -527,6 +564,9 @@ hwloc_filter_check_keep_object(hwloc_topology_t topology, hwloc_obj_t obj)
|
|||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_components_pcidisc Components and Plugins: helpers for PCI discovery
|
/** \defgroup hwlocality_components_pcidisc Components and Plugins: helpers for PCI discovery
|
||||||
|
*
|
||||||
|
* \note These structures and functions may change when ::HWLOC_COMPONENT_ABI is modified.
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -578,18 +618,89 @@ HWLOC_DECLSPEC int hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, st
|
|||||||
|
|
||||||
|
|
||||||
/** \defgroup hwlocality_components_pcifind Components and Plugins: finding PCI objects during other discoveries
|
/** \defgroup hwlocality_components_pcifind Components and Plugins: finding PCI objects during other discoveries
|
||||||
|
*
|
||||||
|
* \note These structures and functions may change when ::HWLOC_COMPONENT_ABI is modified.
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \brief Find the normal parent of a PCI bus ID.
|
/** \brief Find the object or a parent of a PCI bus ID.
|
||||||
*
|
*
|
||||||
* Look at PCI affinity to find out where the given PCI bus ID should be attached.
|
* When attaching a new object (typically an OS device) whose locality
|
||||||
|
* is specified by PCI bus ID, this function returns the PCI object
|
||||||
|
* to use as a parent for attaching.
|
||||||
*
|
*
|
||||||
* This function should be used to attach an I/O device under the corresponding
|
* If the exact PCI device with this bus ID exists, it is returned.
|
||||||
* PCI object (if any), or under a normal (non-I/O) object with same locality.
|
* Otherwise (for instance if it was filtered out), the function returns
|
||||||
|
* another object with similar locality (for instance a parent bridge,
|
||||||
|
* or the local CPU Package).
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC struct hwloc_obj * hwloc_pci_find_parent_by_busid(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);
|
||||||
|
|
||||||
|
/** \brief Find the PCI device or bridge matching a PCI bus ID exactly.
|
||||||
|
*
|
||||||
|
* This is useful for adding specific information about some objects
|
||||||
|
* based on their PCI id. When it comes to attaching objects based on
|
||||||
|
* PCI locality, hwloc_pci_find_parent_by_busid() should be preferred.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC struct hwloc_obj * hwloc_pci_find_by_busid(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func);
|
||||||
|
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** \defgroup hwlocality_components_distances Components and Plugins: distances
|
||||||
|
*
|
||||||
|
* \note These structures and functions may change when ::HWLOC_COMPONENT_ABI is modified.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** \brief Handle to a new distances structure during its addition to the topology. */
|
||||||
|
typedef void * hwloc_backend_distances_add_handle_t;
|
||||||
|
|
||||||
|
/** \brief Create a new empty distances structure.
|
||||||
|
*
|
||||||
|
* This is identical to hwloc_distances_add_create()
|
||||||
|
* but this variant is designed for backend inserting
|
||||||
|
* distances during topology discovery.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC hwloc_backend_distances_add_handle_t
|
||||||
|
hwloc_backend_distances_add_create(hwloc_topology_t topology,
|
||||||
|
const char *name, unsigned long kind,
|
||||||
|
unsigned long flags);
|
||||||
|
|
||||||
|
/** \brief Specify the objects and values in a new empty distances structure.
|
||||||
|
*
|
||||||
|
* This is similar to hwloc_distances_add_values()
|
||||||
|
* but this variant is designed for backend inserting
|
||||||
|
* distances during topology discovery.
|
||||||
|
*
|
||||||
|
* The only semantical difference is that \p objs and \p values
|
||||||
|
* are not duplicated, but directly attached to the topology.
|
||||||
|
* On success, these arrays are given to the core and should not
|
||||||
|
* ever be freed by the caller anymore.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int
|
||||||
|
hwloc_backend_distances_add_values(hwloc_topology_t topology,
|
||||||
|
hwloc_backend_distances_add_handle_t handle,
|
||||||
|
unsigned nbobjs, hwloc_obj_t *objs,
|
||||||
|
hwloc_uint64_t *values,
|
||||||
|
unsigned long flags);
|
||||||
|
|
||||||
|
/** \brief Commit a new distances structure.
|
||||||
|
*
|
||||||
|
* This is similar to hwloc_distances_add_commit()
|
||||||
|
* but this variant is designed for backend inserting
|
||||||
|
* distances during topology discovery.
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int
|
||||||
|
hwloc_backend_distances_add_commit(hwloc_topology_t topology,
|
||||||
|
hwloc_backend_distances_add_handle_t handle,
|
||||||
|
unsigned long flags);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
55
src/3rdparty/hwloc/include/hwloc/rename.h
vendored
55
src/3rdparty/hwloc/include/hwloc/rename.h
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* Copyright © 2010-2020 Inria. All rights reserved.
|
* Copyright © 2010-2024 Inria. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -120,6 +120,12 @@ extern "C" {
|
|||||||
#define HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM HWLOC_NAME_CAPS(TOPOLOGY_FLAG_IS_THISSYSTEM)
|
#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)
|
#define HWLOC_TOPOLOGY_FLAG_THISSYSTEM_ALLOWED_RESOURCES HWLOC_NAME_CAPS(TOPOLOGY_FLAG_THISSYSTEM_ALLOWED_RESOURCES)
|
||||||
#define HWLOC_TOPOLOGY_FLAG_IMPORT_SUPPORT HWLOC_NAME_CAPS(TOPOLOGY_FLAG_IMPORT_SUPPORT)
|
#define HWLOC_TOPOLOGY_FLAG_IMPORT_SUPPORT HWLOC_NAME_CAPS(TOPOLOGY_FLAG_IMPORT_SUPPORT)
|
||||||
|
#define HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING HWLOC_NAME_CAPS(TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING)
|
||||||
|
#define HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_MEMBINDING HWLOC_NAME_CAPS(TOPOLOGY_FLAG_RESTRICT_TO_MEMBINDING)
|
||||||
|
#define HWLOC_TOPOLOGY_FLAG_DONT_CHANGE_BINDING HWLOC_NAME_CAPS(TOPOLOGY_FLAG_DONT_CHANGE_BINDING)
|
||||||
|
#define HWLOC_TOPOLOGY_FLAG_NO_DISTANCES HWLOC_NAME_CAPS(TOPOLOGY_FLAG_NO_DISTANCES)
|
||||||
|
#define HWLOC_TOPOLOGY_FLAG_NO_MEMATTRS HWLOC_NAME_CAPS(TOPOLOGY_FLAG_NO_MEMATTRS)
|
||||||
|
#define HWLOC_TOPOLOGY_FLAG_NO_CPUKINDS HWLOC_NAME_CAPS(TOPOLOGY_FLAG_NO_CPUKINDS)
|
||||||
|
|
||||||
#define hwloc_topology_set_pid HWLOC_NAME(topology_set_pid)
|
#define hwloc_topology_set_pid HWLOC_NAME(topology_set_pid)
|
||||||
#define hwloc_topology_set_synthetic HWLOC_NAME(topology_set_synthetic)
|
#define hwloc_topology_set_synthetic HWLOC_NAME(topology_set_synthetic)
|
||||||
@@ -170,6 +176,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define hwloc_topology_insert_misc_object HWLOC_NAME(topology_insert_misc_object)
|
#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_alloc_group_object HWLOC_NAME(topology_alloc_group_object)
|
||||||
|
#define hwloc_topology_free_group_object HWLOC_NAME(topology_free_group_object)
|
||||||
#define hwloc_topology_insert_group_object HWLOC_NAME(topology_insert_group_object)
|
#define hwloc_topology_insert_group_object HWLOC_NAME(topology_insert_group_object)
|
||||||
#define hwloc_obj_add_other_obj_sets HWLOC_NAME(obj_add_other_obj_sets)
|
#define hwloc_obj_add_other_obj_sets HWLOC_NAME(obj_add_other_obj_sets)
|
||||||
#define hwloc_topology_refresh HWLOC_NAME(topology_refresh)
|
#define hwloc_topology_refresh HWLOC_NAME(topology_refresh)
|
||||||
@@ -203,6 +210,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define hwloc_obj_get_info_by_name HWLOC_NAME(obj_get_info_by_name)
|
#define hwloc_obj_get_info_by_name HWLOC_NAME(obj_get_info_by_name)
|
||||||
#define hwloc_obj_add_info HWLOC_NAME(obj_add_info)
|
#define hwloc_obj_add_info HWLOC_NAME(obj_add_info)
|
||||||
|
#define hwloc_obj_set_subtype HWLOC_NAME(obj_set_subtype)
|
||||||
|
|
||||||
#define HWLOC_CPUBIND_PROCESS HWLOC_NAME_CAPS(CPUBIND_PROCESS)
|
#define HWLOC_CPUBIND_PROCESS HWLOC_NAME_CAPS(CPUBIND_PROCESS)
|
||||||
#define HWLOC_CPUBIND_THREAD HWLOC_NAME_CAPS(CPUBIND_THREAD)
|
#define HWLOC_CPUBIND_THREAD HWLOC_NAME_CAPS(CPUBIND_THREAD)
|
||||||
@@ -225,6 +233,7 @@ extern "C" {
|
|||||||
#define HWLOC_MEMBIND_FIRSTTOUCH HWLOC_NAME_CAPS(MEMBIND_FIRSTTOUCH)
|
#define HWLOC_MEMBIND_FIRSTTOUCH HWLOC_NAME_CAPS(MEMBIND_FIRSTTOUCH)
|
||||||
#define HWLOC_MEMBIND_BIND HWLOC_NAME_CAPS(MEMBIND_BIND)
|
#define HWLOC_MEMBIND_BIND HWLOC_NAME_CAPS(MEMBIND_BIND)
|
||||||
#define HWLOC_MEMBIND_INTERLEAVE HWLOC_NAME_CAPS(MEMBIND_INTERLEAVE)
|
#define HWLOC_MEMBIND_INTERLEAVE HWLOC_NAME_CAPS(MEMBIND_INTERLEAVE)
|
||||||
|
#define HWLOC_MEMBIND_WEIGHTED_INTERLEAVE HWLOC_NAME_CAPS(MEMBIND_WEIGHTED_INTERLEAVE)
|
||||||
#define HWLOC_MEMBIND_NEXTTOUCH HWLOC_NAME_CAPS(MEMBIND_NEXTTOUCH)
|
#define HWLOC_MEMBIND_NEXTTOUCH HWLOC_NAME_CAPS(MEMBIND_NEXTTOUCH)
|
||||||
#define HWLOC_MEMBIND_MIXED HWLOC_NAME_CAPS(MEMBIND_MIXED)
|
#define HWLOC_MEMBIND_MIXED HWLOC_NAME_CAPS(MEMBIND_MIXED)
|
||||||
|
|
||||||
@@ -356,6 +365,7 @@ extern "C" {
|
|||||||
#define hwloc_get_closest_objs HWLOC_NAME(get_closest_objs)
|
#define hwloc_get_closest_objs HWLOC_NAME(get_closest_objs)
|
||||||
#define hwloc_get_obj_below_by_type HWLOC_NAME(get_obj_below_by_type)
|
#define hwloc_get_obj_below_by_type HWLOC_NAME(get_obj_below_by_type)
|
||||||
#define hwloc_get_obj_below_array_by_type HWLOC_NAME(get_obj_below_array_by_type)
|
#define hwloc_get_obj_below_array_by_type HWLOC_NAME(get_obj_below_array_by_type)
|
||||||
|
#define hwloc_get_obj_with_same_locality HWLOC_NAME(get_obj_with_same_locality)
|
||||||
#define hwloc_distrib_flags_e HWLOC_NAME(distrib_flags_e)
|
#define hwloc_distrib_flags_e HWLOC_NAME(distrib_flags_e)
|
||||||
#define HWLOC_DISTRIB_FLAG_REVERSE HWLOC_NAME_CAPS(DISTRIB_FLAG_REVERSE)
|
#define HWLOC_DISTRIB_FLAG_REVERSE HWLOC_NAME_CAPS(DISTRIB_FLAG_REVERSE)
|
||||||
#define hwloc_distrib HWLOC_NAME(distrib)
|
#define hwloc_distrib HWLOC_NAME(distrib)
|
||||||
@@ -377,6 +387,11 @@ extern "C" {
|
|||||||
#define HWLOC_MEMATTR_ID_LOCALITY HWLOC_NAME_CAPS(MEMATTR_ID_LOCALITY)
|
#define HWLOC_MEMATTR_ID_LOCALITY HWLOC_NAME_CAPS(MEMATTR_ID_LOCALITY)
|
||||||
#define HWLOC_MEMATTR_ID_BANDWIDTH HWLOC_NAME_CAPS(MEMATTR_ID_BANDWIDTH)
|
#define HWLOC_MEMATTR_ID_BANDWIDTH HWLOC_NAME_CAPS(MEMATTR_ID_BANDWIDTH)
|
||||||
#define HWLOC_MEMATTR_ID_LATENCY HWLOC_NAME_CAPS(MEMATTR_ID_LATENCY)
|
#define HWLOC_MEMATTR_ID_LATENCY HWLOC_NAME_CAPS(MEMATTR_ID_LATENCY)
|
||||||
|
#define HWLOC_MEMATTR_ID_READ_BANDWIDTH HWLOC_NAME_CAPS(MEMATTR_ID_READ_BANDWIDTH)
|
||||||
|
#define HWLOC_MEMATTR_ID_WRITE_BANDWIDTH HWLOC_NAME_CAPS(MEMATTR_ID_WRITE_BANDWIDTH)
|
||||||
|
#define HWLOC_MEMATTR_ID_READ_LATENCY HWLOC_NAME_CAPS(MEMATTR_ID_READ_LATENCY)
|
||||||
|
#define HWLOC_MEMATTR_ID_WRITE_LATENCY HWLOC_NAME_CAPS(MEMATTR_ID_WRITE_LATENCY)
|
||||||
|
#define HWLOC_MEMATTR_ID_MAX HWLOC_NAME_CAPS(MEMATTR_ID_MAX)
|
||||||
|
|
||||||
#define hwloc_memattr_id_t HWLOC_NAME(memattr_id_t)
|
#define hwloc_memattr_id_t HWLOC_NAME(memattr_id_t)
|
||||||
#define hwloc_memattr_get_by_name HWLOC_NAME(memattr_get_by_name)
|
#define hwloc_memattr_get_by_name HWLOC_NAME(memattr_get_by_name)
|
||||||
@@ -454,11 +469,22 @@ extern "C" {
|
|||||||
#define hwloc_distances_obj_index HWLOC_NAME(distances_obj_index)
|
#define hwloc_distances_obj_index HWLOC_NAME(distances_obj_index)
|
||||||
#define hwloc_distances_obj_pair_values HWLOC_NAME(distances_pair_values)
|
#define hwloc_distances_obj_pair_values HWLOC_NAME(distances_pair_values)
|
||||||
|
|
||||||
|
#define hwloc_distances_transform_e HWLOC_NAME(distances_transform_e)
|
||||||
|
#define HWLOC_DISTANCES_TRANSFORM_REMOVE_NULL HWLOC_NAME_CAPS(DISTANCES_TRANSFORM_REMOVE_NULL)
|
||||||
|
#define HWLOC_DISTANCES_TRANSFORM_LINKS HWLOC_NAME_CAPS(DISTANCES_TRANSFORM_LINKS)
|
||||||
|
#define HWLOC_DISTANCES_TRANSFORM_MERGE_SWITCH_PORTS HWLOC_NAME_CAPS(DISTANCES_TRANSFORM_MERGE_SWITCH_PORTS)
|
||||||
|
#define HWLOC_DISTANCES_TRANSFORM_TRANSITIVE_CLOSURE HWLOC_NAME_CAPS(DISTANCES_TRANSFORM_TRANSITIVE_CLOSURE)
|
||||||
|
#define hwloc_distances_transform HWLOC_NAME(distances_transform)
|
||||||
|
|
||||||
#define hwloc_distances_add_flag_e HWLOC_NAME(distances_add_flag_e)
|
#define hwloc_distances_add_flag_e HWLOC_NAME(distances_add_flag_e)
|
||||||
#define HWLOC_DISTANCES_ADD_FLAG_GROUP HWLOC_NAME_CAPS(DISTANCES_ADD_FLAG_GROUP)
|
#define HWLOC_DISTANCES_ADD_FLAG_GROUP HWLOC_NAME_CAPS(DISTANCES_ADD_FLAG_GROUP)
|
||||||
#define HWLOC_DISTANCES_ADD_FLAG_GROUP_INACCURATE HWLOC_NAME_CAPS(DISTANCES_ADD_FLAG_GROUP_INACCURATE)
|
#define HWLOC_DISTANCES_ADD_FLAG_GROUP_INACCURATE HWLOC_NAME_CAPS(DISTANCES_ADD_FLAG_GROUP_INACCURATE)
|
||||||
|
|
||||||
#define hwloc_distances_add HWLOC_NAME(distances_add)
|
#define hwloc_distances_add_handle_t HWLOC_NAME(distances_add_handle_t)
|
||||||
|
#define hwloc_distances_add_create HWLOC_NAME(distances_add_create)
|
||||||
|
#define hwloc_distances_add_values HWLOC_NAME(distances_add_values)
|
||||||
|
#define hwloc_distances_add_commit HWLOC_NAME(distances_add_commit)
|
||||||
|
|
||||||
#define hwloc_distances_remove HWLOC_NAME(distances_remove)
|
#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_depth HWLOC_NAME(distances_remove_by_depth)
|
||||||
#define hwloc_distances_remove_by_type HWLOC_NAME(distances_remove_by_type)
|
#define hwloc_distances_remove_by_type HWLOC_NAME(distances_remove_by_type)
|
||||||
@@ -523,6 +549,11 @@ extern "C" {
|
|||||||
#define hwloc_linux_get_tid_last_cpu_location HWLOC_NAME(linux_get_tid_last_cpu_location)
|
#define hwloc_linux_get_tid_last_cpu_location HWLOC_NAME(linux_get_tid_last_cpu_location)
|
||||||
#define hwloc_linux_read_path_as_cpumask HWLOC_NAME(linux_read_file_cpumask)
|
#define hwloc_linux_read_path_as_cpumask HWLOC_NAME(linux_read_file_cpumask)
|
||||||
|
|
||||||
|
/* windows.h */
|
||||||
|
|
||||||
|
#define hwloc_windows_get_nr_processor_groups HWLOC_NAME(windows_get_nr_processor_groups)
|
||||||
|
#define hwloc_windows_get_processor_group_cpuset HWLOC_NAME(windows_get_processor_group_cpuset)
|
||||||
|
|
||||||
/* openfabrics-verbs.h */
|
/* openfabrics-verbs.h */
|
||||||
|
|
||||||
#define hwloc_ibv_get_device_cpuset HWLOC_NAME(ibv_get_device_cpuset)
|
#define hwloc_ibv_get_device_cpuset HWLOC_NAME(ibv_get_device_cpuset)
|
||||||
@@ -531,6 +562,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* opencl.h */
|
/* opencl.h */
|
||||||
|
|
||||||
|
#define hwloc_cl_device_pci_bus_info_khr HWLOC_NAME(cl_device_pci_bus_info_khr)
|
||||||
#define hwloc_cl_device_topology_amd HWLOC_NAME(cl_device_topology_amd)
|
#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_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_cpuset HWLOC_NAME(opencl_get_device_cpuset)
|
||||||
@@ -564,6 +596,11 @@ extern "C" {
|
|||||||
#define hwloc_rsmi_get_device_osdev HWLOC_NAME(rsmi_get_device_osdev)
|
#define hwloc_rsmi_get_device_osdev HWLOC_NAME(rsmi_get_device_osdev)
|
||||||
#define hwloc_rsmi_get_device_osdev_by_index HWLOC_NAME(rsmi_get_device_osdev_by_index)
|
#define hwloc_rsmi_get_device_osdev_by_index HWLOC_NAME(rsmi_get_device_osdev_by_index)
|
||||||
|
|
||||||
|
/* levelzero.h */
|
||||||
|
|
||||||
|
#define hwloc_levelzero_get_device_cpuset HWLOC_NAME(levelzero_get_device_cpuset)
|
||||||
|
#define hwloc_levelzero_get_device_osdev HWLOC_NAME(levelzero_get_device_osdev)
|
||||||
|
|
||||||
/* gl.h */
|
/* gl.h */
|
||||||
|
|
||||||
#define hwloc_gl_get_display_osdev_by_port_device HWLOC_NAME(gl_get_display_osdev_by_port_device)
|
#define hwloc_gl_get_display_osdev_by_port_device HWLOC_NAME(gl_get_display_osdev_by_port_device)
|
||||||
@@ -620,10 +657,18 @@ extern "C" {
|
|||||||
#define hwloc_pcidisc_tree_insert_by_busid HWLOC_NAME(pcidisc_tree_insert_by_busid)
|
#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_tree_attach HWLOC_NAME(pcidisc_tree_attach)
|
||||||
|
|
||||||
|
#define hwloc_pci_find_by_busid HWLOC_NAME(pcidisc_find_by_busid)
|
||||||
#define hwloc_pci_find_parent_by_busid HWLOC_NAME(pcidisc_find_busid_parent)
|
#define hwloc_pci_find_parent_by_busid HWLOC_NAME(pcidisc_find_busid_parent)
|
||||||
|
|
||||||
|
#define hwloc_backend_distances_add_handle_t HWLOC_NAME(backend_distances_add_handle_t)
|
||||||
|
#define hwloc_backend_distances_add_create HWLOC_NAME(backend_distances_add_create)
|
||||||
|
#define hwloc_backend_distances_add_values HWLOC_NAME(backend_distances_add_values)
|
||||||
|
#define hwloc_backend_distances_add_commit HWLOC_NAME(backend_distances_add_commit)
|
||||||
|
|
||||||
/* hwloc/deprecated.h */
|
/* hwloc/deprecated.h */
|
||||||
|
|
||||||
|
#define hwloc_distances_add HWLOC_NAME(distances_add)
|
||||||
|
|
||||||
#define hwloc_topology_insert_misc_object_by_parent HWLOC_NAME(topology_insert_misc_object_by_parent)
|
#define hwloc_topology_insert_misc_object_by_parent HWLOC_NAME(topology_insert_misc_object_by_parent)
|
||||||
#define hwloc_obj_cpuset_snprintf HWLOC_NAME(obj_cpuset_snprintf)
|
#define hwloc_obj_cpuset_snprintf HWLOC_NAME(obj_cpuset_snprintf)
|
||||||
#define hwloc_obj_type_sscanf HWLOC_NAME(obj_type_sscanf)
|
#define hwloc_obj_type_sscanf HWLOC_NAME(obj_type_sscanf)
|
||||||
@@ -673,6 +718,8 @@ extern "C" {
|
|||||||
#define hwloc__obj_type_is_dcache HWLOC_NAME(_obj_type_is_dcache)
|
#define hwloc__obj_type_is_dcache HWLOC_NAME(_obj_type_is_dcache)
|
||||||
#define hwloc__obj_type_is_icache HWLOC_NAME(_obj_type_is_icache)
|
#define hwloc__obj_type_is_icache HWLOC_NAME(_obj_type_is_icache)
|
||||||
|
|
||||||
|
#define hwloc__pci_link_speed HWLOC_NAME(_pci_link_speed)
|
||||||
|
|
||||||
/* private/cpuid-x86.h */
|
/* private/cpuid-x86.h */
|
||||||
|
|
||||||
#define hwloc_have_x86_cpuid HWLOC_NAME(have_x86_cpuid)
|
#define hwloc_have_x86_cpuid HWLOC_NAME(have_x86_cpuid)
|
||||||
@@ -733,6 +780,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define hwloc_cuda_component HWLOC_NAME(cuda_component)
|
#define hwloc_cuda_component HWLOC_NAME(cuda_component)
|
||||||
#define hwloc_gl_component HWLOC_NAME(gl_component)
|
#define hwloc_gl_component HWLOC_NAME(gl_component)
|
||||||
|
#define hwloc_levelzero_component HWLOC_NAME(levelzero_component)
|
||||||
#define hwloc_nvml_component HWLOC_NAME(nvml_component)
|
#define hwloc_nvml_component HWLOC_NAME(nvml_component)
|
||||||
#define hwloc_rsmi_component HWLOC_NAME(rsmi_component)
|
#define hwloc_rsmi_component HWLOC_NAME(rsmi_component)
|
||||||
#define hwloc_opencl_component HWLOC_NAME(opencl_component)
|
#define hwloc_opencl_component HWLOC_NAME(opencl_component)
|
||||||
@@ -772,7 +820,6 @@ extern "C" {
|
|||||||
#define hwloc_pci_discovery_init HWLOC_NAME(pci_discovery_init)
|
#define hwloc_pci_discovery_init HWLOC_NAME(pci_discovery_init)
|
||||||
#define hwloc_pci_discovery_prepare HWLOC_NAME(pci_discovery_prepare)
|
#define hwloc_pci_discovery_prepare HWLOC_NAME(pci_discovery_prepare)
|
||||||
#define hwloc_pci_discovery_exit HWLOC_NAME(pci_discovery_exit)
|
#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_find_insert_io_parent_by_complete_cpuset HWLOC_NAME(hwloc_find_insert_io_parent_by_complete_cpuset)
|
||||||
|
|
||||||
#define hwloc__add_info HWLOC_NAME(_add_info)
|
#define hwloc__add_info HWLOC_NAME(_add_info)
|
||||||
@@ -816,7 +863,6 @@ extern "C" {
|
|||||||
#define hwloc_internal_distances_dup HWLOC_NAME(internal_distances_dup)
|
#define hwloc_internal_distances_dup HWLOC_NAME(internal_distances_dup)
|
||||||
#define hwloc_internal_distances_refresh HWLOC_NAME(internal_distances_refresh)
|
#define hwloc_internal_distances_refresh HWLOC_NAME(internal_distances_refresh)
|
||||||
#define hwloc_internal_distances_destroy HWLOC_NAME(internal_distances_destroy)
|
#define hwloc_internal_distances_destroy HWLOC_NAME(internal_distances_destroy)
|
||||||
|
|
||||||
#define hwloc_internal_distances_add HWLOC_NAME(internal_distances_add)
|
#define hwloc_internal_distances_add HWLOC_NAME(internal_distances_add)
|
||||||
#define hwloc_internal_distances_add_by_index HWLOC_NAME(internal_distances_add_by_index)
|
#define hwloc_internal_distances_add_by_index HWLOC_NAME(internal_distances_add_by_index)
|
||||||
#define hwloc_internal_distances_invalidate_cached_objs HWLOC_NAME(hwloc_internal_distances_invalidate_cached_objs)
|
#define hwloc_internal_distances_invalidate_cached_objs HWLOC_NAME(hwloc_internal_distances_invalidate_cached_objs)
|
||||||
@@ -830,6 +876,7 @@ extern "C" {
|
|||||||
#define hwloc_internal_memattrs_destroy HWLOC_NAME(internal_memattrs_destroy)
|
#define hwloc_internal_memattrs_destroy HWLOC_NAME(internal_memattrs_destroy)
|
||||||
#define hwloc_internal_memattrs_need_refresh HWLOC_NAME(internal_memattrs_need_refresh)
|
#define hwloc_internal_memattrs_need_refresh HWLOC_NAME(internal_memattrs_need_refresh)
|
||||||
#define hwloc_internal_memattrs_refresh HWLOC_NAME(internal_memattrs_refresh)
|
#define hwloc_internal_memattrs_refresh HWLOC_NAME(internal_memattrs_refresh)
|
||||||
|
#define hwloc_internal_memattrs_guess_memory_tiers HWLOC_NAME(internal_memattrs_guess_memory_tiers)
|
||||||
|
|
||||||
#define hwloc_internal_cpukind_s HWLOC_NAME(internal_cpukind_s)
|
#define hwloc_internal_cpukind_s HWLOC_NAME(internal_cpukind_s)
|
||||||
#define hwloc_internal_cpukinds_init HWLOC_NAME(internal_cpukinds_init)
|
#define hwloc_internal_cpukinds_init HWLOC_NAME(internal_cpukinds_init)
|
||||||
|
|||||||
17
src/3rdparty/hwloc/include/hwloc/rsmi.h
vendored
17
src/3rdparty/hwloc/include/hwloc/rsmi.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2012-2020 Inria. All rights reserved.
|
* Copyright © 2012-2023 Inria. All rights reserved.
|
||||||
* Copyright (c) 2020, Advanced Micro Devices, Inc. All rights reserved.
|
* Copyright (c) 2020, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
* Written by Advanced Micro Devices,
|
* Written by Advanced Micro Devices,
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -41,7 +41,7 @@ extern "C" {
|
|||||||
/** \brief Get the CPU set of logical processors that are physically
|
/** \brief Get the CPU set of logical processors that are physically
|
||||||
* close to AMD GPU device whose index is \p dv_ind.
|
* close to AMD GPU device whose index is \p dv_ind.
|
||||||
*
|
*
|
||||||
* Return the CPU set describing the locality of the AMD GPU device
|
* Store in \p set the CPU-set describing the locality of the AMD GPU device
|
||||||
* whose index is \p dv_ind.
|
* whose index is \p dv_ind.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p dv_ind must match the local machine.
|
* Topology \p topology and device \p dv_ind must match the local machine.
|
||||||
@@ -55,6 +55,9 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* This function is currently only implemented in a meaningful way for
|
* This function is currently only implemented in a meaningful way for
|
||||||
* Linux; other systems will simply get a full cpuset.
|
* Linux; other systems will simply get a full cpuset.
|
||||||
|
*
|
||||||
|
* \return 0 on success.
|
||||||
|
* \return -1 on error, for instance if device information could not be found.
|
||||||
*/
|
*/
|
||||||
static __hwloc_inline int
|
static __hwloc_inline int
|
||||||
hwloc_rsmi_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
hwloc_rsmi_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||||
@@ -96,8 +99,9 @@ hwloc_rsmi_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
|
|||||||
/** \brief Get the hwloc OS device object corresponding to the
|
/** \brief Get the hwloc OS device object corresponding to the
|
||||||
* AMD GPU device whose index is \p dv_ind.
|
* AMD GPU device whose index is \p dv_ind.
|
||||||
*
|
*
|
||||||
* Return the OS device object describing the AMD GPU device whose
|
* \return The hwloc OS device object describing the AMD GPU device whose
|
||||||
* index is \p dv_ind. Returns NULL if there is none.
|
* index is \p dv_ind.
|
||||||
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* The topology \p topology does not necessarily have to match the current
|
* The topology \p topology does not necessarily have to match the current
|
||||||
* machine. For instance the topology may be an XML import of a remote host.
|
* machine. For instance the topology may be an XML import of a remote host.
|
||||||
@@ -124,8 +128,9 @@ hwloc_rsmi_get_device_osdev_by_index(hwloc_topology_t topology, uint32_t dv_ind)
|
|||||||
/** \brief Get the hwloc OS device object corresponding to AMD GPU device,
|
/** \brief Get the hwloc OS device object corresponding to AMD GPU device,
|
||||||
* whose index is \p dv_ind.
|
* whose index is \p dv_ind.
|
||||||
*
|
*
|
||||||
* Return the hwloc OS device object that describes the given
|
* \return The hwloc OS device object that describes the given
|
||||||
* AMD GPU, whose index is \p dv_ind Return NULL if there is none.
|
* AMD GPU, whose index is \p dv_ind.
|
||||||
|
* \return \c NULL if none could be found.
|
||||||
*
|
*
|
||||||
* Topology \p topology and device \p dv_ind must match the local machine.
|
* Topology \p topology and device \p dv_ind must match the local machine.
|
||||||
* I/O devices detection and the ROCm SMI component must be enabled in the
|
* I/O devices detection and the ROCm SMI component must be enabled in the
|
||||||
|
|||||||
17
src/3rdparty/hwloc/include/hwloc/shmem.h
vendored
17
src/3rdparty/hwloc/include/hwloc/shmem.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2013-2018 Inria. All rights reserved.
|
* Copyright © 2013-2023 Inria. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -48,6 +48,8 @@ extern "C" {
|
|||||||
* This length (in bytes) must be used in hwloc_shmem_topology_write()
|
* This length (in bytes) must be used in hwloc_shmem_topology_write()
|
||||||
* and hwloc_shmem_topology_adopt() later.
|
* and hwloc_shmem_topology_adopt() later.
|
||||||
*
|
*
|
||||||
|
* \return the length, or -1 on error, for instance if flags are invalid.
|
||||||
|
*
|
||||||
* \note Flags \p flags are currently unused, must be 0.
|
* \note Flags \p flags are currently unused, must be 0.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_shmem_topology_get_length(hwloc_topology_t topology,
|
HWLOC_DECLSPEC int hwloc_shmem_topology_get_length(hwloc_topology_t topology,
|
||||||
@@ -74,9 +76,10 @@ HWLOC_DECLSPEC int hwloc_shmem_topology_get_length(hwloc_topology_t topology,
|
|||||||
* is not. However the caller may also allocate it manually in shared memory
|
* is not. However the caller may also allocate it manually in shared memory
|
||||||
* to share it as well.
|
* to share it as well.
|
||||||
*
|
*
|
||||||
* \return -1 with errno set to EBUSY if the virtual memory mapping defined
|
* \return 0 on success.
|
||||||
|
* \return -1 with errno set to \c EBUSY if the virtual memory mapping defined
|
||||||
* by \p mmap_address and \p length isn't available in the process.
|
* by \p mmap_address and \p length isn't available in the process.
|
||||||
* \return -1 with errno set to EINVAL if \p fileoffset, \p mmap_address
|
* \return -1 with errno set to \c EINVAL if \p fileoffset, \p mmap_address
|
||||||
* or \p length aren't page-aligned.
|
* or \p length aren't page-aligned.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_shmem_topology_write(hwloc_topology_t topology,
|
HWLOC_DECLSPEC int hwloc_shmem_topology_write(hwloc_topology_t topology,
|
||||||
@@ -112,14 +115,16 @@ HWLOC_DECLSPEC int hwloc_shmem_topology_write(hwloc_topology_t topology,
|
|||||||
*
|
*
|
||||||
* \note This function takes care of calling hwloc_topology_abi_check().
|
* \note This function takes care of calling hwloc_topology_abi_check().
|
||||||
*
|
*
|
||||||
* \return -1 with errno set to EBUSY if the virtual memory mapping defined
|
* \return 0 on success.
|
||||||
|
*
|
||||||
|
* \return -1 with errno set to \c EBUSY if the virtual memory mapping defined
|
||||||
* by \p mmap_address and \p length isn't available in the process.
|
* by \p mmap_address and \p length isn't available in the process.
|
||||||
*
|
*
|
||||||
* \return -1 with errno set to EINVAL if \p fileoffset, \p mmap_address
|
* \return -1 with errno set to \c EINVAL if \p fileoffset, \p mmap_address
|
||||||
* or \p length aren't page-aligned, or do not match what was given to
|
* or \p length aren't page-aligned, or do not match what was given to
|
||||||
* hwloc_shmem_topology_write() earlier.
|
* hwloc_shmem_topology_write() earlier.
|
||||||
*
|
*
|
||||||
* \return -1 with errno set to EINVAL if the layout of the topology structure
|
* \return -1 with errno set to \c EINVAL if the layout of the topology structure
|
||||||
* is different between the writer process and the adopter process.
|
* is different between the writer process and the adopter process.
|
||||||
*/
|
*/
|
||||||
HWLOC_DECLSPEC int hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp,
|
HWLOC_DECLSPEC int hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp,
|
||||||
|
|||||||
76
src/3rdparty/hwloc/include/hwloc/windows.h
vendored
Normal file
76
src/3rdparty/hwloc/include/hwloc/windows.h
vendored
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2021 Inria. All rights reserved.
|
||||||
|
* See COPYING in top-level directory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** \file
|
||||||
|
* \brief Macros to help interaction between hwloc and Windows.
|
||||||
|
*
|
||||||
|
* Applications that use hwloc on Windows may want to include this file
|
||||||
|
* for Windows specific hwloc features.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HWLOC_WINDOWS_H
|
||||||
|
#define HWLOC_WINDOWS_H
|
||||||
|
|
||||||
|
#include "hwloc.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/** \defgroup hwlocality_windows Windows-specific helpers
|
||||||
|
*
|
||||||
|
* These functions query Windows processor groups.
|
||||||
|
* These groups partition the operating system into virtual sets
|
||||||
|
* of up to 64 neighbor PUs.
|
||||||
|
* Threads and processes may only be bound inside a single group.
|
||||||
|
* Although Windows processor groups may be exposed in the hwloc
|
||||||
|
* hierarchy as hwloc Groups, they are also often merged into
|
||||||
|
* existing hwloc objects such as NUMA nodes or Packages.
|
||||||
|
* This API provides explicit information about Windows processor
|
||||||
|
* groups so that applications know whether binding to a large
|
||||||
|
* set of PUs may fail because it spans over multiple Windows
|
||||||
|
* processor groups.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/** \brief Get the number of Windows processor groups
|
||||||
|
*
|
||||||
|
* \p flags must be 0 for now.
|
||||||
|
*
|
||||||
|
* \return at least \c 1 on success.
|
||||||
|
* \return -1 on error, for instance if the topology does not match
|
||||||
|
* the current system (e.g. loaded from another machine through XML).
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int hwloc_windows_get_nr_processor_groups(hwloc_topology_t topology, unsigned long flags);
|
||||||
|
|
||||||
|
/** \brief Get the CPU-set of a Windows processor group.
|
||||||
|
*
|
||||||
|
* Get the set of PU included in the processor group specified
|
||||||
|
* by \p pg_index.
|
||||||
|
* \p pg_index must be between \c 0 and the value returned
|
||||||
|
* by hwloc_windows_get_nr_processor_groups() minus 1.
|
||||||
|
*
|
||||||
|
* \p flags must be 0 for now.
|
||||||
|
*
|
||||||
|
* \return \c 0 on success.
|
||||||
|
* \return \c -1 on error, for instance if \p pg_index is invalid,
|
||||||
|
* or if the topology does not match the current system (e.g. loaded
|
||||||
|
* from another machine through XML).
|
||||||
|
*/
|
||||||
|
HWLOC_DECLSPEC int hwloc_windows_get_processor_group_cpuset(hwloc_topology_t topology, unsigned pg_index, hwloc_cpuset_t cpuset, unsigned long flags);
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* HWLOC_WINDOWS_H */
|
||||||
@@ -17,6 +17,10 @@
|
|||||||
|
|
||||||
#define HWLOC_HAVE_MSVC_CPUIDEX 1
|
#define HWLOC_HAVE_MSVC_CPUIDEX 1
|
||||||
|
|
||||||
|
/* #undef HAVE_MKSTEMP */
|
||||||
|
|
||||||
|
#define HWLOC_HAVE_X86_CPUID 1
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `CACHE_DESCRIPTOR'. */
|
/* Define to 1 if the system has the type `CACHE_DESCRIPTOR'. */
|
||||||
#define HAVE_CACHE_DESCRIPTOR 0
|
#define HAVE_CACHE_DESCRIPTOR 0
|
||||||
|
|
||||||
@@ -128,8 +132,7 @@
|
|||||||
#define HAVE_DECL__SC_PAGE_SIZE 0
|
#define HAVE_DECL__SC_PAGE_SIZE 0
|
||||||
|
|
||||||
/* Define to 1 if you have the <dirent.h> header file. */
|
/* Define to 1 if you have the <dirent.h> header file. */
|
||||||
/* #define HAVE_DIRENT_H 1 */
|
/* #undef HAVE_DIRENT_H */
|
||||||
#undef HAVE_DIRENT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
/* #undef HAVE_DLFCN_H */
|
/* #undef HAVE_DLFCN_H */
|
||||||
@@ -282,7 +285,7 @@
|
|||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `strncasecmp' function. */
|
/* Define to 1 if you have the `strncasecmp' function. */
|
||||||
#define HAVE_STRNCASECMP 1
|
/* #undef HAVE_STRNCASECMP */
|
||||||
|
|
||||||
/* Define to '1' if sysctl is present and usable */
|
/* Define to '1' if sysctl is present and usable */
|
||||||
/* #undef HAVE_SYSCTL */
|
/* #undef HAVE_SYSCTL */
|
||||||
@@ -290,10 +293,6 @@
|
|||||||
/* Define to '1' if sysctlbyname is present and usable */
|
/* Define to '1' if sysctlbyname is present and usable */
|
||||||
/* #undef HAVE_SYSCTLBYNAME */
|
/* #undef HAVE_SYSCTLBYNAME */
|
||||||
|
|
||||||
/* Define to 1 if the system has the type
|
|
||||||
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION'. */
|
|
||||||
#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION 1
|
|
||||||
|
|
||||||
/* Define to 1 if the system has the type
|
/* Define to 1 if the system has the type
|
||||||
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX'. */
|
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX'. */
|
||||||
#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX 1
|
#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX 1
|
||||||
@@ -327,8 +326,7 @@
|
|||||||
/* #undef HAVE_UNAME */
|
/* #undef HAVE_UNAME */
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
/* #define HAVE_UNISTD_H 1 */
|
/* #undef HAVE_UNISTD_H */
|
||||||
#undef HAVE_UNISTD_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `uselocale' function. */
|
/* Define to 1 if you have the `uselocale' function. */
|
||||||
/* #undef HAVE_USELOCALE */
|
/* #undef HAVE_USELOCALE */
|
||||||
@@ -663,7 +661,7 @@
|
|||||||
#define hwloc_pid_t HANDLE
|
#define hwloc_pid_t HANDLE
|
||||||
|
|
||||||
/* Define this to either strncasecmp or strncmp */
|
/* Define this to either strncasecmp or strncmp */
|
||||||
#define hwloc_strncasecmp strncasecmp
|
/* #undef hwloc_strncasecmp */
|
||||||
|
|
||||||
/* Define this to the thread ID type */
|
/* Define this to the thread ID type */
|
||||||
#define hwloc_thread_t HANDLE
|
#define hwloc_thread_t HANDLE
|
||||||
|
|||||||
22
src/3rdparty/hwloc/include/private/cpuid-x86.h
vendored
22
src/3rdparty/hwloc/include/private/cpuid-x86.h
vendored
@@ -11,6 +11,22 @@
|
|||||||
#ifndef HWLOC_PRIVATE_CPUID_X86_H
|
#ifndef HWLOC_PRIVATE_CPUID_X86_H
|
||||||
#define HWLOC_PRIVATE_CPUID_X86_H
|
#define HWLOC_PRIVATE_CPUID_X86_H
|
||||||
|
|
||||||
|
/* A macro for annotating memory as uninitialized when building with MSAN
|
||||||
|
* (and otherwise having no effect). See below for why this is used with
|
||||||
|
* our custom assembly.
|
||||||
|
*/
|
||||||
|
#ifdef __has_feature
|
||||||
|
#define HWLOC_HAS_FEATURE(name) __has_feature(name)
|
||||||
|
#else
|
||||||
|
#define HWLOC_HAS_FEATURE(name) 0
|
||||||
|
#endif
|
||||||
|
#if HWLOC_HAS_FEATURE(memory_sanitizer) || defined(MEMORY_SANITIZER)
|
||||||
|
#include <sanitizer/msan_interface.h>
|
||||||
|
#define HWLOC_ANNOTATE_MEMORY_IS_INITIALIZED(ptr, len) __msan_unpoison(ptr, len)
|
||||||
|
#else
|
||||||
|
#define HWLOC_ANNOTATE_MEMORY_IS_INITIALIZED(ptr, len)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined HWLOC_X86_32_ARCH) && (!defined HWLOC_HAVE_MSVC_CPUIDEX)
|
#if (defined HWLOC_X86_32_ARCH) && (!defined HWLOC_HAVE_MSVC_CPUIDEX)
|
||||||
static __hwloc_inline int hwloc_have_x86_cpuid(void)
|
static __hwloc_inline int hwloc_have_x86_cpuid(void)
|
||||||
{
|
{
|
||||||
@@ -71,12 +87,18 @@ static __hwloc_inline void hwloc_x86_cpuid(unsigned *eax, unsigned *ebx, unsigne
|
|||||||
"movl %k2,%1\n\t"
|
"movl %k2,%1\n\t"
|
||||||
: "+a" (*eax), "=m" (*ebx), "=&r"(sav_rbx),
|
: "+a" (*eax), "=m" (*ebx), "=&r"(sav_rbx),
|
||||||
"+c" (*ecx), "=&d" (*edx));
|
"+c" (*ecx), "=&d" (*edx));
|
||||||
|
/* MSAN does not recognize the effect of the above assembly on the memory operand
|
||||||
|
* (`"=m"(*ebx)`). This may get improved in MSAN at some point in the future, e.g.
|
||||||
|
* see https://github.com/llvm/llvm-project/pull/77393. */
|
||||||
|
HWLOC_ANNOTATE_MEMORY_IS_INITIALIZED(ebx, sizeof *ebx);
|
||||||
#elif defined(HWLOC_X86_32_ARCH)
|
#elif defined(HWLOC_X86_32_ARCH)
|
||||||
__asm__(
|
__asm__(
|
||||||
"mov %%ebx,%1\n\t"
|
"mov %%ebx,%1\n\t"
|
||||||
"cpuid\n\t"
|
"cpuid\n\t"
|
||||||
"xchg %%ebx,%1\n\t"
|
"xchg %%ebx,%1\n\t"
|
||||||
: "+a" (*eax), "=&SD" (*ebx), "+c" (*ecx), "=&d" (*edx));
|
: "+a" (*eax), "=&SD" (*ebx), "+c" (*ecx), "=&d" (*edx));
|
||||||
|
/* See above. */
|
||||||
|
HWLOC_ANNOTATE_MEMORY_IS_INITIALIZED(ebx, sizeof *ebx);
|
||||||
#else
|
#else
|
||||||
#error unknown architecture
|
#error unknown architecture
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2018-2019 Inria. All rights reserved.
|
* Copyright © 2018-2020 Inria. All rights reserved.
|
||||||
*
|
*
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
*/
|
*/
|
||||||
@@ -31,6 +31,7 @@ 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_gl_component;
|
||||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_nvml_component;
|
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_nvml_component;
|
||||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_rsmi_component;
|
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_rsmi_component;
|
||||||
|
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_levelzero_component;
|
||||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_opencl_component;
|
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_opencl_component;
|
||||||
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_pci_component;
|
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_pci_component;
|
||||||
|
|
||||||
|
|||||||
35
src/3rdparty/hwloc/include/private/misc.h
vendored
35
src/3rdparty/hwloc/include/private/misc.h
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2009 CNRS
|
* Copyright © 2009 CNRS
|
||||||
* Copyright © 2009-2019 Inria. All rights reserved.
|
* Copyright © 2009-2024 Inria. All rights reserved.
|
||||||
* Copyright © 2009-2012 Université Bordeaux
|
* Copyright © 2009-2012 Université Bordeaux
|
||||||
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* See COPYING in top-level directory.
|
* See COPYING in top-level directory.
|
||||||
@@ -504,7 +504,7 @@ hwloc__obj_type_is_icache(hwloc_obj_type_t type)
|
|||||||
} \
|
} \
|
||||||
} while(0)
|
} while(0)
|
||||||
#else /* HAVE_USELOCALE */
|
#else /* HAVE_USELOCALE */
|
||||||
#if __HWLOC_HAVE_ATTRIBUTE_UNUSED
|
#if HWLOC_HAVE_ATTRIBUTE_UNUSED
|
||||||
#define hwloc_localeswitch_declare int __dummy_nolocale __hwloc_attribute_unused
|
#define hwloc_localeswitch_declare int __dummy_nolocale __hwloc_attribute_unused
|
||||||
#define hwloc_localeswitch_init()
|
#define hwloc_localeswitch_init()
|
||||||
#else
|
#else
|
||||||
@@ -573,4 +573,35 @@ typedef SSIZE_T ssize_t;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static __inline float
|
||||||
|
hwloc__pci_link_speed(unsigned generation, unsigned lanes)
|
||||||
|
{
|
||||||
|
float lanespeed;
|
||||||
|
/*
|
||||||
|
* These are single-direction bandwidths only.
|
||||||
|
*
|
||||||
|
* Gen1 used NRZ with 8/10 encoding.
|
||||||
|
* PCIe Gen1 = 2.5GT/s signal-rate per lane x 8/10 = 0.25GB/s data-rate per lane
|
||||||
|
* PCIe Gen2 = 5 GT/s signal-rate per lane x 8/10 = 0.5 GB/s data-rate per lane
|
||||||
|
* Gen3 switched to NRZ with 128/130 encoding.
|
||||||
|
* PCIe Gen3 = 8 GT/s signal-rate per lane x 128/130 = 1 GB/s data-rate per lane
|
||||||
|
* PCIe Gen4 = 16 GT/s signal-rate per lane x 128/130 = 2 GB/s data-rate per lane
|
||||||
|
* PCIe Gen5 = 32 GT/s signal-rate per lane x 128/130 = 4 GB/s data-rate per lane
|
||||||
|
* Gen6 switched to PAM with with 242/256 FLIT (242B payload protected by 8B CRC + 6B FEC).
|
||||||
|
* PCIe Gen6 = 64 GT/s signal-rate per lane x 242/256 = 8 GB/s data-rate per lane
|
||||||
|
* PCIe Gen7 = 128GT/s signal-rate per lane x 242/256 = 16 GB/s data-rate per lane
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* lanespeed in Gbit/s */
|
||||||
|
if (generation <= 2)
|
||||||
|
lanespeed = 2.5f * generation * 0.8f;
|
||||||
|
else if (generation <= 5)
|
||||||
|
lanespeed = 8.0f * (1<<(generation-3)) * 128/130;
|
||||||
|
else
|
||||||
|
lanespeed = 8.0f * (1<<(generation-3)) * 242/256; /* assume Gen8 will be 256 GT/s and so on */
|
||||||
|
|
||||||
|
/* linkspeed in GB/s */
|
||||||
|
return lanespeed * lanes / 8;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* HWLOC_PRIVATE_MISC_H */
|
#endif /* HWLOC_PRIVATE_MISC_H */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user