CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Inference]Add hardsigmoid/hardswish/sigmoid/multiclass_nm3/argmax converter #68090
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
你的PR提交成功,感谢你对开源项目的贡献! |
return hardsigmoid_layer.get_output(0) | ||
|
||
|
||
@converter_registry.register("pd_op.hardswish", trt_version="8.x") |
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.
这种比较像的converter,能够注册一个函数,在函数里面去区分?
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.
感觉这个没必要吧,函数里区分那不就又是很多if else了吗,分开自己写自己的代码感觉挺好的,除非说有很多重复代码有必要去消除一下,但目前看还行
@@ -95,7 +102,11 @@ def __is_output_value(value): | |||
graph_output_values.append(result) | |||
for operand in op.operands(): | |||
source = operand.source() | |||
all_values[source.id] = source | |||
if not source.initialized(): | |||
_logger.warning(f"Skipping uninitialized source: {source}") |
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.
什么情况下会有未初始化的value呢?
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.
optional类型的输入会有为初始化的value
plugin = get_trt_plugin( | ||
plugin_name, plugin_field_collection, plugin_version | ||
) | ||
batch_nms_layer = network.add_plugin_v2(batch_nms_inputs, plugin) |
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.
在add_plugin之前,应该需要校验一下这个plugin是否存在?或许应该在marker里查一下?
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.
get_trt_plugin里已经有判断了,没有会直接报错
@@ -15,4 +15,7 @@ if(NOT WIN32 AND TENSORRT_FOUND) | |||
set_tests_properties(test_converter_add PROPERTIES TIMEOUT "100") | |||
set_tests_properties(test_converter_batch_norm PROPERTIES TIMEOUT "100") | |||
set_tests_properties(test_converter_math PROPERTIES TIMEOUT "100") | |||
set_tests_properties(test_converter_ops PROPERTIES TIMEOUT "100") | |||
set_tests_properties(test_converter_activation PROPERTIES TIMEOUT "100") | |||
set_tests_properties(test_converter_others PROPERTIES TIMEOUT "100") |
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.
test_converter_search没加,估计ci过不了
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.
等跑跑看
PR Category
Inference
PR Types
Others
Description
card-71500
本PR工作如下:
1,添加hardsigmoid/hardswish/sigmoid/multiclass_nm3/argmax算子converter
2,解决TensorRT plugin未加载问题
3,完善PIR-TRT单测基础类,支持单独对Marker组件进行测试