Commit bf4e415
Point hipconfig's ROCM_PATH towards dev packages if develop packages are installed (#2870)
PR based on #2428.
## Motivation
We'd like `hipconfig --rocmpath` to point towards `_rocm_sdk_devel` if
the `rocm[devel]` packages are installed. This is useful for code that
depends on `hipconfig --rocmpath` to resolve paths for ROCm files. Aimed
as a fix for #1880 and other
PyTorch issues that require the develop packages.
<!-- Explain the purpose of this PR and the goals it aims to achieve.
-->
## Technical Details
- The PR at #2428 successfully
directed `hipconfig --rocmpath` towards the `_rocm_sdk_devel` packages
on Windows but was running into some issues on Linux as we were still
using symlinks.
- Added a change so Linux also uses hardlinks to avoid this issue.
<!-- Explain the changes along with any relevant GitHub links. -->
## Test Plan
Linux:
- The unit test `testCLIUsesDevelRootPath` passes (`rocm-sdk test`
passes)
- Tested by installing without the devel packages and with the devel
packages
```
pip install --index-url https://rocm.devreleases.amd.com/v2-staging/gfx1151/ "rocm[libraries]==7.11.0.dev0+5d4dfe88517275760144e58af2e70af3dff5d2bc"
hipconfig --rocmpath
# /home/rocm/darren/hipconfig-test/.venv/lib/python3.12/site-packages/_rocm_sdk_core
pip install --index-url https://rocm.devreleases.amd.com/v2-staging/gfx1151/ "rocm[libraries,devel]==7.11.0.dev0+5d4dfe88517275760144e58af2e70af3dff5d2bc"
hipconfig --rocmpath
# /home/rocm/darren/hipconfig-test/.venv/lib/python3.12/site-packages/_rocm_sdk_devel
```
<!-- Explain any relevant testing done to verify this PR. -->
## Test Result
On Linux, the unit test passes and without the develop packages
`hipconfig --rocmpath` correctly points at the core packages. When the
develop packages are installed, it correctly expands and points tot he
develop packages.
<!-- Briefly summarize test outcomes. -->
## Submission Checklist
- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
---------
Co-authored-by: Scott Todd <scott.todd0@gmail.com>
Co-authored-by: darren-amd <darren-amd@users.noreply.github.com>1 parent 62ac8af commit bf4e415
5 files changed
Lines changed: 142 additions & 23 deletions
File tree
- build_tools/packaging/python/templates
- rocm-sdk-core/src/rocm_sdk_core
- rocm/src/rocm_sdk
- tests
- docs/packaging
Lines changed: 90 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
19 | 95 | | |
20 | 96 | | |
21 | 97 | | |
22 | 98 | | |
23 | 99 | | |
24 | | - | |
25 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
26 | 105 | | |
27 | 106 | | |
28 | 107 | | |
| |||
51 | 130 | | |
52 | 131 | | |
53 | 132 | | |
54 | | - | |
| 133 | + | |
55 | 134 | | |
56 | 135 | | |
57 | 136 | | |
| |||
71 | 150 | | |
72 | 151 | | |
73 | 152 | | |
74 | | - | |
| 153 | + | |
75 | 154 | | |
76 | 155 | | |
77 | 156 | | |
78 | 157 | | |
79 | 158 | | |
80 | 159 | | |
81 | 160 | | |
82 | | - | |
| 161 | + | |
83 | 162 | | |
84 | 163 | | |
85 | 164 | | |
86 | | - | |
| 165 | + | |
87 | 166 | | |
88 | 167 | | |
89 | 168 | | |
90 | | - | |
| 169 | + | |
91 | 170 | | |
92 | 171 | | |
93 | 172 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
150 | 156 | | |
151 | 157 | | |
152 | 158 | | |
| |||
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | | - | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
211 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
212 | 220 | | |
213 | 221 | | |
214 | 222 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
69 | 93 | | |
70 | 94 | | |
71 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
0 commit comments