| 26 | namespace { |
| 27 | |
| 28 | Tensor VecShape(int64 v) { |
| 29 | if (v >= std::numeric_limits<int32>::max()) { |
| 30 | Tensor shape(DT_INT64, TensorShape({1})); |
| 31 | shape.vec<int64>()(0) = v; |
| 32 | return shape; |
| 33 | } else { |
| 34 | Tensor shape(DT_INT32, TensorShape({1})); |
| 35 | shape.vec<int32>()(0) = v; |
| 36 | return shape; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | Graph* RandomUniform(int64 n) { |
| 41 | Graph* g = new Graph(OpRegistry::Global()); |
no test coverage detected