Compare commits

...

5 Commits

Author SHA1 Message Date
682123a932 tc 2025-10-09 15:31:55 -07:00
ae8d1cea07 no md? 2025-10-09 14:21:28 -07:00
044bc49d3b tc 2025-10-09 08:46:29 -07:00
d0af79387e tc 2025-10-08 20:06:45 -07:00
a1b3ef8011 tc 2025-10-08 16:40:08 -07:00
5 changed files with 41 additions and 194 deletions

View File

@ -29,6 +29,9 @@ env
# https://github.com/pytorch/pytorch/blob/0b6c0898e6c352c8ea93daec854e704b41485375/.ci/docker/common/install_cache.sh#L97
export PATH="/opt/cache/lib:$PATH"
# Turn off -MD / -MMD compiler flags to increase sccache hit rate
export COMPILE_NO_MD=1
if [[ "$BUILD_ENVIRONMENT" == *cuda* ]]; then
# Use jemalloc during compilation to mitigate https://github.com/pytorch/pytorch/issues/116289
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
@ -289,8 +292,15 @@ else
python -mpip install numpy==2.0.2
WERROR=1 python setup.py clean
sccache --stop-server
export SCCACHE_LOG_LEVEL=debug
export SCCACHE_ERROR_LOG=/tmp/sccache_errors.log
export SCCACHE_LOG=debug
export RUST_LOG=sccache::server=debug
sccache --start-server
WERROR=1 python -m build --wheel --no-isolation
mv /tmp/sccache_errors.log dist/
else
python setup.py clean
if [[ "$BUILD_ENVIRONMENT" == *xla* ]]; then

View File

@ -2,6 +2,8 @@
# Required environment variables:
# $BUILD_ENVIRONMENT (should be set by your Docker image)
set -e -x -o pipefail
if [[ "$BUILD_ENVIRONMENT" != *win-* ]]; then
# Save the absolute path in case later we chdir (as occurs in the gpu perf test)
script_dir="$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )"
@ -45,14 +47,14 @@ if [[ "$BUILD_ENVIRONMENT" != *win-* ]]; then
# explicitly
echo "Skipping sccache server initialization, setting environment variables"
export SCCACHE_IDLE_TIMEOUT=0
export SCCACHE_ERROR_LOG=~/sccache_error.log
export RUST_LOG=sccache::server=error
export SCCACHE_ERROR_LOG=/tmp/sccache_error.log
export RUST_LOG=sccache::server=debug
elif [[ "${BUILD_ENVIRONMENT}" == *rocm* ]]; then
SCCACHE_ERROR_LOG=~/sccache_error.log SCCACHE_IDLE_TIMEOUT=0 sccache --start-server
SCCACHE_ERROR_LOG=/tmp/sccache_error.log SCCACHE_IDLE_TIMEOUT=0 sccache --start-server
else
# increasing SCCACHE_IDLE_TIMEOUT so that extension_backend_test.cpp can build after this PR:
# https://github.com/pytorch/pytorch/pull/16645
SCCACHE_ERROR_LOG=~/sccache_error.log SCCACHE_IDLE_TIMEOUT=0 RUST_LOG=sccache::server=error sccache --start-server
SCCACHE_ERROR_LOG=/tmp/sccache_error.log SCCACHE_IDLE_TIMEOUT=0 RUST_LOG=sccache::server=error sccache --start-server
fi
# Report sccache stats for easier debugging. It's ok if this commands

View File

@ -1,16 +1,16 @@
name: pull
on:
pull_request:
branches-ignore:
- nightly
push:
branches:
- main
- release/*
- landchecks/*
tags:
- ciflow/pull/*
# pull_request:
# branches-ignore:
# - nightly
# push:
# branches:
# - main
# - release/*
# - landchecks/*
# tags:
# - ciflow/pull/*
workflow_dispatch:
schedule:
- cron: 29 8 * * * # about 1:29am PDT

View File

@ -47,22 +47,6 @@ jobs:
curr_branch: ${{ github.head_ref || github.ref_name }}
curr_ref_type: ${{ github.ref_type }}
libtorch-linux-jammy-cuda12_8-py3_10-gcc11-debug-build:
name: libtorch-linux-jammy-cuda12.8-py3.10-gcc11-debug
uses: ./.github/workflows/_linux-build.yml
needs: get-label-type
with:
build-environment: libtorch-linux-jammy-cuda12.8-py3.10-gcc11
docker-image-name: ci-image:pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc11
build-generates-artifacts: false
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
runner: "linux.4xlarge"
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 1 },
]}
secrets: inherit
linux-jammy-cuda12_8-py3_10-gcc11-build:
name: linux-jammy-cuda12.8-py3.10-gcc11
uses: ./.github/workflows/_linux-build.yml
@ -85,167 +69,3 @@ jobs:
{ config: "pr_time_benchmarks", shard: 1, num_shards: 1, runner: "linux.g4dn.metal.nvidia.gpu" },
]}
secrets: inherit
linux-jammy-cuda12_8-py3_10-gcc11-test:
name: linux-jammy-cuda12.8-py3.10-gcc11
uses: ./.github/workflows/_linux-test.yml
needs:
- linux-jammy-cuda12_8-py3_10-gcc11-build
- target-determination
with:
timeout-minutes: 360
build-environment: linux-jammy-cuda12.8-py3.10-gcc11
docker-image: ${{ needs.linux-jammy-cuda12_8-py3_10-gcc11-build.outputs.docker-image }}
test-matrix: ${{ needs.linux-jammy-cuda12_8-py3_10-gcc11-build.outputs.test-matrix }}
secrets: inherit
# no-ops builds test USE_PER_OPERATOR_HEADERS=0 where ATen/ops is not generated
linux-jammy-cuda12_8-py3_10-gcc11-no-ops-build:
name: linux-jammy-cuda12.8-py3.10-gcc11-no-ops
uses: ./.github/workflows/_linux-build.yml
needs: get-label-type
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-cuda12.8-py3.10-gcc11-no-ops
docker-image-name: ci-image:pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc11
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 1 },
]}
secrets: inherit
macos-py3-arm64-build:
if: github.repository_owner == 'pytorch'
name: macos-py3-arm64
uses: ./.github/workflows/_mac-build.yml
with:
sync-tag: macos-py3-arm64-build
build-environment: macos-py3-arm64
runner-type: macos-m1-stable
build-generates-artifacts: true
# To match the one pre-installed in the m1 runners
python-version: 3.12.7
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 3, runner: "macos-m1-stable" },
{ config: "default", shard: 2, num_shards: 3, runner: "macos-m1-stable" },
{ config: "default", shard: 3, num_shards: 3, runner: "macos-m1-stable" },
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m1-14" },
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m2-15" },
]}
secrets: inherit
macos-py3-arm64-test:
name: macos-py3-arm64
uses: ./.github/workflows/_mac-test.yml
needs:
- macos-py3-arm64-build
- target-determination
with:
build-environment: macos-py3-arm64
# Same as the build job
python-version: 3.12.7
test-matrix: ${{ needs.macos-py3-arm64-build.outputs.test-matrix }}
disable-monitor: false
secrets: inherit
win-vs2022-cpu-py3-build:
name: win-vs2022-cpu-py3
uses: ./.github/workflows/_win-build.yml
needs: get-label-type
with:
build-environment: win-vs2022-cpu-py3
cuda-version: cpu
runner: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral"
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 4, runner: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral" },
{ config: "default", shard: 2, num_shards: 4, runner: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral" },
{ config: "default", shard: 3, num_shards: 4, runner: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral" },
{ config: "default", shard: 4, num_shards: 4, runner: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral" },
]}
secrets: inherit
win-vs2022-cpu-py3-test:
name: win-vs2022-cpu-py3
uses: ./.github/workflows/_win-test.yml
needs:
- win-vs2022-cpu-py3-build
- target-determination
with:
build-environment: win-vs2022-cpu-py3
cuda-version: cpu
test-matrix: ${{ needs.win-vs2022-cpu-py3-build.outputs.test-matrix }}
disable-monitor: false
secrets: inherit
win-vs2022-cuda12_6-py3-build:
name: win-vs2022-cuda12.6-py3
uses: ./.github/workflows/_win-build.yml
needs: get-label-type
with:
build-environment: win-vs2022-cuda12.6-py3
cuda-version: "12.6"
runner: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral"
secrets: inherit
inductor-build:
name: inductor-build
uses: ./.github/workflows/_linux-build.yml
needs: get-label-type
with:
build-environment: linux-jammy-cuda12.8-py3.12-gcc9-sm80
docker-image-name: ci-image:pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc9-inductor-benchmarks
cuda-arch-list: '8.0'
secrets: inherit
verify-cachebench-cpu-build:
name: verify-cachebench-cpu-build
uses: ./.github/workflows/_linux-build.yml
needs: get-label-type
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-py3.10-gcc11
docker-image-name: ci-image:pytorch-linux-jammy-py3-gcc11-inductor-benchmarks
test-matrix: |
{ include: [
{ config: "verify_cachebench", shard: 1, num_shards: 1, runner: "${{ needs.get-label-type.outputs.label-type }}linux.2xlarge" },
]}
secrets: inherit
verify-cachebench-cpu-test:
name: verify-cachebench-cpu-test
uses: ./.github/workflows/_linux-test.yml
needs:
- verify-cachebench-cpu-build
- target-determination
with:
build-environment: linux-jammy-py3.10-gcc11
docker-image: ${{ needs.verify-cachebench-cpu-build.outputs.docker-image }}
test-matrix: ${{ needs.verify-cachebench-cpu-build.outputs.test-matrix }}
secrets: inherit
linux-jammy-py3-clang12-executorch-build:
name: linux-jammy-py3-clang12-executorch
uses: ./.github/workflows/_linux-build.yml
needs: get-label-type
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-py3-clang12-executorch
docker-image-name: ci-image:pytorch-linux-jammy-py3-clang12-executorch
test-matrix: |
{ include: [
{ config: "executorch", shard: 1, num_shards: 1, runner: "${{ needs.get-label-type.outputs.label-type }}linux.2xlarge" },
]}
secrets: inherit
linux-jammy-py3-clang12-executorch-test:
name: linux-jammy-py3-clang12-executorch
uses: ./.github/workflows/_linux-test.yml
needs: linux-jammy-py3-clang12-executorch-build
with:
build-environment: linux-jammy-py3-clang12-executorch
docker-image: ${{ needs.linux-jammy-py3-clang12-executorch-build.outputs.docker-image }}
test-matrix: ${{ needs.linux-jammy-py3-clang12-executorch-build.outputs.test-matrix }}
secrets: inherit

View File

@ -420,6 +420,14 @@ if(USE_CCACHE)
endif()
endif()
# Optionally disable -MD / -MMD if COMPILE_NO_MD is set in the environment
if(DEFINED ENV{COMPILE_NO_MD})
message(STATUS "COMPILE_NO_MD is set — disabling compiler dependency file flags (-MD/-MMD)")
foreach(lang C CXX CUDA HIP ASM)
set(CMAKE_DEPFILE_FLAGS_${lang} "")
endforeach()
endif()
# Since TensorPipe does not support Windows, set it to OFF when WIN32 detected
# On Windows platform, if user does not install libuv in build conda env and
# does not set libuv_ROOT environment variable. Set USE_DISTRIBUTED to OFF.
@ -1487,3 +1495,10 @@ else()
]])
endif()
endif()
foreach(lang C CXX CUDA)
foreach(flg "" "_DEBUG" "_RELEASE" "_RELWITHDEBINFO")
string(REPLACE "-MD" "" CMAKE_${lang}_FLAGS${flg} "${CMAKE_${lang}_FLAGS${flg}}")
string(REPLACE "-MMD" "" CMAKE_${lang}_FLAGS${flg} "${CMAKE_${lang}_FLAGS${flg}}")
endforeach()
endforeach()