| 61 | } |
| 62 | |
| 63 | XlaComputation CreateMax() { |
| 64 | XlaBuilder b(TestName()); |
| 65 | auto lhs = Parameter(&b, 0, ShapeUtil::MakeShape(F32, {}), "x"); |
| 66 | auto rhs = Parameter(&b, 1, ShapeUtil::MakeShape(F32, {}), "y"); |
| 67 | Max(lhs, rhs); |
| 68 | auto computation_status = b.Build(); |
| 69 | TF_CHECK_OK(computation_status.status()); |
| 70 | return computation_status.ConsumeValueOrDie(); |
| 71 | } |
| 72 | |
| 73 | // Creates a computation that accepts an F32 and returns T(1) (ignoring the |
| 74 | // argument). |