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

Function XLA_TEST_F

tensorflow/compiler/xla/tests/transfer_manager_test.cc:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69};
70
71XLA_TEST_F(TransferManagerTest, TransferR0U32) {
72 Literal literal = LiteralUtil::CreateR0<uint32>(42);
73 const Shape& shape = literal.shape();
74 auto device_buffer = AllocateDeviceBuffer(shape);
75
76 // Round trip literal through device.
77 ASSERT_IS_OK(transfer_manager_->TransferLiteralToDevice(stream_, literal,
78 device_buffer));
79 TF_ASSERT_OK_AND_ASSIGN(
80 Literal result,
81 transfer_manager_->TransferLiteralFromDevice(stream_, device_buffer));
82
83 LiteralTestUtil::ExpectR0Equal<uint32>(42, result);
84}
85
86XLA_TEST_F(TransferManagerTest, TransferR1F32) {
87 Literal literal =

Callers

nothing calls this directly

Calls 11

MakeShapeFunction · 0.85
CreateTokenFunction · 0.85
GetR1U8AsStringMethod · 0.80
GetOrCreateSubStreamMethod · 0.80
MakeLayoutFunction · 0.50
EqualClass · 0.50
shapeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected