-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
add reduce_all and reduce_any #49765
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
"keep_dim": keep_dim, | ||
"dim": dim, | ||
"reduce_all": reduce_all, |
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.
这里不能去掉,会报错
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.
这里不能去掉,会报错
ci里面有一个验证(op_teller)是 getAttr 说要没有这些的时候,我想过这个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.
现在的覆盖率也是很差,不懂为什么 reduce_any 整个不会进去
cast_layer->setOutputType(0, nvinfer1::DataType::kFLOAT); | ||
cast_layer->getOutput(0)->setType(nvinfer1::DataType::kFLOAT); |
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.
这里用int32是不是更合适,0对应false,1对应true?
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.
确实,我以为只支持float,刚看了下kFLOAT and kHALF kINT32 kINT8 都行
outputs=["reduce_output_data"], | ||
) |
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.
输出为bool类型时,需添加outputs_dtype
设定输出类型。可参考test_trt_convert_compare_and_logical.py
"reduce_prod", | ||
]: | ||
dics1 = [ | ||
for out_dtype in [-1, 0, 2, 5]: |
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.
generate_input1 也需要添加bool支持
使用TRT 8.0+,该PR TRT部分逻辑正确,GPU算子存在问题导致单测无法正常通过。 GPU算子在单独PR修复后该PR可合入。 |
Paddle-TRT 下的reduce_all 和 reduce_any 算子已经添加了。 |
PR types
Others
PR changes
Others
Describe
add reduce_all and reduce_any op
#48292