-
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
Added sqrt, atanh, atan, round and ceil functions to paddle.tensor.math #15819
Conversation
Hi @Fayad-Alman, Can you please review this PR? Thanks. |
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.
Looks good @KSANTHOSH200! Just a few changes are needed.
# ceil | ||
@handle_frontend_test( | ||
fn_tree="paddle.tensor.math.ceil", | ||
dtype_and_x=helpers.dtype_and_values( | ||
available_dtypes=helpers.get_dtypes("valid"), | ||
), | ||
) |
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.
@KSANTHOSH200 ciel is returning multiple errors, I believe it's related to the available_dtypes, which should be set to ("valid", full=False) instead of just ("valid")
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.
Made the change
# atan | ||
@handle_frontend_test( | ||
fn_tree="paddle.tensor.math.atan", | ||
dtype_and_x=helpers.dtype_and_values( | ||
available_dtypes=helpers.get_dtypes("valid"), | ||
), | ||
) |
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.
@KSANTHOSH200 available_dtypes here should be set to "numeric" instead of "valid"
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.
Made the change.
Hi @Fayad-Alman, Made those changes. Thanks. |
Hi @Fayad-Alman, Can you please review this PR? Thanks. |
# ceil | ||
@handle_frontend_test( | ||
fn_tree="paddle.tensor.math.ceil", | ||
dtype_and_x=helpers.dtype_and_values( | ||
available_dtypes=helpers.get_dtypes("valid", full=False), | ||
), |
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.
@KSANTHOSH200 ciel seems to only take in floats; please replace the available_dtypes with "float" only
# atan | ||
@handle_frontend_test( | ||
fn_tree="paddle.tensor.math.atan", | ||
dtype_and_x=helpers.dtype_and_values( | ||
available_dtypes=helpers.get_dtypes("numeric"), | ||
), | ||
) |
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.
@KSANTHOSH200 atan seems to take in only floats and complex numbers, so please change the available_dtypes to "float"
@KSANTHOSH200 It seems the files have conflicting changes. Please update your branch and add the changes needed. |
# round | ||
@handle_frontend_test( | ||
fn_tree="paddle.tensor.math.round", | ||
dtype_and_x=helpers.dtype_and_values( | ||
available_dtypes=helpers.get_dtypes("valid"), | ||
), | ||
) |
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.
Hi @KSANTHOSH200, almost done with the changes
For the function round, it doesn't take in bool dtypes, so please change available_dtypes to "float" for now
I can examine this further in the future
@KSANTHOSH200 Looks like the round function is the only faulty test. I'll be merging this for now and looking back on this later. Good work! |
Close #15817
Close #15818
Close #15820
Close #15822
Close #15823