| 391 | } |
| 392 | |
| 393 | void Graph::planAllocs() |
| 394 | { |
| 395 | tensorScratchPlanner.commit(); |
| 396 | |
| 397 | // Compute the size of the operation scratch |
| 398 | size_t opScratchByteSize = 0; |
| 399 | for (const auto& op : ops) |
| 400 | opScratchByteSize = max(opScratchByteSize, op->getScratchByteSize()); |
| 401 | opScratchByteSize = round_up(opScratchByteSize, tensorScratchPlanner.getByteAlignment()); |
| 402 | |
| 403 | // Compute the size of the tensor scratch |
| 404 | tensorScratchByteOffset = opScratchByteSize; |
| 405 | size_t tensorScratchByteSize = round_up(tensorScratchPlanner.getByteSize(), memoryAlignment); |
| 406 | |
| 407 | // Compute the total scratch size |
| 408 | scratchByteSize = opScratchByteSize + tensorScratchByteSize; |
| 409 | |
| 410 | dirty = false; |
| 411 | } |
| 412 | |
| 413 | bool Graph::isSupported() const |
| 414 | { |
nothing calls this directly
no test coverage detected