mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[CI] Delete binary smoke workflows (#164260)
Those were very useful in the past, because: - CI builder jobs did not generates wheels, but rather run `python setup.py develop` and shared docker layers, which is no longer the case, all CI jobs produce wheels - CD jobs were targeting pre-CXX11 ABI, but this is no longer the case after manylinux2_28 migration Existing, but acceptable gaps: - Windows libtorch debug builds sometimes might fail, but IMO it's ok not to be able to produce those for a few days, as number of libtorch users are somewhat small - All CD jobs are based on AlmaLinux, while CI are based on Ubuntu, but this could be adjusted if needed, besides AlmaLinux-9 and Ubuntu-22.04 are pretty close in terms of glibc and gcc versions - CD jobs build for all GPU architectures, while CI only for the one being tested, but there are now periodic H100 and B200 jobs, and not a lot of development happens for Voltas or Pascals Besides there are better tools to alert about the nightly failures Pull Request resolved: https://github.com/pytorch/pytorch/pull/164260 Approved by: https://github.com/seemethere, https://github.com/atalman
This commit is contained in:
parent
e30f01b5b5
commit
5a93f00c79
93
.github/scripts/generate_ci_workflows.py
vendored
93
.github/scripts/generate_ci_workflows.py
vendored
|
|
@ -127,53 +127,6 @@ LINUX_BINARY_BUILD_WORFKLOWS = [
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
ROCM_SMOKE_WORKFLOWS = [
|
|
||||||
BinaryBuildWorkflow(
|
|
||||||
os=OperatingSystem.LINUX,
|
|
||||||
package_type="manywheel",
|
|
||||||
build_variant="rocm",
|
|
||||||
build_configs=generate_binary_build_matrix.generate_wheels_matrix(
|
|
||||||
OperatingSystem.LINUX,
|
|
||||||
arches=["6.4"],
|
|
||||||
python_versions=["3.10"],
|
|
||||||
),
|
|
||||||
ciflow_config=CIFlowConfig(
|
|
||||||
labels={
|
|
||||||
LABEL_CIFLOW_BINARIES,
|
|
||||||
LABEL_CIFLOW_BINARIES_WHEEL,
|
|
||||||
LABEL_CIFLOW_ROCM,
|
|
||||||
},
|
|
||||||
isolated_workflow=True,
|
|
||||||
),
|
|
||||||
branches="main",
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
LINUX_BINARY_SMOKE_WORKFLOWS = [
|
|
||||||
BinaryBuildWorkflow(
|
|
||||||
os=OperatingSystem.LINUX,
|
|
||||||
package_type="manywheel",
|
|
||||||
build_configs=generate_binary_build_matrix.generate_wheels_matrix(
|
|
||||||
OperatingSystem.LINUX,
|
|
||||||
arches=["13.0"],
|
|
||||||
python_versions=["3.12"],
|
|
||||||
),
|
|
||||||
branches="main",
|
|
||||||
),
|
|
||||||
BinaryBuildWorkflow(
|
|
||||||
os=OperatingSystem.LINUX,
|
|
||||||
package_type="libtorch",
|
|
||||||
build_variant=generate_binary_build_matrix.RELEASE,
|
|
||||||
build_configs=generate_binary_build_matrix.generate_libtorch_matrix(
|
|
||||||
OperatingSystem.LINUX,
|
|
||||||
generate_binary_build_matrix.RELEASE,
|
|
||||||
arches=["cpu"],
|
|
||||||
libtorch_variants=["shared-with-deps"],
|
|
||||||
),
|
|
||||||
branches="main",
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
WINDOWS_BINARY_BUILD_WORKFLOWS = [
|
WINDOWS_BINARY_BUILD_WORKFLOWS = [
|
||||||
BinaryBuildWorkflow(
|
BinaryBuildWorkflow(
|
||||||
os=OperatingSystem.WINDOWS,
|
os=OperatingSystem.WINDOWS,
|
||||||
|
|
@ -259,39 +212,6 @@ WINDOWS_BINARY_BUILD_WORKFLOWS = [
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
WINDOWS_BINARY_SMOKE_WORKFLOWS = [
|
|
||||||
BinaryBuildWorkflow(
|
|
||||||
os=OperatingSystem.WINDOWS,
|
|
||||||
package_type="libtorch",
|
|
||||||
build_variant=generate_binary_build_matrix.RELEASE,
|
|
||||||
build_configs=generate_binary_build_matrix.generate_libtorch_matrix(
|
|
||||||
OperatingSystem.WINDOWS,
|
|
||||||
generate_binary_build_matrix.RELEASE,
|
|
||||||
arches=["cpu"],
|
|
||||||
libtorch_variants=["shared-with-deps"],
|
|
||||||
),
|
|
||||||
branches="main",
|
|
||||||
ciflow_config=CIFlowConfig(
|
|
||||||
isolated_workflow=True,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
BinaryBuildWorkflow(
|
|
||||||
os=OperatingSystem.WINDOWS,
|
|
||||||
package_type="libtorch",
|
|
||||||
build_variant=generate_binary_build_matrix.DEBUG,
|
|
||||||
build_configs=generate_binary_build_matrix.generate_libtorch_matrix(
|
|
||||||
OperatingSystem.WINDOWS,
|
|
||||||
generate_binary_build_matrix.DEBUG,
|
|
||||||
arches=["cpu"],
|
|
||||||
libtorch_variants=["shared-with-deps"],
|
|
||||||
),
|
|
||||||
branches="main",
|
|
||||||
ciflow_config=CIFlowConfig(
|
|
||||||
isolated_workflow=True,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
MACOS_BINARY_BUILD_WORKFLOWS = [
|
MACOS_BINARY_BUILD_WORKFLOWS = [
|
||||||
BinaryBuildWorkflow(
|
BinaryBuildWorkflow(
|
||||||
os=OperatingSystem.MACOS_ARM64,
|
os=OperatingSystem.MACOS_ARM64,
|
||||||
|
|
@ -372,23 +292,10 @@ def main() -> None:
|
||||||
jinja_env.get_template("linux_binary_build_workflow.yml.j2"),
|
jinja_env.get_template("linux_binary_build_workflow.yml.j2"),
|
||||||
S390X_BINARY_BUILD_WORKFLOWS,
|
S390X_BINARY_BUILD_WORKFLOWS,
|
||||||
),
|
),
|
||||||
(
|
|
||||||
# Give rocm it's own workflow file
|
|
||||||
jinja_env.get_template("linux_binary_build_workflow.yml.j2"),
|
|
||||||
ROCM_SMOKE_WORKFLOWS,
|
|
||||||
),
|
|
||||||
(
|
|
||||||
jinja_env.get_template("linux_binary_build_workflow.yml.j2"),
|
|
||||||
LINUX_BINARY_SMOKE_WORKFLOWS,
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
jinja_env.get_template("windows_binary_build_workflow.yml.j2"),
|
jinja_env.get_template("windows_binary_build_workflow.yml.j2"),
|
||||||
WINDOWS_BINARY_BUILD_WORKFLOWS,
|
WINDOWS_BINARY_BUILD_WORKFLOWS,
|
||||||
),
|
),
|
||||||
(
|
|
||||||
jinja_env.get_template("windows_binary_build_workflow.yml.j2"),
|
|
||||||
WINDOWS_BINARY_SMOKE_WORKFLOWS,
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
jinja_env.get_template("macos_binary_build_workflow.yml.j2"),
|
jinja_env.get_template("macos_binary_build_workflow.yml.j2"),
|
||||||
MACOS_BINARY_BUILD_WORKFLOWS,
|
MACOS_BINARY_BUILD_WORKFLOWS,
|
||||||
|
|
|
||||||
87
.github/workflows/generated-linux-binary-libtorch-release-main.yml
generated
vendored
87
.github/workflows/generated-linux-binary-libtorch-release-main.yml
generated
vendored
|
|
@ -1,87 +0,0 @@
|
||||||
# @generated DO NOT EDIT MANUALLY
|
|
||||||
|
|
||||||
# Template is at: .github/templates/linux_binary_build_workflow.yml.j2
|
|
||||||
# Generation script: .github/scripts/generate_ci_workflows.py
|
|
||||||
name: linux-binary-libtorch-release
|
|
||||||
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
tags:
|
|
||||||
- 'ciflow/trunk/*'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
# Needed for conda builds
|
|
||||||
ALPINE_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine"
|
|
||||||
AWS_DEFAULT_REGION: us-east-1
|
|
||||||
BINARY_ENV_FILE: /tmp/env
|
|
||||||
BUILD_ENVIRONMENT: linux-binary-libtorch-release
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
PYTORCH_FINAL_PACKAGE_DIR: /artifacts
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
SKIP_ALL_TESTS: 0
|
|
||||||
concurrency:
|
|
||||||
group: linux-binary-libtorch-release-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get-label-type:
|
|
||||||
if: github.repository_owner == 'pytorch'
|
|
||||||
name: get-label-type
|
|
||||||
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
|
|
||||||
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 }}
|
|
||||||
libtorch-cpu-shared-with-deps-release-build:
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
uses: ./.github/workflows/_binary-build-linux.yml
|
|
||||||
needs: get-label-type
|
|
||||||
with:
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
PACKAGE_TYPE: libtorch
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: cpu
|
|
||||||
GPU_ARCH_TYPE: cpu
|
|
||||||
DOCKER_IMAGE: libtorch-cxx11-builder
|
|
||||||
DOCKER_IMAGE_TAG_PREFIX: cpu
|
|
||||||
LIBTORCH_CONFIG: release
|
|
||||||
LIBTORCH_VARIANT: shared-with-deps
|
|
||||||
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
|
|
||||||
build_name: libtorch-cpu-shared-with-deps-release
|
|
||||||
build_environment: linux-binary-libtorch-release
|
|
||||||
secrets:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
libtorch-cpu-shared-with-deps-release-test: # Testing
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
needs:
|
|
||||||
- libtorch-cpu-shared-with-deps-release-build
|
|
||||||
- get-label-type
|
|
||||||
uses: ./.github/workflows/_binary-test-linux.yml
|
|
||||||
with:
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
PACKAGE_TYPE: libtorch
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: cpu
|
|
||||||
GPU_ARCH_TYPE: cpu
|
|
||||||
DOCKER_IMAGE: libtorch-cxx11-builder
|
|
||||||
DOCKER_IMAGE_TAG_PREFIX: cpu
|
|
||||||
LIBTORCH_CONFIG: release
|
|
||||||
LIBTORCH_VARIANT: shared-with-deps
|
|
||||||
build_name: libtorch-cpu-shared-with-deps-release
|
|
||||||
build_environment: linux-binary-libtorch-release
|
|
||||||
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
|
|
||||||
runs_on: linux.4xlarge
|
|
||||||
secrets:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
88
.github/workflows/generated-linux-binary-manywheel-main.yml
generated
vendored
88
.github/workflows/generated-linux-binary-manywheel-main.yml
generated
vendored
|
|
@ -1,88 +0,0 @@
|
||||||
# @generated DO NOT EDIT MANUALLY
|
|
||||||
|
|
||||||
# Template is at: .github/templates/linux_binary_build_workflow.yml.j2
|
|
||||||
# Generation script: .github/scripts/generate_ci_workflows.py
|
|
||||||
name: linux-binary-manywheel
|
|
||||||
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
tags:
|
|
||||||
- 'ciflow/trunk/*'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
# Needed for conda builds
|
|
||||||
ALPINE_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine"
|
|
||||||
AWS_DEFAULT_REGION: us-east-1
|
|
||||||
BINARY_ENV_FILE: /tmp/env
|
|
||||||
BUILD_ENVIRONMENT: linux-binary-manywheel
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
PYTORCH_FINAL_PACKAGE_DIR: /artifacts
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
SKIP_ALL_TESTS: 0
|
|
||||||
concurrency:
|
|
||||||
group: linux-binary-manywheel-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get-label-type:
|
|
||||||
if: github.repository_owner == 'pytorch'
|
|
||||||
name: get-label-type
|
|
||||||
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
|
|
||||||
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 }}
|
|
||||||
manywheel-py3_12-cuda13_0-build:
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
uses: ./.github/workflows/_binary-build-linux.yml
|
|
||||||
needs: get-label-type
|
|
||||||
with:
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
PACKAGE_TYPE: manywheel
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: cu130
|
|
||||||
GPU_ARCH_VERSION: "13.0"
|
|
||||||
GPU_ARCH_TYPE: cuda
|
|
||||||
DOCKER_IMAGE: manylinux2_28-builder
|
|
||||||
DOCKER_IMAGE_TAG_PREFIX: cuda13.0
|
|
||||||
DESIRED_PYTHON: "3.12"
|
|
||||||
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
|
|
||||||
build_name: manywheel-py3_12-cuda13_0
|
|
||||||
build_environment: linux-binary-manywheel
|
|
||||||
PYTORCH_EXTRA_INSTALL_REQUIREMENTS: nvidia-cuda-nvrtc==13.0.48; platform_system == 'Linux' | nvidia-cuda-runtime==13.0.48; platform_system == 'Linux' | nvidia-cuda-cupti==13.0.48; platform_system == 'Linux' | nvidia-cudnn-cu13==9.13.0.50; platform_system == 'Linux' | nvidia-cublas==13.0.0.19; platform_system == 'Linux' | nvidia-cufft==12.0.0.15; platform_system == 'Linux' | nvidia-curand==10.4.0.35; platform_system == 'Linux' | nvidia-cusolver==12.0.3.29; platform_system == 'Linux' | nvidia-cusparse==12.6.2.49; platform_system == 'Linux' | nvidia-cusparselt-cu13==0.8.0; platform_system == 'Linux' | nvidia-nccl-cu13==2.28.3; platform_system == 'Linux' | nvidia-nvshmem-cu13==3.3.24; platform_system == 'Linux' | nvidia-nvtx==13.0.39; platform_system == 'Linux' | nvidia-nvjitlink==13.0.39; platform_system == 'Linux' | nvidia-cufile==1.15.0.42; platform_system == 'Linux'
|
|
||||||
secrets:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
manywheel-py3_12-cuda13_0-test: # Testing
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
needs:
|
|
||||||
- manywheel-py3_12-cuda13_0-build
|
|
||||||
- get-label-type
|
|
||||||
uses: ./.github/workflows/_binary-test-linux.yml
|
|
||||||
with:
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
PACKAGE_TYPE: manywheel
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: cu130
|
|
||||||
GPU_ARCH_VERSION: "13.0"
|
|
||||||
GPU_ARCH_TYPE: cuda
|
|
||||||
DOCKER_IMAGE: manylinux2_28-builder
|
|
||||||
DOCKER_IMAGE_TAG_PREFIX: cuda13.0
|
|
||||||
DESIRED_PYTHON: "3.12"
|
|
||||||
build_name: manywheel-py3_12-cuda13_0
|
|
||||||
build_environment: linux-binary-manywheel
|
|
||||||
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
|
|
||||||
runs_on: linux.g4dn.4xlarge.nvidia.gpu # 12.8+ builds need sm_70+ runner
|
|
||||||
secrets:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
136
.github/workflows/generated-linux-binary-manywheel-rocm-main.yml
generated
vendored
136
.github/workflows/generated-linux-binary-manywheel-rocm-main.yml
generated
vendored
|
|
@ -1,136 +0,0 @@
|
||||||
# @generated DO NOT EDIT MANUALLY
|
|
||||||
|
|
||||||
# Template is at: .github/templates/linux_binary_build_workflow.yml.j2
|
|
||||||
# Generation script: .github/scripts/generate_ci_workflows.py
|
|
||||||
name: linux-binary-manywheel-rocm
|
|
||||||
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
tags:
|
|
||||||
- 'ciflow/binaries/*'
|
|
||||||
- 'ciflow/binaries_wheel/*'
|
|
||||||
- 'ciflow/rocm/*'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
# Needed for conda builds
|
|
||||||
ALPINE_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine"
|
|
||||||
AWS_DEFAULT_REGION: us-east-1
|
|
||||||
BINARY_ENV_FILE: /tmp/env
|
|
||||||
BUILD_ENVIRONMENT: linux-binary-manywheel-rocm
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
PYTORCH_FINAL_PACKAGE_DIR: /artifacts
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
SKIP_ALL_TESTS: 0
|
|
||||||
concurrency:
|
|
||||||
group: linux-binary-manywheel-rocm-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get-label-type:
|
|
||||||
if: github.repository_owner == 'pytorch'
|
|
||||||
name: get-label-type
|
|
||||||
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
|
|
||||||
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 }}
|
|
||||||
manywheel-py3_10-rocm6_4-build:
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
uses: ./.github/workflows/_binary-build-linux.yml
|
|
||||||
needs: get-label-type
|
|
||||||
with:
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
PACKAGE_TYPE: manywheel
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: rocm6.4
|
|
||||||
GPU_ARCH_VERSION: "6.4"
|
|
||||||
GPU_ARCH_TYPE: rocm
|
|
||||||
DOCKER_IMAGE: manylinux2_28-builder
|
|
||||||
DOCKER_IMAGE_TAG_PREFIX: rocm6.4
|
|
||||||
DESIRED_PYTHON: "3.10"
|
|
||||||
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
|
|
||||||
timeout-minutes: 300
|
|
||||||
build_name: manywheel-py3_10-rocm6_4
|
|
||||||
build_environment: linux-binary-manywheel-rocm
|
|
||||||
secrets:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
manywheel-py3_10-rocm6_4-test: # Testing
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
needs:
|
|
||||||
- manywheel-py3_10-rocm6_4-build
|
|
||||||
- get-label-type
|
|
||||||
runs-on: linux.rocm.gpu.mi250
|
|
||||||
timeout-minutes: 240
|
|
||||||
env:
|
|
||||||
PYTORCH_ROOT: /pytorch
|
|
||||||
PACKAGE_TYPE: manywheel
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: rocm6.4
|
|
||||||
GPU_ARCH_VERSION: "6.4"
|
|
||||||
GPU_ARCH_TYPE: rocm
|
|
||||||
SKIP_ALL_TESTS: 1
|
|
||||||
DOCKER_IMAGE: manylinux2_28-builder
|
|
||||||
DOCKER_IMAGE_TAG_PREFIX: rocm6.4
|
|
||||||
DESIRED_PYTHON: "3.10"
|
|
||||||
steps:
|
|
||||||
- name: Setup ROCm
|
|
||||||
uses: ./.github/actions/setup-rocm
|
|
||||||
- uses: actions/download-artifact@v4.1.7
|
|
||||||
name: Download Build Artifacts
|
|
||||||
with:
|
|
||||||
name: manywheel-py3_10-rocm6_4
|
|
||||||
path: "${{ runner.temp }}/artifacts/"
|
|
||||||
- name: Checkout PyTorch
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
||||||
submodules: recursive
|
|
||||||
path: pytorch
|
|
||||||
show-progress: false
|
|
||||||
- name: Clean PyTorch checkout
|
|
||||||
run: |
|
|
||||||
# Remove any artifacts from the previous checkouts
|
|
||||||
git clean -fxd
|
|
||||||
working-directory: pytorch
|
|
||||||
- name: ROCm set GPU_FLAG
|
|
||||||
run: |
|
|
||||||
echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}"
|
|
||||||
- name: configure aws credentials
|
|
||||||
id: aws_creds
|
|
||||||
if: ${{ startsWith(github.event.ref, 'refs/tags/ciflow/') }}
|
|
||||||
uses: aws-actions/configure-aws-credentials@v4
|
|
||||||
with:
|
|
||||||
role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_s3_and_ecr_read_only
|
|
||||||
aws-region: us-east-1
|
|
||||||
role-duration-seconds: 18000
|
|
||||||
- name: Calculate docker image
|
|
||||||
id: calculate-docker-image
|
|
||||||
uses: pytorch/test-infra/.github/actions/calculate-docker-image@main
|
|
||||||
with:
|
|
||||||
docker-registry: ${{ startsWith(github.event.ref, 'refs/tags/ciflow/') && '308535385114.dkr.ecr.us-east-1.amazonaws.com' || 'docker.io' }}
|
|
||||||
docker-image-name: manylinux2_28-builder
|
|
||||||
custom-tag-prefix: rocm6.4
|
|
||||||
docker-build-dir: .ci/docker
|
|
||||||
working-directory: pytorch
|
|
||||||
- name: Pull Docker image
|
|
||||||
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
|
|
||||||
with:
|
|
||||||
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}
|
|
||||||
- name: Test Pytorch binary
|
|
||||||
uses: ./pytorch/.github/actions/test-pytorch-binary
|
|
||||||
env:
|
|
||||||
DOCKER_IMAGE: ${{ steps.calculate-docker-image.outputs.docker-image }}
|
|
||||||
- name: Teardown ROCm
|
|
||||||
uses: ./.github/actions/teardown-rocm
|
|
||||||
261
.github/workflows/generated-windows-binary-libtorch-debug-main.yml
generated
vendored
261
.github/workflows/generated-windows-binary-libtorch-debug-main.yml
generated
vendored
|
|
@ -1,261 +0,0 @@
|
||||||
# @generated DO NOT EDIT MANUALLY
|
|
||||||
|
|
||||||
# Template is at: .github/templates/windows_binary_build_workflow.yml.j2
|
|
||||||
# Generation script: .github/scripts/generate_ci_workflows.py
|
|
||||||
name: windows-binary-libtorch-debug
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
# Needed for conda builds
|
|
||||||
ALPINE_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine"
|
|
||||||
AWS_DEFAULT_REGION: us-east-1
|
|
||||||
BUILD_ENVIRONMENT: windows-binary-libtorch-debug
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
SKIP_ALL_TESTS: 1
|
|
||||||
OS: windows
|
|
||||||
concurrency:
|
|
||||||
group: windows-binary-libtorch-debug-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get-label-type:
|
|
||||||
if: github.repository_owner == 'pytorch'
|
|
||||||
name: get-label-type
|
|
||||||
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
|
|
||||||
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 }}
|
|
||||||
libtorch-cpu-shared-with-deps-debug-build:
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
needs: get-label-type
|
|
||||||
runs-on: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral"
|
|
||||||
timeout-minutes: 360
|
|
||||||
env:
|
|
||||||
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
|
|
||||||
PACKAGE_TYPE: libtorch
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: cpu
|
|
||||||
GPU_ARCH_TYPE: cpu
|
|
||||||
SKIP_ALL_TESTS: 1
|
|
||||||
LIBTORCH_CONFIG: debug
|
|
||||||
LIBTORCH_VARIANT: shared-with-deps
|
|
||||||
# This is a dummy value for libtorch to work correctly with our batch scripts
|
|
||||||
# without this value pip does not get installed for some reason
|
|
||||||
DESIRED_PYTHON: "3.10"
|
|
||||||
steps:
|
|
||||||
# NOTE: These environment variables are put here so that they can be applied on every job equally
|
|
||||||
# They are also here because setting them at a workflow level doesn't give us access to the
|
|
||||||
# runner.temp variable, which we need.
|
|
||||||
- name: Populate binary env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "BINARY_ENV_FILE=${RUNNER_TEMP}/env" >> "${GITHUB_ENV}"
|
|
||||||
echo "PYTORCH_FINAL_PACKAGE_DIR=${RUNNER_TEMP}/artifacts" >> "${GITHUB_ENV}"
|
|
||||||
echo "WIN_PACKAGE_WORK_DIR=${RUNNER_TEMP}"
|
|
||||||
- name: Display EC2 information
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
function get_ec2_metadata() {
|
|
||||||
# Pulled from instance metadata endpoint for EC2
|
|
||||||
# see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
|
|
||||||
category=$1
|
|
||||||
curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}"
|
|
||||||
}
|
|
||||||
echo "ami-id: $(get_ec2_metadata ami-id)"
|
|
||||||
echo "instance-id: $(get_ec2_metadata instance-id)"
|
|
||||||
echo "instance-type: $(get_ec2_metadata instance-type)"
|
|
||||||
echo "system info $(uname -a)"
|
|
||||||
- name: "[FB EMPLOYEES] Enable SSH (Click me for login details)"
|
|
||||||
uses: pytorch/test-infra/.github/actions/setup-ssh@main
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
github-secret: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Enable git long paths and symlinks on Windows and disable fsmonitor daemon
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git config --global core.longpaths true
|
|
||||||
git config --global core.symlinks true
|
|
||||||
|
|
||||||
# https://git-scm.com/docs/git-fsmonitor--daemon. The daemon could lock
|
|
||||||
# the directory on Windows and prevent GHA from checking out as reported
|
|
||||||
# in https://github.com/actions/checkout/issues/1018
|
|
||||||
git config --global core.fsmonitor false
|
|
||||||
# Needed for binary builds, see: https://github.com/pytorch/pytorch/issues/73339#issuecomment-1058981560
|
|
||||||
- name: Enable long paths on Windows
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Set-ItemProperty -Path "HKLM:\\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
|
|
||||||
# Since it's just a defensive command, the workflow should continue even the command fails. This step can be
|
|
||||||
# removed once Windows Defender is removed from the AMI
|
|
||||||
- name: Disables Windows Defender scheduled and real-time scanning for files in directories used by PyTorch
|
|
||||||
continue-on-error: true
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Add-MpPreference -ExclusionPath $(Get-Location).tostring(),$Env:TEMP -ErrorAction Ignore
|
|
||||||
# Let's both exclude the path and disable Windows Defender completely just to be sure
|
|
||||||
# that it doesn't interfere
|
|
||||||
Set-MpPreference -DisableRealtimeMonitoring $True -ErrorAction Ignore
|
|
||||||
- name: Checkout PyTorch
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
||||||
submodules: recursive
|
|
||||||
path: pytorch
|
|
||||||
show-progress: false
|
|
||||||
- name: Clean PyTorch checkout
|
|
||||||
run: |
|
|
||||||
# Remove any artifacts from the previous checkouts
|
|
||||||
git clean -fxd
|
|
||||||
working-directory: pytorch
|
|
||||||
- name: Populate binary env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
"${PYTORCH_ROOT}/.circleci/scripts/binary_populate_env.sh"
|
|
||||||
- name: Build PyTorch binary
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
"${PYTORCH_ROOT}/.circleci/scripts/binary_windows_build.sh"
|
|
||||||
- uses: actions/upload-artifact@v4.4.0
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: libtorch-cpu-shared-with-deps-debug
|
|
||||||
retention-days: 14
|
|
||||||
if-no-files-found: error
|
|
||||||
path: "${{ env.PYTORCH_FINAL_PACKAGE_DIR }}"
|
|
||||||
- name: Wait until all sessions have drained
|
|
||||||
shell: powershell
|
|
||||||
working-directory: pytorch
|
|
||||||
if: always()
|
|
||||||
timeout-minutes: 120
|
|
||||||
run: |
|
|
||||||
.github\scripts\wait_for_ssh_to_drain.ps1
|
|
||||||
- name: Kill active ssh sessions if still around (Useful if workflow was cancelled)
|
|
||||||
shell: powershell
|
|
||||||
working-directory: pytorch
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
.github\scripts\kill_active_ssh_sessions.ps1
|
|
||||||
|
|
||||||
libtorch-cpu-shared-with-deps-debug-test: # Testing
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
needs:
|
|
||||||
- libtorch-cpu-shared-with-deps-debug-build
|
|
||||||
- get-label-type
|
|
||||||
runs-on: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral"
|
|
||||||
timeout-minutes: 360
|
|
||||||
env:
|
|
||||||
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
|
|
||||||
PACKAGE_TYPE: libtorch
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: cpu
|
|
||||||
GPU_ARCH_TYPE: cpu
|
|
||||||
SKIP_ALL_TESTS: 1
|
|
||||||
LIBTORCH_CONFIG: debug
|
|
||||||
LIBTORCH_VARIANT: shared-with-deps
|
|
||||||
# This is a dummy value for libtorch to work correctly with our batch scripts
|
|
||||||
# without this value pip does not get installed for some reason
|
|
||||||
DESIRED_PYTHON: "3.10"
|
|
||||||
steps:
|
|
||||||
- name: Display EC2 information
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
function get_ec2_metadata() {
|
|
||||||
# Pulled from instance metadata endpoint for EC2
|
|
||||||
# see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
|
|
||||||
category=$1
|
|
||||||
curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}"
|
|
||||||
}
|
|
||||||
echo "ami-id: $(get_ec2_metadata ami-id)"
|
|
||||||
echo "instance-id: $(get_ec2_metadata instance-id)"
|
|
||||||
echo "instance-type: $(get_ec2_metadata instance-type)"
|
|
||||||
echo "system info $(uname -a)"
|
|
||||||
- name: "[FB EMPLOYEES] Enable SSH (Click me for login details)"
|
|
||||||
uses: pytorch/test-infra/.github/actions/setup-ssh@main
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
github-secret: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Enable git long paths and symlinks on Windows and disable fsmonitor daemon
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git config --global core.longpaths true
|
|
||||||
git config --global core.symlinks true
|
|
||||||
|
|
||||||
# https://git-scm.com/docs/git-fsmonitor--daemon. The daemon could lock
|
|
||||||
# the directory on Windows and prevent GHA from checking out as reported
|
|
||||||
# in https://github.com/actions/checkout/issues/1018
|
|
||||||
git config --global core.fsmonitor false
|
|
||||||
# Needed for binary builds, see: https://github.com/pytorch/pytorch/issues/73339#issuecomment-1058981560
|
|
||||||
- name: Enable long paths on Windows
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Set-ItemProperty -Path "HKLM:\\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
|
|
||||||
# Since it's just a defensive command, the workflow should continue even the command fails. This step can be
|
|
||||||
# removed once Windows Defender is removed from the AMI
|
|
||||||
- name: Disables Windows Defender scheduled and real-time scanning for files in directories used by PyTorch
|
|
||||||
continue-on-error: true
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Add-MpPreference -ExclusionPath $(Get-Location).tostring(),$Env:TEMP -ErrorAction Ignore
|
|
||||||
# Let's both exclude the path and disable Windows Defender completely just to be sure
|
|
||||||
# that it doesn't interfere
|
|
||||||
Set-MpPreference -DisableRealtimeMonitoring $True -ErrorAction Ignore
|
|
||||||
- name: Checkout PyTorch
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
||||||
submodules: recursive
|
|
||||||
path: pytorch
|
|
||||||
show-progress: false
|
|
||||||
- name: Clean PyTorch checkout
|
|
||||||
run: |
|
|
||||||
# Remove any artifacts from the previous checkouts
|
|
||||||
git clean -fxd
|
|
||||||
working-directory: pytorch
|
|
||||||
# NOTE: These environment variables are put here so that they can be applied on every job equally
|
|
||||||
# They are also here because setting them at a workflow level doesn't give us access to the
|
|
||||||
# runner.temp variable, which we need.
|
|
||||||
- name: Populate binary env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "BINARY_ENV_FILE=${RUNNER_TEMP}/env" >> "${GITHUB_ENV}"
|
|
||||||
echo "PYTORCH_FINAL_PACKAGE_DIR=${RUNNER_TEMP}/artifacts" >> "${GITHUB_ENV}"
|
|
||||||
echo "WIN_PACKAGE_WORK_DIR=${RUNNER_TEMP}"
|
|
||||||
- uses: actions/download-artifact@v4.1.7
|
|
||||||
name: Download Build Artifacts
|
|
||||||
with:
|
|
||||||
name: libtorch-cpu-shared-with-deps-debug
|
|
||||||
path: "${{ env.PYTORCH_FINAL_PACKAGE_DIR }}"
|
|
||||||
- name: Populate binary env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
"${PYTORCH_ROOT}/.circleci/scripts/binary_populate_env.sh"
|
|
||||||
- name: Test PyTorch binary
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
"${PYTORCH_ROOT}/.circleci/scripts/binary_windows_test.sh"
|
|
||||||
- name: Wait until all sessions have drained
|
|
||||||
shell: powershell
|
|
||||||
working-directory: pytorch
|
|
||||||
if: always()
|
|
||||||
timeout-minutes: 120
|
|
||||||
run: |
|
|
||||||
.github\scripts\wait_for_ssh_to_drain.ps1
|
|
||||||
- name: Kill active ssh sessions if still around (Useful if workflow was cancelled)
|
|
||||||
shell: powershell
|
|
||||||
working-directory: pytorch
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
.github\scripts\kill_active_ssh_sessions.ps1
|
|
||||||
261
.github/workflows/generated-windows-binary-libtorch-release-main.yml
generated
vendored
261
.github/workflows/generated-windows-binary-libtorch-release-main.yml
generated
vendored
|
|
@ -1,261 +0,0 @@
|
||||||
# @generated DO NOT EDIT MANUALLY
|
|
||||||
|
|
||||||
# Template is at: .github/templates/windows_binary_build_workflow.yml.j2
|
|
||||||
# Generation script: .github/scripts/generate_ci_workflows.py
|
|
||||||
name: windows-binary-libtorch-release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
# Needed for conda builds
|
|
||||||
ALPINE_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine"
|
|
||||||
AWS_DEFAULT_REGION: us-east-1
|
|
||||||
BUILD_ENVIRONMENT: windows-binary-libtorch-release
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
SKIP_ALL_TESTS: 1
|
|
||||||
OS: windows
|
|
||||||
concurrency:
|
|
||||||
group: windows-binary-libtorch-release-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get-label-type:
|
|
||||||
if: github.repository_owner == 'pytorch'
|
|
||||||
name: get-label-type
|
|
||||||
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
|
|
||||||
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 }}
|
|
||||||
libtorch-cpu-shared-with-deps-release-build:
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
needs: get-label-type
|
|
||||||
runs-on: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral"
|
|
||||||
timeout-minutes: 360
|
|
||||||
env:
|
|
||||||
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
|
|
||||||
PACKAGE_TYPE: libtorch
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: cpu
|
|
||||||
GPU_ARCH_TYPE: cpu
|
|
||||||
SKIP_ALL_TESTS: 1
|
|
||||||
LIBTORCH_CONFIG: release
|
|
||||||
LIBTORCH_VARIANT: shared-with-deps
|
|
||||||
# This is a dummy value for libtorch to work correctly with our batch scripts
|
|
||||||
# without this value pip does not get installed for some reason
|
|
||||||
DESIRED_PYTHON: "3.10"
|
|
||||||
steps:
|
|
||||||
# NOTE: These environment variables are put here so that they can be applied on every job equally
|
|
||||||
# They are also here because setting them at a workflow level doesn't give us access to the
|
|
||||||
# runner.temp variable, which we need.
|
|
||||||
- name: Populate binary env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "BINARY_ENV_FILE=${RUNNER_TEMP}/env" >> "${GITHUB_ENV}"
|
|
||||||
echo "PYTORCH_FINAL_PACKAGE_DIR=${RUNNER_TEMP}/artifacts" >> "${GITHUB_ENV}"
|
|
||||||
echo "WIN_PACKAGE_WORK_DIR=${RUNNER_TEMP}"
|
|
||||||
- name: Display EC2 information
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
function get_ec2_metadata() {
|
|
||||||
# Pulled from instance metadata endpoint for EC2
|
|
||||||
# see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
|
|
||||||
category=$1
|
|
||||||
curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}"
|
|
||||||
}
|
|
||||||
echo "ami-id: $(get_ec2_metadata ami-id)"
|
|
||||||
echo "instance-id: $(get_ec2_metadata instance-id)"
|
|
||||||
echo "instance-type: $(get_ec2_metadata instance-type)"
|
|
||||||
echo "system info $(uname -a)"
|
|
||||||
- name: "[FB EMPLOYEES] Enable SSH (Click me for login details)"
|
|
||||||
uses: pytorch/test-infra/.github/actions/setup-ssh@main
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
github-secret: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Enable git long paths and symlinks on Windows and disable fsmonitor daemon
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git config --global core.longpaths true
|
|
||||||
git config --global core.symlinks true
|
|
||||||
|
|
||||||
# https://git-scm.com/docs/git-fsmonitor--daemon. The daemon could lock
|
|
||||||
# the directory on Windows and prevent GHA from checking out as reported
|
|
||||||
# in https://github.com/actions/checkout/issues/1018
|
|
||||||
git config --global core.fsmonitor false
|
|
||||||
# Needed for binary builds, see: https://github.com/pytorch/pytorch/issues/73339#issuecomment-1058981560
|
|
||||||
- name: Enable long paths on Windows
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Set-ItemProperty -Path "HKLM:\\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
|
|
||||||
# Since it's just a defensive command, the workflow should continue even the command fails. This step can be
|
|
||||||
# removed once Windows Defender is removed from the AMI
|
|
||||||
- name: Disables Windows Defender scheduled and real-time scanning for files in directories used by PyTorch
|
|
||||||
continue-on-error: true
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Add-MpPreference -ExclusionPath $(Get-Location).tostring(),$Env:TEMP -ErrorAction Ignore
|
|
||||||
# Let's both exclude the path and disable Windows Defender completely just to be sure
|
|
||||||
# that it doesn't interfere
|
|
||||||
Set-MpPreference -DisableRealtimeMonitoring $True -ErrorAction Ignore
|
|
||||||
- name: Checkout PyTorch
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
||||||
submodules: recursive
|
|
||||||
path: pytorch
|
|
||||||
show-progress: false
|
|
||||||
- name: Clean PyTorch checkout
|
|
||||||
run: |
|
|
||||||
# Remove any artifacts from the previous checkouts
|
|
||||||
git clean -fxd
|
|
||||||
working-directory: pytorch
|
|
||||||
- name: Populate binary env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
"${PYTORCH_ROOT}/.circleci/scripts/binary_populate_env.sh"
|
|
||||||
- name: Build PyTorch binary
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
"${PYTORCH_ROOT}/.circleci/scripts/binary_windows_build.sh"
|
|
||||||
- uses: actions/upload-artifact@v4.4.0
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: libtorch-cpu-shared-with-deps-release
|
|
||||||
retention-days: 14
|
|
||||||
if-no-files-found: error
|
|
||||||
path: "${{ env.PYTORCH_FINAL_PACKAGE_DIR }}"
|
|
||||||
- name: Wait until all sessions have drained
|
|
||||||
shell: powershell
|
|
||||||
working-directory: pytorch
|
|
||||||
if: always()
|
|
||||||
timeout-minutes: 120
|
|
||||||
run: |
|
|
||||||
.github\scripts\wait_for_ssh_to_drain.ps1
|
|
||||||
- name: Kill active ssh sessions if still around (Useful if workflow was cancelled)
|
|
||||||
shell: powershell
|
|
||||||
working-directory: pytorch
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
.github\scripts\kill_active_ssh_sessions.ps1
|
|
||||||
|
|
||||||
libtorch-cpu-shared-with-deps-release-test: # Testing
|
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
|
||||||
needs:
|
|
||||||
- libtorch-cpu-shared-with-deps-release-build
|
|
||||||
- get-label-type
|
|
||||||
runs-on: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral"
|
|
||||||
timeout-minutes: 360
|
|
||||||
env:
|
|
||||||
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
|
|
||||||
PACKAGE_TYPE: libtorch
|
|
||||||
# TODO: This is a legacy variable that we eventually want to get rid of in
|
|
||||||
# favor of GPU_ARCH_VERSION
|
|
||||||
DESIRED_CUDA: cpu
|
|
||||||
GPU_ARCH_TYPE: cpu
|
|
||||||
SKIP_ALL_TESTS: 1
|
|
||||||
LIBTORCH_CONFIG: release
|
|
||||||
LIBTORCH_VARIANT: shared-with-deps
|
|
||||||
# This is a dummy value for libtorch to work correctly with our batch scripts
|
|
||||||
# without this value pip does not get installed for some reason
|
|
||||||
DESIRED_PYTHON: "3.10"
|
|
||||||
steps:
|
|
||||||
- name: Display EC2 information
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
function get_ec2_metadata() {
|
|
||||||
# Pulled from instance metadata endpoint for EC2
|
|
||||||
# see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
|
|
||||||
category=$1
|
|
||||||
curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}"
|
|
||||||
}
|
|
||||||
echo "ami-id: $(get_ec2_metadata ami-id)"
|
|
||||||
echo "instance-id: $(get_ec2_metadata instance-id)"
|
|
||||||
echo "instance-type: $(get_ec2_metadata instance-type)"
|
|
||||||
echo "system info $(uname -a)"
|
|
||||||
- name: "[FB EMPLOYEES] Enable SSH (Click me for login details)"
|
|
||||||
uses: pytorch/test-infra/.github/actions/setup-ssh@main
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
github-secret: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Enable git long paths and symlinks on Windows and disable fsmonitor daemon
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git config --global core.longpaths true
|
|
||||||
git config --global core.symlinks true
|
|
||||||
|
|
||||||
# https://git-scm.com/docs/git-fsmonitor--daemon. The daemon could lock
|
|
||||||
# the directory on Windows and prevent GHA from checking out as reported
|
|
||||||
# in https://github.com/actions/checkout/issues/1018
|
|
||||||
git config --global core.fsmonitor false
|
|
||||||
# Needed for binary builds, see: https://github.com/pytorch/pytorch/issues/73339#issuecomment-1058981560
|
|
||||||
- name: Enable long paths on Windows
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Set-ItemProperty -Path "HKLM:\\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
|
|
||||||
# Since it's just a defensive command, the workflow should continue even the command fails. This step can be
|
|
||||||
# removed once Windows Defender is removed from the AMI
|
|
||||||
- name: Disables Windows Defender scheduled and real-time scanning for files in directories used by PyTorch
|
|
||||||
continue-on-error: true
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Add-MpPreference -ExclusionPath $(Get-Location).tostring(),$Env:TEMP -ErrorAction Ignore
|
|
||||||
# Let's both exclude the path and disable Windows Defender completely just to be sure
|
|
||||||
# that it doesn't interfere
|
|
||||||
Set-MpPreference -DisableRealtimeMonitoring $True -ErrorAction Ignore
|
|
||||||
- name: Checkout PyTorch
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
||||||
submodules: recursive
|
|
||||||
path: pytorch
|
|
||||||
show-progress: false
|
|
||||||
- name: Clean PyTorch checkout
|
|
||||||
run: |
|
|
||||||
# Remove any artifacts from the previous checkouts
|
|
||||||
git clean -fxd
|
|
||||||
working-directory: pytorch
|
|
||||||
# NOTE: These environment variables are put here so that they can be applied on every job equally
|
|
||||||
# They are also here because setting them at a workflow level doesn't give us access to the
|
|
||||||
# runner.temp variable, which we need.
|
|
||||||
- name: Populate binary env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "BINARY_ENV_FILE=${RUNNER_TEMP}/env" >> "${GITHUB_ENV}"
|
|
||||||
echo "PYTORCH_FINAL_PACKAGE_DIR=${RUNNER_TEMP}/artifacts" >> "${GITHUB_ENV}"
|
|
||||||
echo "WIN_PACKAGE_WORK_DIR=${RUNNER_TEMP}"
|
|
||||||
- uses: actions/download-artifact@v4.1.7
|
|
||||||
name: Download Build Artifacts
|
|
||||||
with:
|
|
||||||
name: libtorch-cpu-shared-with-deps-release
|
|
||||||
path: "${{ env.PYTORCH_FINAL_PACKAGE_DIR }}"
|
|
||||||
- name: Populate binary env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
"${PYTORCH_ROOT}/.circleci/scripts/binary_populate_env.sh"
|
|
||||||
- name: Test PyTorch binary
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
"${PYTORCH_ROOT}/.circleci/scripts/binary_windows_test.sh"
|
|
||||||
- name: Wait until all sessions have drained
|
|
||||||
shell: powershell
|
|
||||||
working-directory: pytorch
|
|
||||||
if: always()
|
|
||||||
timeout-minutes: 120
|
|
||||||
run: |
|
|
||||||
.github\scripts\wait_for_ssh_to_drain.ps1
|
|
||||||
- name: Kill active ssh sessions if still around (Useful if workflow was cancelled)
|
|
||||||
shell: powershell
|
|
||||||
working-directory: pytorch
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
.github\scripts\kill_active_ssh_sessions.ps1
|
|
||||||
Loading…
Reference in New Issue
Block a user