| 28 | // type T with "num" elements. |
| 29 | template <typename T> |
| 30 | static Graph* Unary(const string& func, int num, DataType dtype) { |
| 31 | Graph* g = new Graph(OpRegistry::Global()); |
| 32 | Tensor data(dtype, TensorShape({64, 64, num / (64 * 64)})); |
| 33 | CHECK_GT(data.NumElements(), 0); |
| 34 | data.flat<T>().setRandom(); |
| 35 | test::graph::Unary(g, func, test::graph::Constant(g, data), 0); |
| 36 | return g; |
| 37 | } |
| 38 | |
| 39 | const int kRows = 100000; |
| 40 |