Skip to content

Commit 3af0873

Browse files
authored
Revert "Revert of #3822 "Revert "implementing sym_numel_custom"" (#3826)" (#3835)
This reverts commit ce6b404.
1 parent 2c446ff commit 3af0873

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

torch_xla/csrc/tensor_impl.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,6 @@ c10::SymIntArrayRef XLATensorImpl::sym_sizes_custom() const {
120120
sizes.size());
121121
}
122122

123-
c10::SymInt XLATensorImpl::sym_numel_custom() const {
124-
auto sym_sizes = sym_sizes_custom();
125-
c10::SymInt prod{1};
126-
for (auto s : sym_sizes) {
127-
prod *= s;
128-
}
129-
return prod;
130-
}
131-
132123
c10::SymIntArrayRef XLATensorImpl::sym_sizes() const {
133124
// it isn't strictly necessary to delegate to `sym_sizes_custom`
134125
// however, it's consistent with pytorch core

torch_xla/csrc/tensor_impl.h

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class XLATensorImpl : public c10::TensorImpl {
3535
at::IntArrayRef sizes_custom() const override;
3636
c10::SymIntArrayRef sym_sizes() const override;
3737
c10::SymIntArrayRef sym_sizes_custom() const override;
38-
c10::SymInt sym_numel_custom() const override;
3938
at::IntArrayRef strides_custom() const override;
4039

4140
int64_t dim_custom() const override;

0 commit comments

Comments
 (0)