mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-16 13:41:30 +08:00
[Serving][backend]serving support multi stream and backend support external stream (#431)
* serving support multi stream * pybind add external stream Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
@@ -22,6 +22,9 @@ void PaddleBackend::BuildOption(const PaddleBackendOption& option) {
|
||||
option_ = option;
|
||||
if (option.use_gpu) {
|
||||
config_.EnableUseGpu(option.gpu_mem_init_size, option.gpu_id);
|
||||
if(option_.external_stream_) {
|
||||
config_.SetExecStream(option_.external_stream_);
|
||||
}
|
||||
if (option.enable_trt) {
|
||||
#ifdef ENABLE_TRT_BACKEND
|
||||
auto precision = paddle_infer::PrecisionType::kFloat32;
|
||||
|
@@ -54,6 +54,7 @@ struct PaddleBackendOption {
|
||||
// gpu device id
|
||||
int gpu_id = 0;
|
||||
bool enable_pinned_memory = false;
|
||||
void* external_stream_ = nullptr;
|
||||
|
||||
std::vector<std::string> delete_pass_names = {};
|
||||
};
|
||||
|
Reference in New Issue
Block a user