From dd1c38b6fc3d93b06c5e21147a50d1bb5eaa8cc2 Mon Sep 17 00:00:00 2001 From: Nikolay Korovaiko Date: Wed, 3 Aug 2022 08:26:39 -0700 Subject: [PATCH] Revert "implementing sym_numel_custom" This reverts commit 54471da9047e3ed936ebffdde74a7cbfae09c4df. --- torch_xla/csrc/tensor_impl.cpp | 9 --------- torch_xla/csrc/tensor_impl.h | 1 - 2 files changed, 10 deletions(-) diff --git a/torch_xla/csrc/tensor_impl.cpp b/torch_xla/csrc/tensor_impl.cpp index b968a0569a32..d79b0610c3a6 100644 --- a/torch_xla/csrc/tensor_impl.cpp +++ b/torch_xla/csrc/tensor_impl.cpp @@ -120,15 +120,6 @@ c10::SymIntArrayRef XLATensorImpl::sym_sizes_custom() const { sizes.size()); } -c10::SymInt XLATensorImpl::sym_numel_custom() const { - auto sym_sizes = sym_sizes_custom(); - c10::SymInt prod{1}; - for (auto s : sym_sizes) { - prod *= s; - } - return prod; -} - c10::SymIntArrayRef XLATensorImpl::sym_sizes() const { // it isn't strictly necessary to delegate to `sym_sizes_custom` // however, it's consistent with pytorch core diff --git a/torch_xla/csrc/tensor_impl.h b/torch_xla/csrc/tensor_impl.h index ce8be9389594..d3665431a4d3 100644 --- a/torch_xla/csrc/tensor_impl.h +++ b/torch_xla/csrc/tensor_impl.h @@ -35,7 +35,6 @@ class XLATensorImpl : public c10::TensorImpl { at::IntArrayRef sizes_custom() const override; c10::SymIntArrayRef sym_sizes() const override; c10::SymIntArrayRef sym_sizes_custom() const override; - c10::SymInt sym_numel_custom() const override; at::IntArrayRef strides_custom() const override; int64_t dim_custom() const override;