Hi! I just took a cursory look at the code and it seems that strides as in https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.strides.html is not very well supported in MXNet, at least in the high level. mshadow seems to have used the idea of strides when transposing and slicing tensors, but still provides no more flexible way of accessing it. The higher level does not care about strides at all, it seems, with things like transposing directly delegated to mshadow, and due to the fact that mshadow does not support dynamic numbers of dimensions (`ndim` is specified as a C++ template parameter), `transpose` in MXNet supports at most 6 dimensions (it could have supported more, of course, but never arbitrarily many in this fashion).
As far as I know, with better strides support it would be more convenient, efficient and flexible to access a continuous block of data. There could be much more useful views for one single block of data. Take the `diag` operator as an example. If we want to take the diagonal w.r.t. a specified set of axes of a given tensor, we can simply create a new view with the strides of these axes merged together. There would be no need for creating new memory space and no need for explicitly forwarding or backwarding. As I am new to MXNet, especially to its huge and complex implementation, there might be a lot of things I have misunderstood. Please comment and help. Thanks! [ Full content available at: https://github.com/apache/incubator-mxnet/issues/12449 ] This message was relayed via gitbox.apache.org for [email protected]
