-
Notifications
You must be signed in to change notification settings - Fork 674
Polish cmake files and runtime apis #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
| assert index < self.num_inputs(), "The input parameter index:{} should less than number of inputs:{}.".format(index, self.num_inputs) | ||
| assert isinstance( | ||
| index, int), "The input parameter index should be type of int." | ||
| assert index < self.num_inputs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码命名直接由fastdeploy_runtime.py 改为runtime.py
| .def("num_outputs", &Runtime::NumOutputs) | ||
| .def("get_input_info", &Runtime::GetInputInfo) | ||
| .def("get_output_info", &Runtime::GetOutputInfo) | ||
| .def_readonly("option", &Runtime::option); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
变量的绑定需要移除
fastdeploy/utils/utils.cc
Outdated
|
|
||
| bool DISABLE_WARNING = false; | ||
| bool DISABLE_INFO = false; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两行代码还没用到,需要删除
fastdeploy/utils/utils.h
Outdated
| namespace fastdeploy { | ||
|
|
||
| extern bool DISABLE_WARNING; | ||
| extern bool DISABLE_INFO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
| CMAKE_MINIMUM_REQUIRED (VERSION 3.16) | ||
|
|
||
| # 在低版本ABI环境中,通过如下代码进行兼容性编译 | ||
| # add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ABI的注释需移除,改为提示用户编译器版本信息
| auto option = fastdeploy::RuntimeOption(); | ||
| option.device = fastdeploy::Device::CPU; | ||
| option.backend = fastdeploy::Backend::PDINFER; | ||
| option.backend = fastdeploy::Backend::TRT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处需删除
| option.UseTrtBackend(); | ||
| option.SetTrtInputShape("images", {1, 3, 320, 320}, {1, 3, 640, 640}, | ||
| {1, 3, 1280, 1280}); | ||
| auto model = vis::ultralytics::YOLOv5("yolov5s.onnx", "", option); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处需删除
| option.backend = fastdeploy::Backend::TRT; | ||
| option.trt_fixed_shape["images"] = {1, 3, 640, 640}; | ||
| auto model = vis::megvii::YOLOX("yolox_s.onnx", "", option); | ||
| if (!model.Initialized()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处需删除
model_zoo/vision/yolox/yolox.py
Outdated
| model = fd.vision.megvii.YOLOX("yolox_s.onnx") | ||
| option = fd.RuntimeOption() | ||
| option.use_trt_backend() | ||
| model = fd.vision.megvii.YOLOX("yolox_s.onnx", runtime_option=option) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处需删除
Uh oh!
There was an error while loading. Please reload this page.