| 484 | } |
| 485 | |
| 486 | void* reallocateOutput( |
| 487 | char const* tensorName, void* currentMemory, uint64_t size, uint64_t alignment) noexcept override |
| 488 | { |
| 489 | // Some memory allocators return nullptr when allocating zero bytes, but TensorRT requires a non-null ptr |
| 490 | // even for empty tensors, so allocate a dummy byte. |
| 491 | size = std::max(size, static_cast<uint64_t>(1)); |
| 492 | if (size > mSize) |
| 493 | { |
| 494 | mBuffer->allocate(roundUp(size, alignment)); |
| 495 | mSize = size; |
| 496 | } |
| 497 | return mBuffer->getDeviceBuffer(); |
| 498 | } |
| 499 | |
| 500 | void notifyShape(char const* tensorName, nvinfer1::Dims const& dims) noexcept override {} |
| 501 |
nothing calls this directly
no test coverage detected