Creates a binary function with signature (F32, F32) -> Pred defined by (x, y) -> x > y.
| 137 | // Creates a binary function with signature (F32, F32) -> Pred |
| 138 | // defined by (x, y) -> x > y. |
| 139 | XlaComputation CreateGt() { |
| 140 | XlaBuilder b("Gt"); |
| 141 | auto x = Parameter(&b, 0, ShapeUtil::MakeShape(F32, {}), "x"); |
| 142 | auto y = Parameter(&b, 1, ShapeUtil::MakeShape(F32, {}), "y"); |
| 143 | Gt(x, y); |
| 144 | auto computation_status = b.Build(); |
| 145 | TF_CHECK_OK(computation_status.status()); |
| 146 | return computation_status.ConsumeValueOrDie(); |
| 147 | } |
| 148 | |
| 149 | // Creates a function that adds three scalar arguments |
| 150 | // |