From 03374cd0d9a33ee79062d9adf276a18fb4737bf5 Mon Sep 17 00:00:00 2001 From: Yukio Siraichi Date: Mon, 16 Sep 2024 17:47:38 -0300 Subject: [PATCH] Remove contiguity assertion from `XLATensorImpl`. (#7998) --- torch_xla/csrc/tensor_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torch_xla/csrc/tensor_impl.cpp b/torch_xla/csrc/tensor_impl.cpp index ae3b36e32ca..4e69127ff81 100644 --- a/torch_xla/csrc/tensor_impl.cpp +++ b/torch_xla/csrc/tensor_impl.cpp @@ -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; }