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

Function TEST

tensorflow/cc/framework/cc_ops_test.cc:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41TEST(CCOpTest, Basic) {
42 Scope root = Scope::NewRootScope();
43 auto c = Const(root, {{1, 1}});
44 // NOTE: The recommended style for constructing ops is
45 // auto v = OpConstructor(t0, t1, ..);
46 // Since the wrappers are implemented as one class per op, the following
47 // style is also possible :
48 // PrimitiveOp p(t0, t1, ...);
49 // It's being used here ONLY to ensure that, that style is tested.
50 MatMul m(root, c, {{41}, {1}});
51 TF_EXPECT_OK(root.status());
52 Tensor out;
53 test::GetTensor(root, m, &out);
54 test::ExpectTensorEqual<int>(out, test::AsTensor<int>({42}, {1, 1}));
55}
56
57TEST(CCOpTest, Attrs) {
58 Scope root = Scope::NewRootScope();

Callers

nothing calls this directly

Calls 15

GetTensorFunction · 0.85
LinearFunction · 0.85
ExpectCloseFunction · 0.85
GetTensorsFunction · 0.85
AttrValueHasTypeFunction · 0.85
WithOpNameMethod · 0.80
WithKernelLabelMethod · 0.80
ClearColocationMethod · 0.80
GetColocationConstraintsFunction · 0.70
nameMethod · 0.65
ConstFunction · 0.50

Tested by

no test coverage detected