mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
# Description This pipeline enables the CI build on Windows with PR labeled with ciflow/xpu. This will build torch binary with Torch XPU Operators on Windows using Vision Studio BuildTools 2022. # Changes 1. Install xpu batch file (install_xpu.bat) - Check if build machine has oneAPI in environment, and if the version of it is latest. If not, install the latest public released oneAPI in the machine. 2. GHA callable pipeline (_win-build.yml) - Set vc_year and use_xpu as parameter to set build wheel environment. 3. GHA workflow (xpu.yml) - Add a new windows build job and pass parameters to it. 4. Build wheels script (.ci/pytorch/win-test-helpers/build_pytorch.bat) - Prepare environment for building, e.g. install oneAPI bundle. # Note 1. For building wheels on Intel GPU, you need Vision Studio BuildTools version >= 2022 2. This pipeline requires to use Vision Studio BuildTools 2022 to build wheels. For now, we specify "windows.4xlarge.nonephemeral" as build machine label in the yaml file. We will request to add self-hosted runners with Intel GPU and Vision Studio BuildTools 2022 installed soon. Work for #114850 Pull Request resolved: https://github.com/pytorch/pytorch/pull/133151 Approved by: https://github.com/chuanqi129, https://github.com/atalman Co-authored-by: chuanqiw <chuanqi.wang@intel.com>
60 lines
2 KiB
YAML
60 lines
2 KiB
YAML
name: xpu
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- ciflow/xpu/*
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
|
|
get-label-type:
|
|
name: get-label-type
|
|
uses: ./.github/workflows/_runner-determinator.yml
|
|
with:
|
|
triggering_actor: ${{ github.triggering_actor }}
|
|
issue_owner: ${{ github.event.pull_request.user.login || github.event.issue.user.login }}
|
|
curr_branch: ${{ github.head_ref || github.ref_name }}
|
|
curr_ref_type: ${{ github.ref_type }}
|
|
|
|
linux-jammy-xpu-py3_9-build:
|
|
name: linux-jammy-xpu-py3.9
|
|
uses: ./.github/workflows/_linux-build.yml
|
|
needs: get-label-type
|
|
with:
|
|
runner_prefix: ${{ needs.get-label-type.outputs.label-type }}
|
|
build-environment: linux-jammy-xpu-py3.9
|
|
docker-image-name: pytorch-linux-jammy-xpu-2024.0-py3
|
|
runner: linux.12xlarge
|
|
test-matrix: |
|
|
{ include: [
|
|
{ config: "default", shard: 1, num_shards: 4, runner: "linux.idc.xpu" },
|
|
{ config: "default", shard: 2, num_shards: 4, runner: "linux.idc.xpu" },
|
|
{ config: "default", shard: 3, num_shards: 4, runner: "linux.idc.xpu" },
|
|
{ config: "default", shard: 4, num_shards: 4, runner: "linux.idc.xpu" },
|
|
]}
|
|
|
|
linux-jammy-xpu-py3_9-test:
|
|
name: linux-jammy-xpu-py3.9
|
|
uses: ./.github/workflows/_xpu-test.yml
|
|
needs: linux-jammy-xpu-py3_9-build
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
with:
|
|
build-environment: linux-jammy-xpu-py3.9
|
|
docker-image: ${{ needs.linux-jammy-xpu-py3_9-build.outputs.docker-image }}
|
|
test-matrix: ${{ needs.linux-jammy-xpu-py3_9-build.outputs.test-matrix }}
|
|
|
|
windows-xpu-build:
|
|
name: win-vs2022-xpu-py3
|
|
uses: ./.github/workflows/_win-build.yml
|
|
with:
|
|
build-environment: win-vs2022-xpu-py3
|
|
cuda-version: cpu
|
|
use-xpu: true
|
|
vc-year: '2022'
|