mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +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:
@@ -70,6 +70,7 @@ struct TrtBackendOption {
|
||||
std::map<std::string, std::vector<int32_t>> min_shape;
|
||||
std::map<std::string, std::vector<int32_t>> opt_shape;
|
||||
std::string serialize_file = "";
|
||||
bool enable_pinned_memory = false;
|
||||
|
||||
// inside parameter, maybe remove next version
|
||||
bool remove_multiclass_nms_ = false;
|
||||
@@ -118,8 +119,8 @@ class TrtBackend : public BaseBackend {
|
||||
std::vector<void*> bindings_;
|
||||
std::vector<TrtValueInfo> inputs_desc_;
|
||||
std::vector<TrtValueInfo> outputs_desc_;
|
||||
std::map<std::string, FDDeviceBuffer> inputs_buffer_;
|
||||
std::map<std::string, FDDeviceBuffer> outputs_buffer_;
|
||||
std::map<std::string, FDDeviceBuffer> inputs_device_buffer_;
|
||||
std::map<std::string, FDDeviceBuffer> outputs_device_buffer_;
|
||||
|
||||
std::string calibration_str_;
|
||||
|
||||
|
Reference in New Issue
Block a user