Skip to content

Commit 797281d

Browse files
committed
Update on "[HigherOrderOp] Remove _deprecated_global_ns from some ops"
The remaining ops after this PR are: - cond - map - anything that is out of tree. These are a bit more difficult to remove. Test Plan: - existing tests [ghstack-poisoned]
2 parents a389d87 + ebcf396 commit 797281d

File tree

350 files changed

+7250
-2988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

350 files changed

+7250
-2988
lines changed

.ci/docker/build.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,6 @@ case "$image" in
264264
DOCS=yes
265265
INDUCTOR_BENCHMARKS=yes
266266
;;
267-
pytorch-linux-jammy-cuda11.7-cudnn8-py3.8-clang12)
268-
ANACONDA_PYTHON_VERSION=3.8
269-
CUDA_VERSION=11.7
270-
CUDNN_VERSION=8
271-
CLANG_VERSION=12
272-
PROTOBUF=yes
273-
DB=yes
274-
VISION=yes
275-
TRITON=yes
276-
;;
277267
pytorch-linux-jammy-cuda11.8-cudnn8-py3.8-clang12)
278268
ANACONDA_PYTHON_VERSION=3.8
279269
CUDA_VERSION=11.8
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cd9e4c5db76b2bb0b47d0680d3d4c24523047e7c
1+
9dc100afb538d39da17621e0f8ad233f2078e6ff

.ci/pytorch/multigpu-test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
99

1010
echo "Testing pytorch"
11+
time python test/run_test.py --include test_cuda_multigpu test_cuda_primary_ctx --verbose
1112

1213
# Disabling tests to see if they solve timeout issues; see https://github.com/pytorch/pytorch/issues/70015
1314
# python tools/download_mnist.py --quiet -d test/cpp/api/mnist

.ci/pytorch/test.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ if [[ "$BUILD_ENVIRONMENT" == *clang9* ]]; then
5858
export VALGRIND=OFF
5959
fi
6060

61+
if [[ "${PYTORCH_TEST_RERUN_DISABLED_TESTS}" == "1" ]]; then
62+
# When rerunning disable tests, do not generate core dumps as it could consume
63+
# the runner disk space when crashed tests are run multiple times. Running out
64+
# of space is a nasty issue because there is no space left to even download the
65+
# GHA to clean up the disk
66+
ulimit -c 0
67+
68+
# Note that by piping the core dump to a script set in /proc/sys/kernel/core_pattern
69+
# as documented in https://man7.org/linux/man-pages/man5/core.5.html, we could
70+
# dynamically stop generating more core file when the disk space drops below a
71+
# certain threshold. However, this is not supported inside Docker container atm
72+
fi
73+
6174
# Get fully qualified path using realpath
6275
if [[ "$BUILD_ENVIRONMENT" != *bazel* ]]; then
6376
CUSTOM_TEST_ARTIFACT_BUILD_DIR=$(realpath "${CUSTOM_TEST_ARTIFACT_BUILD_DIR:-"build/custom_test_artifacts"}")

.github/ci_commit_pins/vision.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
463cdeab31c61f33a39d4adf1d88f1f4c26689d3
1+
52eb5039bed1a23eee14014ff4cd6fd9cc9b2b08

.github/ci_commit_pins/xla.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0eeaefb2341c3beea65545f278cdbd998f5a8399
1+
73392fc2a6c9ec40cba968ea66754514346ac79f

.github/workflows/docker-builds.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
- docker-image-name: pytorch-linux-bionic-py3.11-clang9
4343
- docker-image-name: pytorch-linux-focal-rocm-n-1-py3
4444
- docker-image-name: pytorch-linux-focal-rocm-n-py3
45-
- docker-image-name: pytorch-linux-jammy-cuda11.7-cudnn8-py3.8-clang12
4645
- docker-image-name: pytorch-linux-jammy-cuda11.8-cudnn8-py3.8-clang12
4746
- docker-image-name: pytorch-linux-focal-py3-clang7-android-ndk-r19c
4847
- docker-image-name: pytorch-linux-focal-py3.8-gcc7

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,31 @@ jobs:
236236
python3 -m unittest discover -vs tools/test -p 'test_*.py'
237237
python3 -m unittest discover -vs .github/scripts -p 'test_*.py'
238238
239+
test_run_test:
240+
name: Test `run_test.py` is usable without boto3/rockset
241+
if: ${{ github.repository == 'pytorch/pytorch' }}
242+
runs-on: linux.20_04.4x
243+
steps:
244+
- name: Checkout PyTorch
245+
uses: pytorch/pytorch/.github/actions/checkout-pytorch@main
246+
with:
247+
submodules: false
248+
fetch-depth: 1
249+
- name: Setup Python 3.8
250+
uses: actions/setup-python@v4
251+
with:
252+
python-version: '3.8'
253+
architecture: x64
254+
cache: pip
255+
- name: Install dependencies
256+
run: |
257+
pip install pytest-rerunfailures==11.1.* pytest-shard==0.1.* pytest-flakefinder==1.1.* pytest-xdist==3.3.* expecttest==0.1.* numpy==1.24.*
258+
pip install torch --pre --index-url https://download.pytorch.org/whl/nightly/cpu/
259+
- name: Run run_test.py (nonretryable)
260+
run: |
261+
# Run test_weak, which is very fast
262+
python3 test/run_test.py --include test_weak --verbose
263+
239264
test_collect_env:
240265
if: ${{ github.repository == 'pytorch/pytorch' }}
241266
name: Test collect_env

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,6 @@
154154
[submodule "third_party/cutlass"]
155155
path = third_party/cutlass
156156
url = https://github.com/NVIDIA/cutlass.git
157+
[submodule "third_party/mimalloc"]
158+
path = third_party/mimalloc
159+
url = https://github.com/microsoft/mimalloc.git

CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@ cmake_dependent_option(
348348
cmake_dependent_option(
349349
BUILD_FUNCTORCH "Build Functorch" ON "BUILD_PYTHON" OFF)
350350

351+
option(USE_MIMALLOC "Use mimalloc" OFF)
352+
# Enable third party mimalloc library to improve memory allocation performance on Windows.
353+
if(WIN32)
354+
set(USE_MIMALLOC ON)
355+
endif()
351356

352357
if(USE_CCACHE)
353358
find_program(CCACHE_PROGRAM ccache)
@@ -817,6 +822,8 @@ if(NOT MSVC)
817822
append_cxx_flag_if_supported("-Wno-strict-aliasing" CMAKE_CXX_FLAGS)
818823
append_cxx_flag_if_supported("-Wvla-extension" CMAKE_CXX_FLAGS)
819824
append_cxx_flag_if_supported("-Wnewline-eof" CMAKE_CXX_FLAGS)
825+
append_cxx_flag_if_supported("-Winconsistent-missing-override" CMAKE_CXX_FLAGS)
826+
append_cxx_flag_if_supported("-Winconsistent-missing-destructor-override" CMAKE_CXX_FLAGS)
820827
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
821828
string(APPEND CMAKE_CXX_FLAGS " -Wno-range-loop-analysis")
822829
string(APPEND CMAKE_CXX_FLAGS " -Wno-pass-failed")
@@ -861,6 +868,8 @@ if(NOT MSVC)
861868

862869
append_cxx_flag_if_supported("-Wno-error=pedantic" CMAKE_CXX_FLAGS)
863870
append_cxx_flag_if_supported("-Wno-error=old-style-cast" CMAKE_CXX_FLAGS)
871+
append_cxx_flag_if_supported("-Wno-error=inconsistent-missing-override" CMAKE_CXX_FLAGS)
872+
append_cxx_flag_if_supported("-Wno-error=inconsistent-missing-destructor-override" CMAKE_CXX_FLAGS)
864873
append_cxx_flag_if_supported("-Wconstant-conversion" CMAKE_CXX_FLAGS)
865874
append_cxx_flag_if_supported("-Wno-invalid-partial-specialization" CMAKE_CXX_FLAGS)
866875
append_cxx_flag_if_supported("-Wno-unused-private-field" CMAKE_CXX_FLAGS)
@@ -1021,6 +1030,12 @@ include_directories(BEFORE ${PROJECT_BINARY_DIR})
10211030
include_directories(BEFORE ${PROJECT_SOURCE_DIR}/aten/src/)
10221031
include_directories(BEFORE ${PROJECT_BINARY_DIR}/aten/src/)
10231032

1033+
if(USE_MIMALLOC)
1034+
add_definitions(-DUSE_MIMALLOC)
1035+
add_subdirectory(third_party/mimalloc)
1036+
include_directories(third_party/mimalloc/include)
1037+
endif()
1038+
10241039
# ---[ Main build
10251040
add_subdirectory(c10)
10261041
add_subdirectory(caffe2)

0 commit comments

Comments
 (0)