mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-25 09:31:38 +08:00
[Backend] TRT backend & PP-Infer backend support pinned memory (#403)
* TRT backend use pinned memory * refine fd tensor pinned memory logic * TRT enable pinned memory configurable * paddle inference support pinned memory * pinned memory pybindings Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
@@ -40,6 +40,10 @@ struct FASTDEPLOY_DECL FDTensor {
|
||||
// so we can skip data transfer, which may improve the efficience
|
||||
Device device = Device::CPU;
|
||||
|
||||
// Whether the data buffer is in pinned memory, which is allocated
|
||||
// with cudaMallocHost()
|
||||
bool is_pinned_memory = false;
|
||||
|
||||
// if the external data is not on CPU, we use this temporary buffer
|
||||
// to transfer data to CPU at some cases we need to visit the
|
||||
// other devices' data
|
||||
|
||||
Reference in New Issue
Block a user