tqchen edited a comment on issue #6583: URL: https://github.com/apache/incubator-tvm/issues/6583#issuecomment-700392860
Right now we encourage the use of compact array in most of the places. The code generator support strided cases by allowing input buffer to have a symbolic strides. However, note that performance will likely take a hit due to the inability to do runtime analysis. If no frequent imperative slicings are needed, actually it is preferable to always use compact arrays which can simplify implementation and enable more optimizations. The CopyFrom/ToBytes for now also explicitly requires the array to be compact. https://github.com/apache/incubator-tvm/pull/6586 explicitly marks the requirement by having the function throw an error for strided case for now. TVM's native NDArray structure also generates compact array for most of the cases. We can consider add support for CopyFrom/To in the strided array case. Notably such operation won't be cheap. We might need a StrideToCompact and StrideFromCompact function from each of the target context. In our case, we might need to generate these ops through compilation. Marking this as a good to have feature and we can discuss possible ways to implement here if they are needed for some usecases. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
