Skip to content

Commit 276f2b5

Browse files
authored
Fix build (#847)
1 parent f9d80d4 commit 276f2b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/torchcodec/_core/custom_ops.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ at::Tensor wrapDecoderPointerToTensor(
8484
}
8585

8686
SingleStreamDecoder* unwrapTensorToGetDecoder(at::Tensor& tensor) {
87-
TORCH_INTERNAL_ASSERT(tensor.is_contiguous());
87+
TORCH_CHECK(
88+
tensor.is_contiguous(),
89+
"fake decoder tensor must be contiguous! This is an internal error, please report on the torchcodec issue tracker.");
8890
void* buffer = tensor.mutable_data_ptr();
8991
SingleStreamDecoder* decoder = static_cast<SingleStreamDecoder*>(buffer);
9092
return decoder;

0 commit comments

Comments
 (0)