-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
【PIR OpTest Fix No.39】 fix test_c_reduce_min_translate #60236
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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, | ||
) |
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.
感觉这里还可以优化下,是不是只要这样写下就可以了?
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 = {} |
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.
LGTM for op_compat.yaml
目录名/translator/ translator 使用名称不同不一致 |
好的 我提个PR修改以下 |
…60236) * add test_c_reduce_min_translate * fix * fix * fix * fix * fix * fix * fix
PR types
Others
PR changes
Others
Description
添加
test_c_reduce_min_translate
验证c_reduce_min
可以被正常翻译