-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Tensor Format option to DLTensor #35
Comments
Upon further thought, one can simple infer based on the strides if the underlying format is row/column major. Unfortunately, that leaves some ambiguity in the reading of the definition of strides which is allowed to be NULL.
https://github.com/dmlc/dlpack/blob/master/include/dlpack/dlpack.h#L140-L144 It is important to be specific about the definition of a NULL value for strides. I don't have a preference here, but we should explicit state that a NULL value indicates a compact row-major (or column-major) tensor.
|
It is row-major by default, a PR to clarify things is more than welcomed |
As a follow-on to Issue #34, I propose the addition of describing the tensor format for the underlying data in the DLTensor struct.
This option would consume a single byte with one of two possible values: kDLRowMajor or kDLColumnMajor.
The text was updated successfully, but these errors were encountered: