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

Function MakeTuple0

tensorflow/compiler/xrt/tests/raw_api_test.cc:106–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106xla::LiteralProto MakeTuple0() {
107 auto scalar = xla::LiteralUtil::CreateR0<float>(12.0f);
108 auto array = xla::LiteralUtil::CreateR1<float>({1.0f, 3.0f});
109 auto matrix = xla::LiteralUtil::CreateR2({{4, 5}, {6, 7}});
110 auto tuple = xla::LiteralUtil::MakeTuple({&array, &matrix});
111 auto nested0 = xla::LiteralUtil::MakeTuple({&scalar, &tuple});
112 auto nested1 = xla::LiteralUtil::MakeTuple({&scalar, &nested0});
113 return nested1.ToProto();
114}
115
116xla::LiteralProto FloatVector(absl::Span<const float> v) {
117 auto array = xla::LiteralUtil::CreateR1<float>(v);

Callers 1

TESTFunction · 0.85

Calls 1

ToProtoMethod · 0.45

Tested by

no test coverage detected