mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +08:00
[Example] Merge Download Paddle Model, Paddle->ONNX->MLIR->BModel (#1643)
* fix infer.py and README * [Example] Merge Download Paddle Model, Paddle->Onnx->Mlir->Bmodel and inference into infer.py. Modify README.md * modify pp_liteseg sophgo infer.py and README.md * fix PPOCR,PPYOLOE,PICODET,LITESEG sophgo infer.py and README.md * fix memory overflow problem while inferring with sophgo backend * fix memory overflow problem while inferring with sophgo backend --------- Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com> Co-authored-by: xuyizhou <yizhou.xu@sophgo.com>
This commit is contained in:
@@ -225,6 +225,13 @@ bool SophgoBackend::Infer(std::vector<FDTensor>& inputs,
|
||||
free(temp_out);
|
||||
}
|
||||
|
||||
for (int i = 0; i < input_size; i++) {
|
||||
bm_free_device(handle_, input_tensors[i].device_mem);
|
||||
}
|
||||
for (int i = 0; i < output_size; i++) {
|
||||
bm_free_device(handle_, output_tensors[i].device_mem);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user