PyTorch uses is_contiguous Lucier, Bradley J (22 Jun 2022 02:06 UTC)
Re: PyTorch uses is_contiguous Lucier, Bradley J (22 Jun 2022 02:16 UTC)

Re: PyTorch uses is_contiguous Lucier, Bradley J 22 Jun 2022 02:16 UTC

> On Jun 21, 2022, at 10:06 PM, Lucier, Bradley J <xxxxxx@purdue.edu> wrote:
>
> PyTorch uses is_contiguous for what is called here array-packed?.
>
> https://pytorch.org/docs/stable/generated/torch.Tensor.is_contiguous.html
>
> Although there still seems to be quite some confusion about the notion:
>
> https://discuss.pytorch.org/t/contigious-vs-non-contigious-tensor/30107/10
> https://stackoverflow.com/questions/48915810/pytorch-what-does-contiguous-do
>
> Should we change array-packed? To array-contiguous? ?
>
> Brad

I apologize for bringing this up. The elements of

(array-reverse (make-specialized-array (make-interval ‘#(2 2)))

as you go through them in lexicographical order are stored contiguously, but the indices into the body of the array decrease, and I believe in PyTorch this array would *not* be contiguous.

So I prefer the current semi-meaningless name.

Brad