Benchmark create and destroy a tensor, with an allocated buffer.
| 1467 | |
| 1468 | // Benchmark create and destroy a tensor, with an allocated buffer. |
| 1469 | void BM_CreateAndDestroyWithBuf(int iters) { |
| 1470 | TensorShape shape({10, 20}); |
| 1471 | Allocator* allocator = cpu_allocator(); |
| 1472 | while (--iters) { |
| 1473 | Tensor a(allocator, DT_FLOAT, shape); |
| 1474 | } |
| 1475 | } |
| 1476 | BENCHMARK(BM_CreateAndDestroyWithBuf); |
| 1477 | |
| 1478 | // Benchmark create+copy a tensor, with an allocated buffer. |
nothing calls this directly
no test coverage detected