8000 Update on "[caffe2] Export operators to c10 without including ATen/Te… · pytorch/pytorch@054705a · GitHub
[go: up one dir, main page]

Skip to content

Commit 054705a

Browse files
committed
Update on "[caffe2] Export operators to c10 without including ATen/Tensor.h"
With this change, the only caffe2 files that depend on `ATen/Tensor.h` are ones that directly use the ATen API. Specifically, ``` [ "caffe2/CMakeFiles/torch_cuda_cpp.dir/contrib/aten/aten_op_gpu.cc.o", "caffe2/CMakeFiles/torch_cpu.dir/core/tensor.cc.o", "caffe2/CMakeFiles/torch_cuda_cpp.dir/operators/layer_norm_op.cu.o", "caffe2/CMakeFiles/torch_cpu.dir/core/IValueInterface.cc.o", "caffe2/CMakeFiles/cuda_tensor_interop_test.dir/__/aten/src/ATen/test/cuda_tensor_interop_test.cpp.o", "caffe2/CMakeFiles/torch_cpu.dir/contrib/aten/aten_op.cc.o", "caffe2/CMakeFiles/caffe2_pybind11_state_gpu.dir/python/pybind_state.cc.o", "caffe2/CMakeFiles/torch_cpu.dir/operators/layer_norm_op.cc.o", "caffe2/CMakeFiles/torch_cpu.dir/core/export_c10_op_to_caffe2.cc.o", "caffe2/CMakeFiles/torch_cpu.dir/core/export_caffe2_op_to_c10.cc.o", "caffe2/CMakeFiles/torch_cpu.dir/operators/enforce_finite_op.cc.o", "caffe2/CMakeFiles/torch_cpu.dir/core/operator.cc.o", "caffe2/CMakeFiles/tensor_interop_test.dir/__/aten/src/ATen/test/tensor_interop_test.cpp.o", "caffe2/CMakeFiles/caffe2_pybind11_state.dir/python/pybind_state.cc.o" ] ``` Differential Revision: [D32289810](https://our.internmc.facebook.com/intern/diff/D32289810) [ghstack-poisoned]
2 parents 7a474c1 + 87ed782 commit 054705a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

caffe2/core/export_caffe2_op_to_c10.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ struct TORCH_API RegisterDefinition {
5454
RegisterDefinition(const char *name, c10::BoxedKernel kernel);
5555
};
5656

57-
extern template class RegisterDefinition<c10::DispatchKey::CPU>;
58-
extern template class RegisterDefinition<c10::DispatchKey::CUDA>;
59-
extern template class RegisterDefinition<c10::DispatchKey::HIP>;
57+
extern template struct RegisterDefinition<c10::DispatchKey::CPU>;
58+
extern template struct RegisterDefinition<c10::DispatchKey::CUDA>;
59+
extern template struct RegisterDefinition<c10::DispatchKey::HIP>;
6060

6161
struct TORCH_API RegisterSchema {
6262
RegisterSchema(const char *schema_str);

0 commit comments

Comments
 (0)
0