From a7be277d5d33fc670c1641bde1117f01235e4280 Mon Sep 17 00:00:00 2001 From: Nikolay Korovaiko Date: Thu, 4 Aug 2022 15:55:15 -0700 Subject: [PATCH] Revert "Revert of #3822 "Revert "implementing sym_numel_custom"" (#3826)" This reverts commit ce6b404ca44178d89322300b910b1d5864a4a045. --- 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;