| 117 | } |
| 118 | |
| 119 | FunctionDef XTimesTwo() { |
| 120 | const Tensor kTwo = test::AsScalar<int64>(2); |
| 121 | return FDH::Define( |
| 122 | // Name |
| 123 | "XTimesTwo", |
| 124 | // Args |
| 125 | {"x: T"}, |
| 126 | // Return values |
| 127 | {"y: T"}, |
| 128 | // Attr def |
| 129 | {"T: {float, double, int32, int64}"}, |
| 130 | // Nodes |
| 131 | { |
| 132 | {{"two"}, "Const", {}, {{"value", kTwo}, {"dtype", DT_INT64}}}, |
| 133 | {{"scale"}, "Cast", {"two"}, {{"SrcT", DT_INT64}, {"DstT", "$T"}}}, |
| 134 | {{"y"}, "Mul", {"x", "scale"}, {{"T", "$T"}}}, |
| 135 | }); |
| 136 | } |
| 137 | |
| 138 | FunctionDef TwoDeviceMult() { |
| 139 | const Tensor kTwo = test::AsScalar<int64>(2); |
no outgoing calls
no test coverage detected