Skip to content

Commit

Permalink
Revert "group constraints by arg (#101815)"
Browse files Browse the repository at this point in the history
This reverts commit 03de158.
Reverted #101815 on behalf of https://github.com/malfet due to it broke ExecuTorch and author was well aware about it"

ghstack-source-id: 124ef67dcc8edd2a0eda866e5bb8940b89fc2894
Pull Request resolved: #101985
  • Loading branch information
malfet authored and PaliC committed May 22, 2023
1 parent 496212f commit 113646f
Show file tree
Hide file tree
Showing 26 changed files with 168 additions and 17 deletions.
43 changes: 43 additions & 0 deletions .ci/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ case "$image" in
CONDA_CMAKE=yes
TRITON=yes
;;
pytorch-linux-bionic-cuda12.1-cudnn8-py3-gcc7-inductor-benchmarks)
CUDA_VERSION=12.1.0
CUDNN_VERSION=8
ANACONDA_PYTHON_VERSION=3.10
GCC_VERSION=7
PROTOBUF=yes
DB=yes
VISION=yes
KATEX=yes
UCX_COMMIT=${_UCX_COMMIT}
UCC_COMMIT=${_UCC_COMMIT}
CONDA_CMAKE=yes
TRITON=yes
INDUCTOR_BENCHMARK=yes
;;
pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7)
CUDA_VERSION=11.8.0
CUDNN_VERSION=8
Expand All @@ -116,6 +131,21 @@ case "$image" in
CONDA_CMAKE=yes
TRITON=yes
;;
pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7-inductor-benchmarks)
CUDA_VERSION=11.8.0
CUDNN_VERSION=8
ANACONDA_PYTHON_VERSION=3.10
GCC_VERSION=7
PROTOBUF=yes
DB=yes
VISION=yes
KATEX=yes
UCX_COMMIT=${_UCX_COMMIT}
UCC_COMMIT=${_UCC_COMMIT}
CONDA_CMAKE=yes
TRITON=yes
INDUCTOR_BENCHMARK=yes
;;
pytorch-linux-focal-py3-clang7-asan)
ANACONDA_PYTHON_VERSION=3.9
CLANG_VERSION=7
Expand Down Expand Up @@ -208,6 +238,18 @@ case "$image" in
TRITON=yes
DOCS=yes
;;
pytorch-linux-focal-py3.8-gcc7-inductor-benchmarks)
ANACONDA_PYTHON_VERSION=3.8
GCC_VERSION=7
PROTOBUF=yes
DB=yes
VISION=yes
KATEX=yes
CONDA_CMAKE=yes
TRITON=yes
DOCS=yes
INDUCTOR_BENCHMARK=yes
;;
pytorch-linux-jammy-cuda11.7-cudnn8-py3.8-clang12)
ANACONDA_PYTHON_VERSION=3.8
CUDA_VERSION=11.7
Expand Down Expand Up @@ -323,6 +365,7 @@ docker build \
--build-arg "TRITON=${TRITON}" \
--build-arg "ONNX=${ONNX}" \
--build-arg "DOCS=${DOCS}" \
--build-arg "INDUCTOR_BENCHMARK=${INDUCTOR_BENCHMARK}" \
-f $(dirname ${DOCKERFILE})/Dockerfile \
-t "$tmp_tag" \
"$@" \
Expand Down
1 change: 1 addition & 0 deletions .ci/docker/ci_commit_pins/audio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a8f4e97bd5356a7a77510cdf6a3a62e25a5dc602
1 change: 1 addition & 0 deletions .ci/docker/ci_commit_pins/data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11bb5b847ea8b9e0d9bb82db3304daf383008d3f
1 change: 1 addition & 0 deletions .ci/docker/ci_commit_pins/huggingface.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.27.4
1 change: 1 addition & 0 deletions .ci/docker/ci_commit_pins/text.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b0ebddc648d279826089db91775375221777a2db
1 change: 1 addition & 0 deletions .ci/docker/ci_commit_pins/timm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b9d43c7dcac1fe05e851dd7be7187b108af593d2
1 change: 1 addition & 0 deletions .ci/docker/ci_commit_pins/torchbench.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ec359fad2c5c50a83cfb4d5a7edc17e95c195e85
2 changes: 1 addition & 1 deletion .ci/docker/ci_commit_pins/triton-rocm.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cd9e4c5db76b2bb0b47d0680d3d4c24523047e7c
cd9e4c5db76b2bb0b47d0680d3d4c24523047e7c
1 change: 1 addition & 0 deletions .ci/docker/ci_commit_pins/vision.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
300a90926e88f13abbaf3d8155cdba36aab86ab4
71 changes: 71 additions & 0 deletions .ci/docker/common/install_inductor_benchmark_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
set -ex

source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"

function install_huggingface() {
local version
version=$(get_pinned_commit huggingface)
pip_install pandas
pip_install scipy
pip_install "transformers==${version}"
}

function install_timm() {
local commit
commit=$(get_pinned_commit timm)
pip_install pandas
pip_install scipy
pip_install "git+https://github.com/rwightman/pytorch-image-models@${commit}"
}

function checkout_install_torchbench() {
local commit
commit=$(get_pinned_commit torchbench)
git clone https://github.com/pytorch/benchmark torchbench
pushd torchbench
git checkout "$commit"

if [ "$1" ]; then
as_jenkins python install.py --continue_on_fail models "$@"
else
# Occasionally the installation may fail on one model but it is ok to continue
# to install and test other models
as_jenkins python install.py --continue_on_fail
fi
popd
}

function install_torchaudio() {
local commit
commit=$(get_pinned_commit audio)
if [[ "$1" == "cuda" ]]; then
# TODO: This is better to be passed as a parameter from _linux-test workflow
# so that it can be consistent with what is set in build
TORCH_CUDA_ARCH_LIST="8.0;8.6" pip_install --no-use-pep517 --user "git+https://github.com/pytorch/audio.git@${commit}"
else
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/audio.git@${commit}"
fi

}

function install_torchtext() {
local data_commit
local text_commit
data_commit=$(get_pinned_commit data)
text_commit=$(get_pinned_commit text)
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/data.git@${data_commit}"
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/text.git@${text_commit}"
}

function install_torchvision() {
local commit
commit=$(get_pinned_commit vision)
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/vision.git@${commit}"
}

install_huggingface
install_timm
# install_torchaudio
# install_torchtext
# install_torchvision
# checkout_install_torchbench
14 changes: 14 additions & 0 deletions .ci/docker/ubuntu-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ COPY triton_version.txt triton_version.txt
RUN if [ -n "${TRITON}" ]; then bash ./install_triton.sh; fi
RUN rm install_triton.sh common_utils.sh triton.txt triton_version.txt

# [Optional] Install torch inductor benchmark deps
ARG INDUCTOR_BENCHMARK
COPY ./common/install_inductor_benchmark_deps.sh install_inductor_benchmark_deps.sh
COPY ./common/common_utils.sh common_utils.sh
COPY ci_commit_pins/vision.txt vision.txt
COPY ci_commit_pins/audio.txt audio.txt
COPY ci_commit_pins/huggingface.txt huggingface.txt
COPY ci_commit_pins/timm.txt timm.txt
COPY ci_commit_pins/torchbench.txt torchbench.txt
COPY ci_commit_pins/text.txt text.txt

RUN if [ -n "${INDUCTOR_BENCHMARK}" ]; then bash ./install_inductor_benchmark_deps.sh; fi
RUN rm install_inductor_benchmark_deps.sh common_utils.sh vision.txt audio.txt huggingface.txt timm.txt torchbench.txt text.txt

# Install ccache/sccache (do this last, so we get priority in PATH)
COPY ./common/install_cache.sh install_cache.sh
ENV PATH /opt/cache/bin:$PATH
Expand Down
14 changes: 14 additions & 0 deletions .ci/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ COPY ci_commit_pins/triton.txt triton.txt
RUN if [ -n "${TRITON}" ]; then bash ./install_triton.sh; fi
RUN rm install_triton.sh common_utils.sh triton.txt

# [Optional] Install torch inductor benchmark deps
ARG INDUCTOR_BENCHMARK
COPY ./common/install_inductor_benchmark_deps.sh install_inductor_benchmark_deps.sh
COPY ./common/common_utils.sh common_utils.sh
COPY ci_commit_pins/vision.txt vision.txt
COPY ci_commit_pins/audio.txt audio.txt
COPY ci_commit_pins/huggingface.txt huggingface.txt
COPY ci_commit_pins/timm.txt timm.txt
COPY ci_commit_pins/torchbench.txt torchbench.txt
COPY ci_commit_pins/text.txt text.txt

RUN if [ -n "${INDUCTOR_BENCHMARK}" ]; then bash ./install_inductor_benchmark_deps.sh; fi
RUN rm install_inductor_benchmark_deps.sh common_utils.sh vision.txt audio.txt huggingface.txt timm.txt torchbench.txt text.txt

ARG ONNX
# Install ONNX dependencies
COPY ./common/install_onnx.sh ./common/common_utils.sh ./
Expand Down
5 changes: 1 addition & 4 deletions .ci/pytorch/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -964,16 +964,13 @@ elif [[ "$TEST_CONFIG" == deploy ]]; then
checkout_install_torchdeploy
test_torch_deploy
elif [[ "${TEST_CONFIG}" == *inductor_distributed* ]]; then
install_huggingface
test_inductor_distributed
elif [[ "${TEST_CONFIG}" == *huggingface* ]]; then
install_torchvision
install_huggingface
id=$((SHARD_NUMBER-1))
test_dynamo_benchmark huggingface "$id"
elif [[ "${TEST_CONFIG}" == *timm* ]]; then
install_torchvision
install_timm
id=$((SHARD_NUMBER-1))
test_dynamo_benchmark timm_models "$id"
elif [[ "${TEST_CONFIG}" == *torchbench* ]]; then
Expand Down Expand Up @@ -1042,4 +1039,4 @@ else
test_torch_function_benchmark
test_benchmarks
test_executorch
fi
fi
1 change: 0 additions & 1 deletion .github/ci_commit_pins/audio.txt

This file was deleted.

1 change: 1 addition & 0 deletions .github/ci_commit_pins/audio.txt
1 change: 0 additions & 1 deletion .github/ci_commit_pins/huggingface.txt

This file was deleted.

1 change: 1 addition & 0 deletions .github/ci_commit_pins/huggingface.txt
1 change: 0 additions & 1 deletion .github/ci_commit_pins/text.txt

This file was deleted.

1 change: 1 addition & 0 deletions .github/ci_commit_pins/text.txt
1 change: 0 additions & 1 deletion .github/ci_commit_pins/timm.txt

This file was deleted.

1 change: 1 addition & 0 deletions .github/ci_commit_pins/timm.txt
1 change: 1 addition & 0 deletions .github/ci_commit_pins/triton-rocm.txt
2 changes: 1 addition & 1 deletion .github/ci_commit_pins/vision.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
300a90926e88f13abbaf3d8155cdba36aab86ab4
300a90926e88f13abbaf3d8155cdba36aab86ab4
3 changes: 3 additions & 0 deletions .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
matrix:
include:
- docker-image-name: pytorch-linux-bionic-cuda12.1-cudnn8-py3-gcc7
- docker-image-name: pytorch-linux-bionic-cuda12.1-cudnn8-py3-gcc7-inductor-benchmarks
- docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7
- docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7-inductor-benchmarks
- docker-image-name: pytorch-linux-bionic-py3.8-clang9
- docker-image-name: pytorch-linux-bionic-py3.11-clang9
- docker-image-name: pytorch-linux-focal-rocm-n-1-py3
Expand All @@ -43,6 +45,7 @@ jobs:
- docker-image-name: pytorch-linux-jammy-cuda11.8-cudnn8-py3.8-clang12
- docker-image-name: pytorch-linux-focal-py3-clang7-android-ndk-r19c
- docker-image-name: pytorch-linux-focal-py3.8-gcc7
- docker-image-name: pytorch-linux-focal-py3.8-gcc7-inductor-benchmarks
- docker-image-name: pytorch-linux-focal-py3-clang7-asan
- docker-image-name: pytorch-linux-focal-py3-clang10-onnx
- docker-image-name: pytorch-linux-focal-linter
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inductor-perf-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: ./.github/workflows/_linux-build.yml
with:
build-environment: linux-bionic-cuda11.8-py3.10-gcc7-sm80
docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7
docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7-inductor-benchmarks
cuda-arch-list: '8.0'
test-matrix: |
{ include: [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inductor-perf-test-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: ./.github/workflows/_linux-build.yml
with:
build-environment: linux-bionic-cuda11.8-py3.10-gcc7-sm80
docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7
docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7-inductor-benchmarks
cuda-arch-list: '8.0'
test-matrix: |
{ include: [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inductor-periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ./.github/workflows/_linux-build.yml
with:
build-environment: linux-bionic-cuda12.1-py3.10-gcc7-sm86
docker-image-name: pytorch-linux-bionic-cuda12.1-cudnn8-py3-gcc7
docker-image-name: pytorch-linux-bionic-cuda12.1-cudnn8-py3-gcc7-inductor-benchmarks
cuda-arch-list: '8.6'
test-matrix: |
{ include: [
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/inductor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: ./.github/workflows/_linux-build.yml
with:
build-environment: linux-bionic-cuda11.8-py3.10-gcc7-sm86
docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7
docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7-inductor-benchmarks
cuda-arch-list: '8.6'
test-matrix: |
{ include: [
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
uses: ./.github/workflows/_linux-build.yml
with:
build-environment: linux-bionic-cuda11.8-py3.10-gcc7-sm80
docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7
docker-image-name: pytorch-linux-bionic-cuda11.8-cudnn8-py3-gcc7-inductor-benchmarks
cuda-arch-list: '8.0'
test-matrix: |
{ include: [
Expand All @@ -70,7 +70,7 @@ jobs:
uses: ./.github/workflows/_linux-build.yml
with:
build-environment: linux-focal-py3_8-gcc7-build
docker-image-name: pytorch-linux-focal-py3.8-gcc7
docker-image-name: pytorch-linux-focal-py3.8-gcc7-inductor-benchmarks
test-matrix: |
{ include: [
{ config: "inductor_huggingface_cpu_accuracy", shard: 1, num_shards: 1, runner: "linux.12xlarge" },
Expand Down
1 change: 1 addition & 0 deletions text.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b0ebddc648d279826089db91775375221777a2db
2 changes: 1 addition & 1 deletion torch/fx/experimental/symbolic_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2864,4 +2864,4 @@ def _is_int(expr):

# WARNING: This is legacy, DO NOT USE
def _is_dim_dynamic(t, d):
return hasattr(t, "_dynamo_dynamic_indices") and d in t._dynamo_dynamic_indices
return hasattr(t, "_dynamo_dynamic_indices") and d in t._dynamo_dynamic_indices

0 comments on commit 113646f

Please sign in to comment.