> > > > > > > Should we rule that `dim_names` and `permutation` are mutually > exclusive? > > > > > > > Since `dim_names` have to "map to the physical layout (row-major)" that > > means permutation will always be trivial which indeed makes it > unnecessary > > to store both. > > I don't think it is necessarily needed to explicitly make them > mutually exclusive. I don't know how useful this would in practice, > but you certainly *can* specify both in a meaningful way. Re-using the > example of NHWC data, which is physically stored as NCHW, you can keep > track of this by specifying a permutation of [2, 0, 1], but at the > same time you could also still save the dimension names as ["C", "H", > "W"]. >
I'll advocate for the original comment, but I'm ok either way. Having both `dim_names` and `permutation` is redundant - if the user knows their desired order of `dim_names` they can derive the permutation. If they don't use `dim_names` they probably don't want them.