-
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 prim test for elementwise ops #50807
Add prim test for elementwise ops #50807
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
… add_prim_test_for_elementwise_op
… add_prim_test_for_elementwise_op
… add_prim_test_for_elementwise_op
… add_prim_test_for_elementwise_op
… add_prim_test_for_elementwise_op
a41fa64
to
0b5097a
Compare
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.
some comments, OpTest suite related problem can be fixed in next pr
|
||
def init_axis(self): | ||
self.axis = 1 | ||
|
||
def init_check_prim(self): |
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.
some comments
@@ -150,6 +199,7 @@ class TestBF16ElementwiseAddOp(OpTest): | |||
def setUp(self): | |||
self.op_type = "elementwise_add" | |||
self.python_api = paddle.add | |||
self.prim_op_type = "prim" |
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.
bad name, is_prim_op? is_composite_op?
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.
it will be modified in next pr.
|
||
def init_axis(self): | ||
self.axis = 0 | ||
|
||
def init_check_prim(self): |
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.
need_check_prim?
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.
done
@@ -33,9 +33,12 @@ class ElementwiseDivOp(OpTest): | |||
def setUp(self): | |||
self.op_type = "elementwise_div" | |||
self.python_api = paddle.divide | |||
self.prim_op_type = "prim" |
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.
same
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.
done
@@ -61,6 +64,9 @@ def setUp(self): | |||
self.grad_x = grad_x | |||
self.grad_y = grad_y | |||
|
|||
def skip_cinn(self): |
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.
enable_cinn
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.
done
@@ -205,7 +271,7 @@ def setUp(self): | |||
self.init_kernel_type() | |||
|
|||
|
|||
class TestElementwiseMulOp_broadcast_2(ElementwiseMulOp): | |||
class TestElementwiseMulOp_broadcast_2(ElementwiseMulOp_broadcast): |
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.
Don't skip this?
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.
done
… add_prim_test_for_elementwise_op
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
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 skip_check_grad_ci
… add_prim_test_for_elementwise_op
829ec4f
PR types
Others
PR changes
Others
Describe
elementwise_add, elementwise_sub, elementwise_mul, elementwise_div
ops.full
static prim api.