mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
reuse setStream c++ interface, add set_raw_stream python api
This commit is contained in:
@@ -48,7 +48,10 @@ void BindOption(pybind11::module& m) {
|
||||
.def_readwrite("poros_option", &RuntimeOption::poros_option)
|
||||
.def_readwrite("paddle_infer_option", &RuntimeOption::paddle_infer_option)
|
||||
.def("set_external_stream", &RuntimeOption::SetExternalStream)
|
||||
.def("set_external_raw_stream", &RuntimeOption::SetExternalRawStream)
|
||||
.def("set_external_raw_stream",
|
||||
[](RuntimeOption& self, size_t external_stream) {
|
||||
self.SetExternalStream(reinterpret_cast<void*>(external_stream));
|
||||
})
|
||||
.def("set_cpu_thread_num", &RuntimeOption::SetCpuThreadNum)
|
||||
.def("use_paddle_backend", &RuntimeOption::UsePaddleBackend)
|
||||
.def("use_poros_backend", &RuntimeOption::UsePorosBackend)
|
||||
|
||||
Reference in New Issue
Block a user