Skip to content

Commit

Permalink
Enable xpu windows in binary build matrix generation
Browse files Browse the repository at this point in the history
  • Loading branch information
chuanqi129 committed Sep 12, 2024
1 parent 933cc44 commit dd9e540
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/scripts/generate_binary_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"""Generates a matrix to be utilized through github actions
Will output a condensed version of the matrix if on a pull request that only
includes the latest version of python we support built on three different
includes the latest version of python we support built on four different
architectures:
* CPU
* Latest CUDA
* Latest ROCM
* Latest XPU
"""


Expand Down Expand Up @@ -519,7 +520,7 @@ def generate_wheels_matrix(
arches += ROCM_ARCHES

if with_xpu == ENABLE:
if os == LINUX:
if os == LINUX or os == WINDOWS:
arches += [XPU]

if limit_pr_builds:
Expand Down
1 change: 1 addition & 0 deletions tools/tests/assets/build_matrix_windows_wheel_xpu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"include": [{"python_version": "3.9", "gpu_arch_type": "cpu", "gpu_arch_version": "", "desired_cuda": "cpu", "container_image": "pytorch/manylinux-builder:cpu", "package_type": "wheel", "build_name": "wheel-py3_9-cpu", "validation_runner": "windows.4xlarge", "installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu", "channel": "nightly", "upload_to_base_bucket": "yes", "stable_version": "2.4.1", "use_split_build": false}, {"python_version": "3.9", "gpu_arch_type": "xpu", "gpu_arch_version": "", "desired_cuda": "xpu", "container_image": "pytorch/manylinux2_28-builder:xpu", "package_type": "wheel", "build_name": "wheel-py3_9-xpu", "validation_runner": "windows.4xlarge", "installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu", "channel": "nightly", "upload_to_base_bucket": "yes", "stable_version": "2.4.1", "use_split_build": false}, {"python_version": "3.10", "gpu_arch_type": "cpu", "gpu_arch_version": "", "desired_cuda": "cpu", "container_image": "pytorch/manylinux-builder:cpu", "package_type": "wheel", "build_name": "wheel-py3_10-cpu", "validation_runner": "windows.4xlarge", "installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu", "channel": "nightly", "upload_to_base_bucket": "yes", "stable_version": "2.4.1", "use_split_build": false}, {"python_version": "3.10", "gpu_arch_type": "xpu", "gpu_arch_version": "", "desired_cuda": "xpu", "container_image": "pytorch/manylinux2_28-builder:xpu", "package_type": "wheel", "build_name": "wheel-py3_10-xpu", "validation_runner": "windows.4xlarge", "installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu", "channel": "nightly", "upload_to_base_bucket": "yes", "stable_version": "2.4.1", "use_split_build": false}, {"python_version": "3.11", "gpu_arch_type": "cpu", "gpu_arch_version": "", "desired_cuda": "cpu", "container_image": "pytorch/manylinux-builder:cpu", "package_type": "wheel", "build_name": "wheel-py3_11-cpu", "validation_runner": "windows.4xlarge", "installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu", "channel": "nightly", "upload_to_base_bucket": "yes", "stable_version": "2.4.1", "use_split_build": false}, {"python_version": "3.11", "gpu_arch_type": "xpu", "gpu_arch_version": "", "desired_cuda": "xpu", "container_image": "pytorch/manylinux2_28-builder:xpu", "package_type": "wheel", "build_name": "wheel-py3_11-xpu", "validation_runner": "windows.4xlarge", "installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu", "channel": "nightly", "upload_to_base_bucket": "yes", "stable_version": "2.4.1", "use_split_build": false}, {"python_version": "3.12", "gpu_arch_type": "cpu", "gpu_arch_version": "", "desired_cuda": "cpu", "container_image": "pytorch/manylinux-builder:cpu", "package_type": "wheel", "build_name": "wheel-py3_12-cpu", "validation_runner": "windows.4xlarge", "installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu", "channel": "nightly", "upload_to_base_bucket": "yes", "stable_version": "2.4.1", "use_split_build": false}, {"python_version": "3.12", "gpu_arch_type": "xpu", "gpu_arch_version": "", "desired_cuda": "xpu", "container_image": "pytorch/manylinux2_28-builder:xpu", "package_type": "wheel", "build_name": "wheel-py3_12-xpu", "validation_runner": "windows.4xlarge", "installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu", "channel": "nightly", "upload_to_base_bucket": "yes", "stable_version": "2.4.1", "use_split_build": false}]}
11 changes: 11 additions & 0 deletions tools/tests/test_generate_binary_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ def test_windows_conda_cuda(self):
xpu=True,
reference_output_file="build_matrix_windows_conda_cuda.json",
)

def test_windows_wheel_xpu(self):
self.matrix_compare_helper(
package_type="wheel",
operating_system="windows",
cuda=False,
rocm=False,
cpu=True,
xpu=True,
reference_output_file="build_matrix_windows_wheel_xpu.json",
)

def test_linux_wheel_cuda_norocm(self):
self.matrix_compare_helper(
Expand Down

0 comments on commit dd9e540

Please sign in to comment.