Skip to content

Revert "Revert of #3822 "Revert "implementing sym_numel_custom"" (#38… #3835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions torch_xla/csrc/tensor_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion torch_xla/csrc/tensor_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down