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

Function XTimesY

tensorflow/compiler/jit/xla_kernel_creator_test.cc:40–55  ·  view source on GitHub ↗

Create a FunctionDef that takes one resource and one regular param

Source from the content-addressed store, hash-verified

38
39// Create a FunctionDef that takes one resource and one regular param
40FunctionDef XTimesY() {
41 return FunctionDefHelper::Define(
42 // Name
43 "XTimesY",
44 // Args
45 {"x: float", "y: resource"},
46 // Return values
47 {"z: float"},
48 // Attr def
49 {},
50 // Nodes
51 {
52 {{"y0"}, "ReadVariableOp", {"y"}, {{"dtype", DT_FLOAT}}},
53 {{"z"}, "Mul", {"x", "y0"}, {{"T", DT_FLOAT}}},
54 });
55}
56
57class XlaKernelCreatorTest : public ::testing::Test {
58 protected:

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected