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

Method CreateR2WithLayout

tensorflow/compiler/xla/literal_util.h:313–323  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

311
312template <typename NativeT>
313/* static */ Literal LiteralUtil::CreateR2WithLayout(
314 std::initializer_list<std::initializer_list<NativeT>> values,
315 const Layout& layout) {
316 Literal literal(ShapeUtil::MakeShapeWithLayout(
317 primitive_util::NativeToPrimitiveType<NativeT>(),
318 {static_cast<int64>(values.size()),
319 static_cast<int64>(values.begin()->size())},
320 AsInt64Slice(layout.minor_to_major())));
321 literal.PopulateR2(values);
322 return literal;
323}
324
325template <typename NativeT>
326/* static */ Literal LiteralUtil::CreateR2(

Callers

nothing calls this directly

Calls 5

minor_to_majorMethod · 0.80
PopulateR2Method · 0.80
AsInt64SliceFunction · 0.70
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected