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

Function TEST_F

tensorflow/compiler/xla/tests/compute_constant_test.cc:98–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96};
97
98TEST_F(ComputeConstantTest, ScalarInt32Literal) {
99 for (ClientType client_type : client_types) {
100 Client* client = ClientOrDie(platform_, client_type);
101 XlaBuilder b(TestName());
102 auto computation = ConstantR0<int32>(&b, 42);
103 EXPECT_TRUE(IsConstant(computation, &b));
104
105 auto value = ComputeConstantScalar<int32>(client, computation, &b);
106 ASSERT_TRUE(value.ok()) << value.status();
107 EXPECT_EQ(value.ValueOrDie(), 42);
108 }
109}
110
111TEST_F(ComputeConstantTest, ScalarFloatAdd) {
112 for (ClientType client_type : client_types) {

Callers

nothing calls this directly

Calls 14

TestNameFunction · 0.85
RngUniformFunction · 0.85
MakeShapeFunction · 0.85
GetDimensionSizeFunction · 0.85
IsConstantFunction · 0.50
AddClass · 0.50
ParameterFunction · 0.50
StrContainsFunction · 0.50
MulFunction · 0.50
EqualClass · 0.50
DivFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected