Skip to content

Commit 5be717a

Browse files
committed
Add assert check because reorder has not supported alias tensor yet.
1 parent 1206fe2 commit 5be717a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

torch_ipex/csrc/aten_ipex_bridge.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,11 @@ void reorderTensorToScalaraType(const at::Tensor& ipexTensor, at::ScalarType dst
530530
if (tensor_dtype == dstScalarType)
531531
return;
532532

533-
if (!check_tensor_own_whole_storage(ipexTensor))
533+
if (!check_tensor_own_whole_storage(ipexTensor)) {
534534
return;
535+
} else {
536+
TORCH_INTERNAL_ASSERT(false);
537+
}
535538

536539
if (check_tensor_own_shade_context(ipexTensor)) {
537540
// Shade data context has been attached

0 commit comments

Comments
 (0)