Delegate TensorRtGpuAllocatorHandler
- Namespace
- JYPPX.TensorRtSharp
- Assembly
- JYPPX.TensorRtSharp.dll
Handles copied GPU allocator metadata and approves or rejects allocation/reallocation requests. 处理复制后的 GPU allocator 元数据,并批准或拒绝分配、重分配请求。
public delegate bool TensorRtGpuAllocatorHandler(TensorRtGpuAllocatorCallbackRequest request)
Parameters
requestTensorRtGpuAllocatorCallbackRequestThe copied pointer-free request. 复制后的无指针请求。
Returns
- bool
trueto permit allocation or reallocation. 返回 true 允许分配或重分配。
Remarks
The return value is observational for release callbacks: native code always attempts to release owner-managed memory. 对释放回调,返回值仅用于观察;native 代码始终尝试释放 owner 管理的显存,避免托管异常造成泄漏。