Skip to content

Commit b739b38

Browse files
committed
ci: dump PATH/which-python before importing torch in test-kernels
The previous run installed torch into /usr/local/bin/python3.12 (uv said "Using Python 3.12.13 environment at: /usr/local") but the next step's `python -c "import torch"` raised ModuleNotFoundError. Add an env+which dump before the import to identify which interpreter the runner exec env actually resolves and where torch actually landed. Also keep the GITHUB_PATH prepend of /usr/local/bin so subsequent steps have python3.12 ahead of any other interpreter on PATH. Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
1 parent 0c91f4d commit b739b38

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/build-rocm-wheels.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ jobs:
152152
- name: Checkout code
153153
uses: actions/checkout@v4
154154

155+
- name: Ensure python3.12 wins over Debian's python3.11 on PATH
156+
run: echo "/usr/local/bin" >> "$GITHUB_PATH"
157+
155158
- name: Download wheel artifact
156159
uses: actions/download-artifact@v4
157160
with:
@@ -212,6 +215,18 @@ jobs:
212215
213216
- name: Prepare test environment
214217
run: |
218+
# Diagnose: which python does the runner exec env actually pick up?
219+
echo "=== env (PATH-related) ==="
220+
env | grep -E '^(PATH|VIRTUAL_ENV|PYTHONPATH|PYTHONHOME|RUNNER_TOOL_CACHE)=' || true
221+
echo "=== which / where ==="
222+
which python python3 python3.11 python3.12 2>&1 || true
223+
ls -la /usr/local/bin/python* /usr/bin/python* 2>&1 || true
224+
echo "=== python -V via 'python' and 'python3.12' ==="
225+
python -V 2>&1 || true
226+
python3.12 -V 2>&1 || true
227+
echo "=== where is torch installed ==="
228+
python3.12 -c "import torch, sys; print(torch.__file__); print(sys.path)" 2>&1 || true
229+
215230
# Remove the source vllm/ directory so Python imports from the
216231
# installed wheel (which has compiled C extensions) instead of
217232
# the checkout source tree (which has no .so files).

0 commit comments

Comments
 (0)