You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: single-line python in CI yaml and improve mesa driver discovery
The multi-line python block inside $() in the YAML run: | block had
lines starting at column 0, which breaks the YAML scalar parser (same
issue as before). Collapse to a single line.
Also improve the *_drv_video.so search: use rglob instead of checking
a hardcoded lib/dri/ path so the mesa VA-API backend driver is found
regardless of the exact subdirectory AMD chose inside _rocm_sdk_core.
The fallback diagnostic now greps the full recursive listing for
dri/va/video/mesa/gallium/radeon keywords to pinpoint the layout if
the driver isn't found.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: .github/workflows/linux_rocm.yaml
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -176,13 +176,16 @@ jobs:
176
176
# ROCm 7.14 ships mesa inside _rocm_sdk_core (no separate dnf install
177
177
# needed). Point libva's driver search path at the DRI drivers bundled
178
178
# there so vaInitialize() can find the amdgpu/radeonsi VA-API backend.
179
-
rocm_core_dri=$(python -c "import importlib.util, pathlib; spec = importlib.util.find_spec('_rocm_sdk_core'); p = pathlib.Path(spec.submodule_search_locations[0]) if spec else None; d = p/'lib'/'dri' if p else None; print(str(d) if d and d.is_dir() else '')" 2>/dev/null || true)
179
+
# Search recursively for *_drv_video.so so we find it regardless of
180
+
# the exact subdirectory AMD chose (typically lib/dri/).
181
+
rocm_core_dri=$(python -c "import importlib.util, pathlib; spec = importlib.util.find_spec('_rocm_sdk_core'); p = pathlib.Path(spec.submodule_search_locations[0]) if spec else None; hits = list((p/'lib').rglob('*_drv_video.so')) if p else []; print(str(hits[0].parent)) if hits else None" 2>/dev/null || true)
180
182
if [ -n "${rocm_core_dri}" ]; then
181
183
export LIBVA_DRIVERS_PATH="${rocm_core_dri}"
182
184
echo "LIBVA_DRIVERS_PATH: ${rocm_core_dri}"
183
185
else
184
-
echo "WARNING: _rocm_sdk_core/lib/dri not found; listing _rocm_sdk_core/lib/ to diagnose:"
185
-
python -c "import importlib.util, pathlib; spec = importlib.util.find_spec('_rocm_sdk_core'); p = pathlib.Path(spec.submodule_search_locations[0]) if spec else None; [print(x) for x in sorted((p/'lib').iterdir())] if p else None" 2>/dev/null || true
186
+
echo "WARNING: no *_drv_video.so found in _rocm_sdk_core/lib; VA-API driver missing?"
187
+
echo "Contents of _rocm_sdk_core/lib (recursive *_drv_video.so search):"
188
+
python -c "import importlib.util, pathlib; spec = importlib.util.find_spec('_rocm_sdk_core'); p = pathlib.Path(spec.submodule_search_locations[0]) if spec else None; [print(x) for x in sorted((p/'lib').rglob('*'))] if p else None" 2>/dev/null | grep -E "dri|va|video|mesa|gallium|radeon" || true
186
189
fi
187
190
# Diagnostics: dump ldd on the image .so so any missing dep is visible.
0 commit comments