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

Function GetDimensionLengths

tensorflow/compiler/xla/service/hlo_evaluator.cc:941–944  ·  view source on GitHub ↗

Helper to reverse the order of dimension lengths in the passed-in literal.

Source from the content-addressed store, hash-verified

939
940// Helper to reverse the order of dimension lengths in the passed-in literal.
941std::vector<int64> GetDimensionLengths(const Literal& literal) {
942 auto dimensions = literal.shape().dimensions();
943 return std::vector<int64>(dimensions.rbegin(), dimensions.rend());
944}
945
946// Helper to compute strides for creating linear indices into multidimensional
947// data from the dimension lengths and the layout. Returns a new vector of size

Callers 1

HandleFftMethod · 0.85

Calls 4

rbeginMethod · 0.80
rendMethod · 0.80
dimensionsMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected