mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
[Other] Optimize poros backend (#1331)
* Optimize poros backend * Fix pybind error --------- Co-authored-by: root <root@bjyz-sys-gpu-kongming3.bjyz.baidu.com>
This commit is contained in:
@@ -84,11 +84,13 @@ int main(int argc, char* argv[]) {
|
||||
runtime_option.SetModelPath(model_file, "", fd::ModelFormat::TORCHSCRIPT);
|
||||
runtime_option.UsePorosBackend();
|
||||
runtime_option.UseGpu(0);
|
||||
runtime_option.is_dynamic = true;
|
||||
|
||||
// Compile runtime
|
||||
std::unique_ptr<fd::Runtime> runtime =
|
||||
std::unique_ptr<fd::Runtime>(new fd::Runtime());
|
||||
|
||||
runtime->Init(runtime_option);
|
||||
|
||||
if (!runtime->Compile(prewarm_datas, runtime_option)) {
|
||||
std::cerr << "--- Init FastDeploy Runitme Failed! "
|
||||
<< "\n--- Model: " << model_file << std::endl;
|
||||
@@ -114,4 +116,4 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
output_tensors[0].PrintInfo();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user