Skip to content

Commit 88f7ead

Browse files
rocm: fix dnf install and add ROCM_HOME debug prints
install_rocjpeg.sh: drop non-existent libva-amdgpu and mesa-amdgpu-va-drivers from the explicit dnf install; rocjpeg-devel's RPM dependencies pull them in automatically per the official rocJPEG 7.2 package install docs. repair_wheel.py: remove hardcoded /opt/rocm fallback from _find_rocjpeg_license() and add debug prints to confirm ROCM_HOME is set correctly at wheel-repair time. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7639d20 commit 88f7ead

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

packaging/install_rocjpeg.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ sys.exit(0 if hits else 1)
3939
# librocjpeg's own RPATH resolves it from there — no system install needed.
4040
else
4141
# ROCm <=7.2 system RPM path.
42-
# Per https://github.com/ROCm/rocJPEG/tree/release/rocm-rel-7.2#libraries:
43-
# install the VA-API prerequisites first, then rocjpeg-devel (package
44-
# install auto installs remaining dependencies).
45-
dnf install -y --refresh libva-amdgpu mesa-amdgpu-va-drivers rocjpeg-devel
42+
# rocjpeg-devel's RPM dependencies pull in libva and mesa VA drivers automatically.
43+
dnf install -y rocjpeg-devel
4644
fi

packaging/repair_wheel.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ def _find_nvjpeg_license():
136136
def _find_rocjpeg_license():
137137
"""Find rocjpeg's LICENSE file to document the runtime dependency."""
138138
search_roots = []
139+
print(
140+
f"[repair_wheel] _find_rocjpeg_license: ROCM_HOME={os.environ.get('ROCM_HOME')!r}",
141+
flush=True,
142+
)
139143
for var in ("ROCM_HOME", "ROCM_PATH"):
140144
if v := os.environ.get(var):
141145
search_roots.append(Path(v))
@@ -154,8 +158,10 @@ def _find_rocjpeg_license():
154158
search_roots.append(Path(result.stdout.strip()))
155159
except Exception:
156160
pass
157-
search_roots.append(Path("/opt/rocm"))
158-
161+
print(
162+
f"[repair_wheel] _find_rocjpeg_license: searching roots={[str(r) for r in search_roots]}",
163+
flush=True,
164+
)
159165
for root in search_roots:
160166
candidate = root / "share" / "doc" / "rocjpeg" / "LICENSE"
161167
if candidate.is_file():

0 commit comments

Comments
 (0)