| 44 | // minor_to_major to the value that represents the default layout. |
| 45 | template <typename T> |
| 46 | void SetDefaultLayoutToContainer(T* minor_to_major) { |
| 47 | // The default XLA layout is major-to-minor (dim 0 is major). |
| 48 | // For more information on XLA layouts, see: |
| 49 | // https://www.tensorflow.org/performance/xla/shapes |
| 50 | const int64 size = minor_to_major->size(); |
| 51 | for (int64 i = 0; i < size; ++i) { |
| 52 | (*minor_to_major)[i] = size - 1 - i; |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | } // namespace |
| 57 |
no test coverage detected