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

【PIR OpTest Fix No.39】 fix test_c_reduce_min_translate #60236

Merged
merged 9 commits into from
Dec 28, 2023

Conversation

xingmingyyj
Copy link
Contributor

PR types

Others

PR changes

Others

Description

添加test_c_reduce_min_translate验证c_reduce_min可以被正常翻译

Copy link

paddle-bot bot commented Dec 21, 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 the contributor External developers label Dec 21, 2023
Comment on lines 26 to 38
def build_model(self):
with paddle.static.scope_guard(self.new_scope):
with paddle.static.program_guard(self.main_program):
x = paddle.ones(shape=(100, 2, 3), dtype='float32')
y = paddle.ones(shape=(100, 2, 3), dtype='float32')
attrs = {'ring_id': 0, 'root_id': 0, 'use_calc_stream': False}
helper = LayerHelper('c_reduce_min')
helper.append_op(
type="c_reduce_min",
inputs={"X": x},
outputs={"Out": y},
attrs=attrs,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

感觉这里还可以优化下,是不是只要这样写下就可以了?

Suggested change
def build_model(self):
with paddle.static.scope_guard(self.new_scope):
with paddle.static.program_guard(self.main_program):
x = paddle.ones(shape=(100, 2, 3), dtype='float32')
y = paddle.ones(shape=(100, 2, 3), dtype='float32')
attrs = {'ring_id': 0, 'root_id': 0, 'use_calc_stream': False}
helper = LayerHelper('c_reduce_min')
helper.append_op(
type="c_reduce_min",
inputs={"X": x},
outputs={"Out": y},
attrs=attrs,
)
self.inputs = {}
self.outputs = {}
self.attrs = {}

Copy link
Contributor

@heavyrain-lzy heavyrain-lzy left a comment

Choose a reason for hiding this comment

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

LGTM for op_compat.yaml

@kangguangli kangguangli merged commit 4551f5f into PaddlePaddle:develop Dec 28, 2023
@xingmingyyj xingmingyyj deleted the fix_c_reduce_min branch December 28, 2023 04:50
@co63oc
Copy link
Contributor

co63oc commented Dec 29, 2023

目录名/translator/ translator
文件名 test_c_reduce_min_translate.py translate
test_op_transcriber.py transcriber
CMakeLists.txt 中 TRANSLATION translation
class TestCReduceMinOpTranscriber transcriber

使用名称不同不一致

@xingmingyyj
Copy link
Contributor Author

xingmingyyj commented Dec 30, 2023

目录名/translator/ translator 文件名 test_c_reduce_min_translate.py translate test_op_transcriber.py transcriber CMakeLists.txt 中 TRANSLATION translation class TestCReduceMinOpTranscriber transcriber

使用名称不同不一致

好的 我提个PR修改以下

Wanglongzhi2001 pushed a commit to Wanglongzhi2001/Paddle that referenced this pull request Jan 7, 2024
…60236)

* add test_c_reduce_min_translate

* fix

* fix

* fix

* fix

* fix

* fix

* fix
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