MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / SetDefaultLayoutToContainer

Function SetDefaultLayoutToContainer

tensorflow/compiler/xla/layout_util.cc:46–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44// minor_to_major to the value that represents the default layout.
45template <typename T>
46void 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

Callers 2

SetToDefaultLayoutMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected