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 prim test for some ops #51749

Merged
merged 25 commits into from
Mar 27, 2023

Conversation

Charles-hit
Copy link
Contributor

@Charles-hit Charles-hit commented Mar 16, 2023

PR types

Others

PR changes

Others

Describe

Pcard-66975
add prim op test for tanhcast and dropout ops.

@Charles-hit Charles-hit changed the title add tanh and cast prim test add prim test for some ops Mar 24, 2023
Copy link
Contributor

@cxxly cxxly 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 test_dropout_op.py

Copy link
Contributor

@JiabinYang JiabinYang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 left a comment

Choose a reason for hiding this comment

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

LGTM

elif dtype == np.complex64:
raise ValueError("Not supported dtype %s" % dtype)


Copy link
Contributor

Choose a reason for hiding this comment

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

why delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it can be replaced with paddle.dtype.

@@ -366,6 +452,7 @@ def test_seed_cpu_place(self):
class TestDropoutOpError(unittest.TestCase):
def test_errors(self):
with program_guard(Program(), Program()):
paddle.enable_static()
Copy link
Contributor

Choose a reason for hiding this comment

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

use _static_guard ()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they are equivalent.

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

lgtm

@Charles-hit Charles-hit reopened this Mar 27, 2023
@Charles-hit Charles-hit merged commit e1674e8 into PaddlePaddle:develop Mar 27, 2023
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.

6 participants