Skip to content

Commit a342931

Browse files
authored
fix: use a uv managed python for the minimum torch tests (#1318)
this pr fixes the `test-kernel-minimum-torch` job for stable abi kernels that run triton in their tests (first hit on #1182 https://github.com/huggingface/kernels-community/actions/runs/41133285042/job/124352993673) tldr; `uv venv` picks the runner's system python which has no headers, so triton fails to compile its launcher with `Python.h: No such file or directory`. the venv now uses `--managed-python`, which ships with headers repro in an ubuntu 24.04 container with the system python and no `python3.12-dev`, running the #1182 tests before 44 failed, 92 passed, 4 skipped after 136 passed, 4 skipped note: the repro ran on rocm (mi300x) so triton compiles `hip_utils.c` instead of `cuda_utils.c`, same `Python.h` include. #1182 needs a rebuild after this is merged since the workflow runs from main
1 parent 637bc6c commit a342931

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/build.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,9 @@ jobs:
614614
TORCH_INDEX: ${{ needs.plan-minimum-torch-test-stable-abi.outputs.index }}
615615
PYTHON_VERSION: ${{ needs.plan-minimum-torch-test-stable-abi.outputs.python }}
616616
run: |
617-
uv venv --python "$PYTHON_VERSION" "$RUNNER_TEMP/minimum-torch-venv"
617+
# Use a uv-managed Python: the runner's system Python has no headers, and
618+
# Triton needs Python.h to compile its launcher at test time.
619+
uv venv --managed-python --python "$PYTHON_VERSION" "$RUNNER_TEMP/minimum-torch-venv"
618620
echo "torch==$TORCH_VERSION" > "$RUNNER_TEMP/torch-constraint.txt"
619621
uv pip install --python "$RUNNER_TEMP/minimum-torch-venv/bin/python" \
620622
--index-url "$TORCH_INDEX" "torch==$TORCH_VERSION"

0 commit comments

Comments
 (0)