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

Method CreateFromArrayWithLayout

tensorflow/compiler/xla/literal_util.h:403–410  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

401
402template <typename NativeT>
403/* static */ Literal LiteralUtil::CreateFromArrayWithLayout(
404 const Array<NativeT>& values, const Layout& layout) {
405 Literal literal(ShapeUtil::MakeShapeWithLayout(
406 primitive_util::NativeToPrimitiveType<NativeT>(), values.dimensions(),
407 AsInt64Slice(layout.minor_to_major())));
408 literal.PopulateFromArray(values);
409 return literal;
410}
411
412template <typename NativeT>
413/* static */ Literal LiteralUtil::CreateFromArray(

Callers

nothing calls this directly

Calls 4

minor_to_majorMethod · 0.80
PopulateFromArrayMethod · 0.80
AsInt64SliceFunction · 0.70
dimensionsMethod · 0.45

Tested by

no test coverage detected