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

Function TEST_F

tensorflow/compiler/xla/tests/deallocation_test.cc:49–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47};
48
49TEST_F(DeallocationTest, DeallocateScalar) {
50 XlaBuilder builder(TestName());
51 ConstantR0<float>(&builder, 42.0);
52 auto global_data = ExecuteAndCheckTransfer(&builder, {});
53
54 // A result can be transferred an arbitrary number of times. Add an extra
55 // transfer here so we're not just testing that a second call to Transfer
56 // fails.
57 ASSERT_IS_OK(client_->Transfer(*global_data).status());
58
59 ASSERT_IS_OK(client_->Unregister(*global_data));
60
61 auto transfer_status = client_->Transfer(*global_data);
62 ASSERT_FALSE(transfer_status.ok());
63 ASSERT_THAT(transfer_status.status().error_message(),
64 HasSubstr("was previously deallocated"));
65}
66
67TEST_F(DeallocationTest, DeallocateVector) {
68 XlaBuilder builder(TestName());

Callers

nothing calls this directly

Calls 6

TestNameFunction · 0.85
TransferMethod · 0.80
HasSubstrFunction · 0.50
statusMethod · 0.45
UnregisterMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected