diff --git a/.jenkins/pytorch/test.sh b/.jenkins/pytorch/test.sh index fb076e13c417..af0c2854b96c 100755 --- a/.jenkins/pytorch/test.sh +++ b/.jenkins/pytorch/test.sh @@ -237,7 +237,7 @@ test_dynamo_shard() { test_python_dispatch \ test_fx \ test_package \ - test_vmap \ + test_legacy_vmap \ --shard "$1" "$NUM_TEST_SHARDS" \ --verbose assert_git_not_dirty diff --git a/aten/src/ATen/BatchedFallback.cpp b/aten/src/ATen/LegacyBatchedFallback.cpp similarity index 99% rename from aten/src/ATen/BatchedFallback.cpp rename to aten/src/ATen/LegacyBatchedFallback.cpp index 7ca516182cc4..72794ece1c5a 100644 --- a/aten/src/ATen/BatchedFallback.cpp +++ b/aten/src/ATen/LegacyBatchedFallback.cpp @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include #include #include #include diff --git a/aten/src/ATen/BatchedFallback.h b/aten/src/ATen/LegacyBatchedFallback.h similarity index 100% rename from aten/src/ATen/BatchedFallback.h rename to aten/src/ATen/LegacyBatchedFallback.h diff --git a/aten/src/ATen/BatchedTensorImpl.cpp b/aten/src/ATen/LegacyBatchedTensorImpl.cpp similarity index 99% rename from aten/src/ATen/BatchedTensorImpl.cpp rename to aten/src/ATen/LegacyBatchedTensorImpl.cpp index fdedfa7c6316..eea6d7859930 100644 --- a/aten/src/ATen/BatchedTensorImpl.cpp +++ b/aten/src/ATen/LegacyBatchedTensorImpl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/aten/src/ATen/BatchedTensorImpl.h b/aten/src/ATen/LegacyBatchedTensorImpl.h similarity index 100% rename from aten/src/ATen/BatchedTensorImpl.h rename to aten/src/ATen/LegacyBatchedTensorImpl.h diff --git a/aten/src/ATen/BatchingRegistrations.cpp b/aten/src/ATen/LegacyBatchingRegistrations.cpp similarity index 99% rename from aten/src/ATen/BatchingRegistrations.cpp rename to aten/src/ATen/LegacyBatchingRegistrations.cpp index 5a01f949745f..c235da67d5a7 100644 --- a/aten/src/ATen/BatchingRegistrations.cpp +++ b/aten/src/ATen/LegacyBatchingRegistrations.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/aten/src/ATen/VmapMode.cpp b/aten/src/ATen/LegacyVmapMode.cpp similarity index 95% rename from aten/src/ATen/VmapMode.cpp rename to aten/src/ATen/LegacyVmapMode.cpp index 4f0a2413f451..f10e1005debc 100644 --- a/aten/src/ATen/VmapMode.cpp +++ b/aten/src/ATen/LegacyVmapMode.cpp @@ -1,4 +1,4 @@ -#include +#include namespace at { namespace impl { diff --git a/aten/src/ATen/VmapMode.h b/aten/src/ATen/LegacyVmapMode.h similarity index 100% rename from aten/src/ATen/VmapMode.h rename to aten/src/ATen/LegacyVmapMode.h diff --git a/aten/src/ATen/VmapTransforms.cpp b/aten/src/ATen/LegacyVmapTransforms.cpp similarity index 99% rename from aten/src/ATen/VmapTransforms.cpp rename to aten/src/ATen/LegacyVmapTransforms.cpp index 71ef7a169026..1457e572812a 100644 --- a/aten/src/ATen/VmapTransforms.cpp +++ b/aten/src/ATen/LegacyVmapTransforms.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/aten/src/ATen/VmapTransforms.h b/aten/src/ATen/LegacyVmapTransforms.h similarity index 99% rename from aten/src/ATen/VmapTransforms.h rename to aten/src/ATen/LegacyVmapTransforms.h index cece52dcbc41..0afb3247ac86 100644 --- a/aten/src/ATen/VmapTransforms.h +++ b/aten/src/ATen/LegacyVmapTransforms.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include namespace at { diff --git a/aten/src/ATen/native/Batching.cpp b/aten/src/ATen/native/LegacyBatching.cpp similarity index 98% rename from aten/src/ATen/native/Batching.cpp rename to aten/src/ATen/native/LegacyBatching.cpp index b50b6201b7a2..6dcacbd1f23f 100644 --- a/aten/src/ATen/native/Batching.cpp +++ b/aten/src/ATen/native/LegacyBatching.cpp @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include namespace at { namespace native { diff --git a/aten/src/ATen/test/CMakeLists.txt b/aten/src/ATen/test/CMakeLists.txt index 5c8fda81b3d9..27b9e3759652 100644 --- a/aten/src/ATen/test/CMakeLists.txt +++ b/aten/src/ATen/test/CMakeLists.txt @@ -45,7 +45,7 @@ list(APPEND ATen_CPU_TEST_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/undefined_tensor_test.cpp ${CMAKE_CURRENT_SOURCE_DIR}/variant_test.cpp ${CMAKE_CURRENT_SOURCE_DIR}/verify_api_visibility.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/vmap_test.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/legacy_vmap_test.cpp ${CMAKE_CURRENT_SOURCE_DIR}/weakref_test.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wrapdim_test.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xla_tensor_test.cpp diff --git a/aten/src/ATen/test/vmap_test.cpp b/aten/src/ATen/test/legacy_vmap_test.cpp similarity index 99% rename from aten/src/ATen/test/vmap_test.cpp rename to aten/src/ATen/test/legacy_vmap_test.cpp index 1feafaa59f3a..5ca827de2d98 100644 --- a/aten/src/ATen/test/vmap_test.cpp +++ b/aten/src/ATen/test/legacy_vmap_test.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include #include using namespace at; diff --git a/aten/tools/run_tests.sh b/aten/tools/run_tests.sh index 5b0c02c2846a..3ae0da113bca 100755 --- a/aten/tools/run_tests.sh +++ b/aten/tools/run_tests.sh @@ -26,7 +26,7 @@ fi ./Dict_test ./NamedTensor_test ./cpu_generator_test -./vmap_test +./legacy_vmap_test ./operators_test if [[ -x ./cudnn_test ]]; then ./cudnn_test diff --git a/build_variables.bzl b/build_variables.bzl index 2faeed6e52d9..63010082137e 100644 --- a/build_variables.bzl +++ b/build_variables.bzl @@ -1028,7 +1028,7 @@ def glob_libtorch_python_sources(gencode_pattern = ":generate-code[{}]"): aten_cpu_source_non_codegen_list = [ "aten/src/ATen/AccumulateType.cpp", - "aten/src/ATen/BatchedTensorImpl.cpp", + "aten/src/ATen/LegacyBatchedTensorImpl.cpp", "aten/src/ATen/CPUGeneratorImpl.cpp", "aten/src/ATen/Context.cpp", "aten/src/ATen/DLConvertor.cpp", @@ -1062,8 +1062,8 @@ aten_cpu_source_non_codegen_list = [ "aten/src/ATen/FuncTorchTLS.cpp", "aten/src/ATen/Utils.cpp", "aten/src/ATen/Version.cpp", - "aten/src/ATen/VmapMode.cpp", - "aten/src/ATen/VmapTransforms.cpp", + "aten/src/ATen/LegacyVmapMode.cpp", + "aten/src/ATen/LegacyVmapTransforms.cpp", "aten/src/ATen/core/BackendSelectFallbackKernel.cpp", "aten/src/ATen/core/DeprecatedTypeProperties.cpp", "aten/src/ATen/core/DeprecatedTypePropertiesRegistry.cpp", @@ -1292,7 +1292,7 @@ aten_native_source_non_codegen_list = [ "aten/src/ATen/native/AveragePool3d.cpp", "aten/src/ATen/native/BatchLinearAlgebra.cpp", "aten/src/ATen/native/BatchLinearAlgebraKernel.cpp", - "aten/src/ATen/native/Batching.cpp", + "aten/src/ATen/native/LegacyBatching.cpp", "aten/src/ATen/native/BinaryOps.cpp", "aten/src/ATen/native/Blas.cpp", "aten/src/ATen/native/BlasKernel.cpp", diff --git a/test/test_vmap.py b/test/test_legacy_vmap.py similarity index 100% rename from test/test_vmap.py rename to test/test_legacy_vmap.py diff --git a/torch/csrc/Module.cpp b/torch/csrc/Module.cpp index 607373625724..33a5d6f1f444 100644 --- a/torch/csrc/Module.cpp +++ b/torch/csrc/Module.cpp @@ -9,10 +9,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/torch/csrc/autograd/FunctionsManual.cpp b/torch/csrc/autograd/FunctionsManual.cpp index d1c59302b392..fa4b4fde96c1 100644 --- a/torch/csrc/autograd/FunctionsManual.cpp +++ b/torch/csrc/autograd/FunctionsManual.cpp @@ -5,9 +5,9 @@ #include #include -#include #include #include +#include #include #include #include diff --git a/torch/csrc/autograd/functions/accumulate_grad.h b/torch/csrc/autograd/functions/accumulate_grad.h index 5a9a0b914a87..9089d541f96b 100644 --- a/torch/csrc/autograd/functions/accumulate_grad.h +++ b/torch/csrc/autograd/functions/accumulate_grad.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/torch/csrc/autograd/input_buffer.cpp b/torch/csrc/autograd/input_buffer.cpp index 6cc6acefc9d4..50d4c0ce0aa6 100644 --- a/torch/csrc/autograd/input_buffer.cpp +++ b/torch/csrc/autograd/input_buffer.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include #include diff --git a/torch/csrc/autograd/python_engine.cpp b/torch/csrc/autograd/python_engine.cpp index 3bd12f480d40..dc365c170008 100644 --- a/torch/csrc/autograd/python_engine.cpp +++ b/torch/csrc/autograd/python_engine.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include #include #include