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

Function NestedTuple

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

Source from the content-addressed store, hash-verified

95}
96
97xla::LiteralProto NestedTuple() {
98 auto array = xla::LiteralUtil::CreateR1<float>({1.0f, 3.0f});
99 auto matrix = xla::LiteralUtil::CreateR2({{4, 5}, {6, 7}});
100 auto tuple = xla::LiteralUtil::MakeTuple({&array, &matrix});
101 auto scalar = xla::LiteralUtil::CreateR0<float>(12.0f);
102 auto nested = xla::LiteralUtil::MakeTuple({&tuple, &scalar});
103 return nested.ToProto();
104}
105
106xla::LiteralProto MakeTuple0() {
107 auto scalar = xla::LiteralUtil::CreateR0<float>(12.0f);

Callers 1

TESTFunction · 0.85

Calls 1

ToProtoMethod · 0.45

Tested by

no test coverage detected