Skip to content
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

Closed
wants to merge 13 commits into from
Closed

Conversation

sanbuphy
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

add reduce_all and reduce_any op
#48292

@paddle-bot
Copy link

paddle-bot bot commented Jan 12, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Jan 12, 2023
Comment on lines -88 to -90
"keep_dim": keep_dim,
"dim": dim,
"reduce_all": reduce_all,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不能去掉,会报错

Copy link
Contributor Author

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,不知道那个是怎么回事。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在的覆盖率也是很差,不懂为什么 reduce_any 整个不会进去

Comment on lines 150 to 151
cast_layer->setOutputType(0, nvinfer1::DataType::kFLOAT);
cast_layer->getOutput(0)->setType(nvinfer1::DataType::kFLOAT);
Copy link
Contributor

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?

Copy link
Contributor Author

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 都行

Comment on lines +117 to +118
outputs=["reduce_output_data"],
)
Copy link
Contributor

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]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generate_input1 也需要添加bool支持

@zhangjun
Copy link
Contributor

zhangjun commented Feb 7, 2023

使用TRT 8.0+,该PR TRT部分逻辑正确,GPU算子存在问题导致单测无法正常通过。 GPU算子在单独PR修复后该PR可合入。

@luotao1
Copy link
Contributor

luotao1 commented Sep 18, 2023

Paddle-TRT 下的reduce_all 和 reduce_any 算子已经添加了。

@luotao1 luotao1 closed this Sep 18, 2023
@sanbuphy sanbuphy deleted the reduce branch December 28, 2023 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants