Skip to content

Commit 018ec22

Browse files
authored
Skip ELF strip for linux-amd multi-arch ROCm wheels (#17)
strip --strip-debug corrupts the AMD multi-arch wheels' PT_LOAD alignment; the stripped env fails its smoke test with 'libtorch_hip.so: ELF load command address/offset not page-aligned'.
1 parent f6fa3c8 commit 018ec22

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/build-standalone-env.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,12 @@ jobs:
282282
find standalone-env -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
283283
find standalone-env -name "*.pyc" -delete 2>/dev/null || true
284284
285-
# Strip debug symbols from shared libraries (Linux/Mac)
286-
if [[ "${{ runner.os }}" != "Windows" ]]; then
285+
# Strip debug symbols from shared libraries (Linux/Mac).
286+
# Skip the AMD multi-arch ROCm wheels: strip rewrites their ELF
287+
# segments and breaks page alignment, after which torch fails to
288+
# import ("libtorch_hip.so: ELF load command address/offset not
289+
# page-aligned").
290+
if [[ "${{ runner.os }}" != "Windows" && "${{ matrix.vendor_requirements }}" != "requirements-amd.txt" ]]; then
287291
find standalone-env -name "*.so" -exec strip --strip-debug {} \; 2>/dev/null || true
288292
find standalone-env -name "*.dylib" -exec strip -x {} \; 2>/dev/null || true
289293
fi

0 commit comments

Comments
 (0)