From a43480d19cdd68e544163b1a07c328a9c54723b8 Mon Sep 17 00:00:00 2001 From: "Wang, Chuanqi" Date: Fri, 22 Aug 2025 18:39:29 +0000 Subject: [PATCH] [CD] Enable triton xpu Windows build for Python 3.14 (#161255) Follow #159869 Pull Request resolved: https://github.com/pytorch/pytorch/pull/161255 Approved by: https://github.com/atalman --- .github/scripts/windows/build_triton.bat | 16 +++++----------- .github/workflows/build-triton-wheel.yml | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/scripts/windows/build_triton.bat b/.github/scripts/windows/build_triton.bat index 1c2d260cde6b..d26dc8bf3b19 100644 --- a/.github/scripts/windows/build_triton.bat +++ b/.github/scripts/windows/build_triton.bat @@ -1,18 +1,12 @@ @echo on -set PYTHON_PREFIX=%PY_VERS:.=% -set PYTHON_PREFIX=py%PYTHON_PREFIX:;=;py% -call .ci/pytorch/win-test-helpers/installation-helpers/activate_miniconda3.bat -:: Create a new conda environment -if "%PY_VERS%" == "3.13t" ( - call conda create -n %PYTHON_PREFIX% -y -c=conda-forge python-freethreading python=3.13 -) else ( - call conda create -n %PYTHON_PREFIX% -y -c=conda-forge python=%PY_VERS% -) +set DESIRED_PYTHON=%PY_VERS% +call .ci/pytorch/windows/internal/install_python.bat + :: Fix cmake version for issue https://github.com/pytorch/pytorch/issues/150480 -call conda run -n %PYTHON_PREFIX% pip install wheel pybind11 certifi cython cmake==3.31.6 setuptools==72.1.0 ninja==1.11.1.4 +%PYTHON_EXEC% -m pip install wheel pybind11 certifi cython cmake==3.31.6 setuptools==72.1.0 ninja==1.11.1.4 dir "%VC_INSTALL_PATH%" call "%VC_INSTALL_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x64 -call conda run -n %PYTHON_PREFIX% python .github/scripts/build_triton_wheel.py --device=%BUILD_DEVICE% %RELEASE% +%PYTHON_EXEC% .github/scripts/build_triton_wheel.py --device=%BUILD_DEVICE% %RELEASE% diff --git a/.github/workflows/build-triton-wheel.yml b/.github/workflows/build-triton-wheel.yml index d54f459d0b43..e0f1027b8a19 100644 --- a/.github/workflows/build-triton-wheel.yml +++ b/.github/workflows/build-triton-wheel.yml @@ -194,7 +194,7 @@ jobs: strategy: fail-fast: false matrix: - py_vers: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t" ] + py_vers: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t" ] device: ["xpu"] timeout-minutes: 40 env: