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

support var op convert #81

Merged
merged 10 commits into from
Sep 10, 2022
Merged

support var op convert #81

merged 10 commits into from
Sep 10, 2022

Conversation

Flowingsun007
Copy link
Contributor

No description provided.

@Flowingsun007 Flowingsun007 marked this pull request as ready for review September 10, 2022 13:52
@Flowingsun007 Flowingsun007 mentioned this pull request Sep 10, 2022
@Flowingsun007 Flowingsun007 enabled auto-merge (squash) September 10, 2022 13:53
"Mul", [sub_v, sub_v], op_name_scope=node.name, name="mul", dtypes=dtypes
)
sqr_sub = mul_node.output_tensor_names[0]
if unbiased == 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

这个correction是不是等价于unbiased,这里是否需要correction这个变量?

Copy link
Contributor Author

@Flowingsun007 Flowingsun007 Sep 10, 2022

Choose a reason for hiding this comment

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

是的,unbiased=True等价于correction==1(correction去掉或保留都行

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.

已修改

input_shape = ctx.get_shape(node.input_tensor_names[0])
keepdim_mean = 0 if origin_dim is None else keepdim
correction = 0

Copy link
Contributor

Choose a reason for hiding this comment

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

空行多了,可以refine一下格式,后面有空我在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.

已修改

@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot September 10, 2022 14:29
@Flowingsun007 Flowingsun007 changed the title raw impl support var op convert Sep 10, 2022
return out


def test_math_ops():
Copy link
Contributor

Choose a reason for hiding this comment

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

要么把这个测试放到test_math_ops.py里,要么这里改一下名别叫MathOpxxx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot September 10, 2022 14:46
@Flowingsun007 Flowingsun007 merged commit 1b5a545 into main Sep 10, 2022
@Flowingsun007 Flowingsun007 deleted the dev_support_var_op_convert branch September 10, 2022 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants