Skip to content

Commit

Permalink
Remove contiguity assertion from XLATensorImpl. (#7998)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysiraichi committed Sep 16, 2024
1 parent 3b0097d commit 03374cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_xla/csrc/tensor_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ int64_t XLATensorImpl::numel_custom() const {
}

bool XLATensorImpl::is_contiguous_custom(at::MemoryFormat memory_format) const {
// Only check that the storage is already contiguous.
XLA_CHECK(is_contiguous_) << "Non-contiguous storage for XLA tensor";
// Storage is always contiguous, but the tensor metadata is_contiguous_ might
// be false due to the update in the functionalization layer..
return true;
}

Expand Down

0 comments on commit 03374cd

Please sign in to comment.