mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
[vmap] Prepend "legacy" to files for old vmap implementation (#90324)
We have an older torch.vmap implementation. It is no longer supported. It still needs to exist somewhere for the sake of BC with torch.autograd.functional. This PR makes it clear what files are meant for implementing the old vmap implementation. I've seen a couple of PRs recently adding support for the old vmap implementation, so this will lessen the confusion. Test Plan: - CI Pull Request resolved: https://github.com/pytorch/pytorch/pull/90324 Approved by: https://github.com/samdow
This commit is contained in:
parent
94d800ffd1
commit
4b1053497c
|
|
@ -237,7 +237,7 @@ test_dynamo_shard() {
|
||||||
test_python_dispatch \
|
test_python_dispatch \
|
||||||
test_fx \
|
test_fx \
|
||||||
test_package \
|
test_package \
|
||||||
test_vmap \
|
test_legacy_vmap \
|
||||||
--shard "$1" "$NUM_TEST_SHARDS" \
|
--shard "$1" "$NUM_TEST_SHARDS" \
|
||||||
--verbose
|
--verbose
|
||||||
assert_git_not_dirty
|
assert_git_not_dirty
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <ATen/Context.h>
|
#include <ATen/Context.h>
|
||||||
#include <ATen/BatchedFallback.h>
|
#include <ATen/LegacyBatchedFallback.h>
|
||||||
#include <ATen/MatrixRef.h>
|
#include <ATen/MatrixRef.h>
|
||||||
#include <ATen/VmapTransforms.h>
|
#include <ATen/LegacyVmapTransforms.h>
|
||||||
#include <ATen/core/dispatch/Dispatcher.h>
|
#include <ATen/core/dispatch/Dispatcher.h>
|
||||||
#include <c10/util/accumulate.h>
|
#include <c10/util/accumulate.h>
|
||||||
#include <c10/util/llvmMathExtras.h>
|
#include <c10/util/llvmMathExtras.h>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <ATen/BatchedTensorImpl.h>
|
#include <ATen/LegacyBatchedTensorImpl.h>
|
||||||
|
|
||||||
#include <ATen/WrapDimUtils.h>
|
#include <ATen/WrapDimUtils.h>
|
||||||
#include <c10/util/Exception.h>
|
#include <c10/util/Exception.h>
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <torch/library.h>
|
#include <torch/library.h>
|
||||||
#include <ATen/RedispatchFunctions.h>
|
#include <ATen/RedispatchFunctions.h>
|
||||||
#include <ATen/VmapTransforms.h>
|
#include <ATen/LegacyVmapTransforms.h>
|
||||||
#include <ATen/BatchedFallback.h>
|
#include <ATen/LegacyBatchedFallback.h>
|
||||||
#include <ATen/native/ResizeCommon.h>
|
#include <ATen/native/ResizeCommon.h>
|
||||||
#include <ATen/ATen.h>
|
#include <ATen/ATen.h>
|
||||||
#include <ATen/core/IListRef.h>
|
#include <ATen/core/IListRef.h>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <ATen/VmapMode.h>
|
#include <ATen/LegacyVmapMode.h>
|
||||||
|
|
||||||
namespace at {
|
namespace at {
|
||||||
namespace impl {
|
namespace impl {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <ATen/VmapTransforms.h>
|
#include <ATen/LegacyVmapTransforms.h>
|
||||||
#include <ATen/ATen.h>
|
#include <ATen/ATen.h>
|
||||||
#include <ATen/core/IListRef.h>
|
#include <ATen/core/IListRef.h>
|
||||||
#include <c10/util/irange.h>
|
#include <c10/util/irange.h>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <ATen/BatchedTensorImpl.h>
|
#include <ATen/LegacyBatchedTensorImpl.h>
|
||||||
#include <ATen/core/IListRef.h>
|
#include <ATen/core/IListRef.h>
|
||||||
|
|
||||||
namespace at {
|
namespace at {
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <ATen/core/Tensor.h>
|
#include <ATen/core/Tensor.h>
|
||||||
#include <ATen/BatchedTensorImpl.h>
|
#include <ATen/LegacyBatchedTensorImpl.h>
|
||||||
#include <ATen/WrapDimUtils.h>
|
#include <ATen/WrapDimUtils.h>
|
||||||
#include <ATen/VmapTransforms.h>
|
#include <ATen/LegacyVmapTransforms.h>
|
||||||
|
|
||||||
namespace at { namespace native {
|
namespace at { namespace native {
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ list(APPEND ATen_CPU_TEST_SRCS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/undefined_tensor_test.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/undefined_tensor_test.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/variant_test.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/variant_test.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/verify_api_visibility.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}/weakref_test.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/wrapdim_test.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/wrapdim_test.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/xla_tensor_test.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/xla_tensor_test.cpp
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include <ATen/ATen.h>
|
#include <ATen/ATen.h>
|
||||||
#include <ATen/BatchedTensorImpl.h>
|
#include <ATen/LegacyBatchedTensorImpl.h>
|
||||||
#include <ATen/VmapTransforms.h>
|
#include <ATen/LegacyVmapTransforms.h>
|
||||||
#include <c10/util/irange.h>
|
#include <c10/util/irange.h>
|
||||||
|
|
||||||
using namespace at;
|
using namespace at;
|
||||||
|
|
@ -26,7 +26,7 @@ fi
|
||||||
./Dict_test
|
./Dict_test
|
||||||
./NamedTensor_test
|
./NamedTensor_test
|
||||||
./cpu_generator_test
|
./cpu_generator_test
|
||||||
./vmap_test
|
./legacy_vmap_test
|
||||||
./operators_test
|
./operators_test
|
||||||
if [[ -x ./cudnn_test ]]; then
|
if [[ -x ./cudnn_test ]]; then
|
||||||
./cudnn_test
|
./cudnn_test
|
||||||
|
|
|
||||||
|
|
@ -1028,7 +1028,7 @@ def glob_libtorch_python_sources(gencode_pattern = ":generate-code[{}]"):
|
||||||
|
|
||||||
aten_cpu_source_non_codegen_list = [
|
aten_cpu_source_non_codegen_list = [
|
||||||
"aten/src/ATen/AccumulateType.cpp",
|
"aten/src/ATen/AccumulateType.cpp",
|
||||||
"aten/src/ATen/BatchedTensorImpl.cpp",
|
"aten/src/ATen/LegacyBatchedTensorImpl.cpp",
|
||||||
"aten/src/ATen/CPUGeneratorImpl.cpp",
|
"aten/src/ATen/CPUGeneratorImpl.cpp",
|
||||||
"aten/src/ATen/Context.cpp",
|
"aten/src/ATen/Context.cpp",
|
||||||
"aten/src/ATen/DLConvertor.cpp",
|
"aten/src/ATen/DLConvertor.cpp",
|
||||||
|
|
@ -1062,8 +1062,8 @@ aten_cpu_source_non_codegen_list = [
|
||||||
"aten/src/ATen/FuncTorchTLS.cpp",
|
"aten/src/ATen/FuncTorchTLS.cpp",
|
||||||
"aten/src/ATen/Utils.cpp",
|
"aten/src/ATen/Utils.cpp",
|
||||||
"aten/src/ATen/Version.cpp",
|
"aten/src/ATen/Version.cpp",
|
||||||
"aten/src/ATen/VmapMode.cpp",
|
"aten/src/ATen/LegacyVmapMode.cpp",
|
||||||
"aten/src/ATen/VmapTransforms.cpp",
|
"aten/src/ATen/LegacyVmapTransforms.cpp",
|
||||||
"aten/src/ATen/core/BackendSelectFallbackKernel.cpp",
|
"aten/src/ATen/core/BackendSelectFallbackKernel.cpp",
|
||||||
"aten/src/ATen/core/DeprecatedTypeProperties.cpp",
|
"aten/src/ATen/core/DeprecatedTypeProperties.cpp",
|
||||||
"aten/src/ATen/core/DeprecatedTypePropertiesRegistry.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/AveragePool3d.cpp",
|
||||||
"aten/src/ATen/native/BatchLinearAlgebra.cpp",
|
"aten/src/ATen/native/BatchLinearAlgebra.cpp",
|
||||||
"aten/src/ATen/native/BatchLinearAlgebraKernel.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/BinaryOps.cpp",
|
||||||
"aten/src/ATen/native/Blas.cpp",
|
"aten/src/ATen/native/Blas.cpp",
|
||||||
"aten/src/ATen/native/BlasKernel.cpp",
|
"aten/src/ATen/native/BlasKernel.cpp",
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
#include <ATen/ATen.h>
|
#include <ATen/ATen.h>
|
||||||
#include <ATen/DLConvertor.h>
|
#include <ATen/DLConvertor.h>
|
||||||
#include <ATen/ExpandUtils.h>
|
#include <ATen/ExpandUtils.h>
|
||||||
|
#include <ATen/LegacyVmapMode.h>
|
||||||
#include <ATen/LinalgBackend.h>
|
#include <ATen/LinalgBackend.h>
|
||||||
#include <ATen/Parallel.h>
|
#include <ATen/Parallel.h>
|
||||||
#include <ATen/Utils.h>
|
#include <ATen/Utils.h>
|
||||||
#include <ATen/VmapMode.h>
|
|
||||||
#include <ATen/core/Vitals.h>
|
#include <ATen/core/Vitals.h>
|
||||||
#include <ATen/dlpack.h>
|
#include <ATen/dlpack.h>
|
||||||
#include <ATen/native/ConvUtils.h>
|
#include <ATen/native/ConvUtils.h>
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
|
|
||||||
#include <ATen/ATen.h>
|
#include <ATen/ATen.h>
|
||||||
#include <ATen/AccumulateType.h>
|
#include <ATen/AccumulateType.h>
|
||||||
#include <ATen/BatchedTensorImpl.h>
|
|
||||||
#include <ATen/Dispatch.h>
|
#include <ATen/Dispatch.h>
|
||||||
#include <ATen/ExpandUtils.h>
|
#include <ATen/ExpandUtils.h>
|
||||||
|
#include <ATen/LegacyBatchedTensorImpl.h>
|
||||||
#include <ATen/ScalarOps.h>
|
#include <ATen/ScalarOps.h>
|
||||||
#include <ATen/SparseCsrTensorUtils.h>
|
#include <ATen/SparseCsrTensorUtils.h>
|
||||||
#include <ATen/SparseTensorUtils.h>
|
#include <ATen/SparseTensorUtils.h>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <ATen/BatchedTensorImpl.h>
|
#include <ATen/LegacyBatchedTensorImpl.h>
|
||||||
#include <ATen/TensorOperators.h>
|
#include <ATen/TensorOperators.h>
|
||||||
#include <torch/csrc/Export.h>
|
#include <torch/csrc/Export.h>
|
||||||
#include <torch/csrc/autograd/function.h>
|
#include <torch/csrc/autograd/function.h>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <torch/csrc/autograd/input_buffer.h>
|
#include <torch/csrc/autograd/input_buffer.h>
|
||||||
|
|
||||||
#include <ATen/BatchedTensorImpl.h>
|
#include <ATen/LegacyBatchedTensorImpl.h>
|
||||||
#include <ATen/SparseCsrTensorUtils.h>
|
#include <ATen/SparseCsrTensorUtils.h>
|
||||||
#include <ATen/SparseTensorUtils.h>
|
#include <ATen/SparseTensorUtils.h>
|
||||||
#include <ATen/TensorOperators.h>
|
#include <ATen/TensorOperators.h>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <torch/csrc/autograd/python_engine.h>
|
#include <torch/csrc/autograd/python_engine.h>
|
||||||
|
|
||||||
#include <ATen/BatchedTensorImpl.h>
|
#include <ATen/LegacyBatchedTensorImpl.h>
|
||||||
#include <ATen/VmapMode.h>
|
#include <ATen/LegacyVmapMode.h>
|
||||||
#include <c10/util/irange.h>
|
#include <c10/util/irange.h>
|
||||||
#include <pybind11/pybind11.h>
|
#include <pybind11/pybind11.h>
|
||||||
#include <torch/csrc/DynamicTypes.h>
|
#include <torch/csrc/DynamicTypes.h>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user