-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
fix: fixed frontend function torch.mean
for all backends
#28568
fix: fixed frontend function torch.mean
for all backends
#28568
Conversation
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 @ZenithFlux
Thanks for the PR :)
@@ -480,6 +480,7 @@ def test_torch_mean( | |||
backend_fw, | |||
): | |||
input_dtype, x, axis, *_ = dtype_and_x | |||
assume("float" in input_dtype[0] or "complex" in input_dtype[0]) |
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.
why does it need to assume this when the dtypes are already specified to be float_and_complex
?
ideally we shouldn't need filtering etc. any dtypes in test but rather on the functions with un/supporteded_dtype decorators.
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.
Sorry my bad. I've made the corrections.
Fixed data type conversion occuring due to incorrect input_dtype supplied to test_frontend_function. Added `@with_supported_dtypes` to frontend function `torch.mean`.
d72ed38
to
85773ed
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.
Thank @ZenithFlux
failures seem unrelated.
Thank you very much :)
PR Description
@with_supported_dtypes
to frontend functiontorch.mean
.Related Issue
Closes #28563
Closes #28564
Closes #28565
Closes #28566
Checklist