-
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
feat: implement inverse fast fourier transform (irfftn) function for paddle frontend #23526
feat: implement inverse fast fourier transform (irfftn) function for paddle frontend #23526
Conversation
update irfftn function by using ifftn
update the irfftn for n -dim test
update irfftn for n - dim
correct irffftn
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.
PR Compliance Checks Passed!
@tomatillos please reply me at this PR, i think the old PR is going to be closed. |
…transform-(irfftn)-function-for-paddle-frontend
Also fix the lint and PR compliance checks please. |
@xingshuodong this is a great PR ⚡ |
As well as |
change the test case to axis, and the norm to backward or forward or...
@tomatillos Hi Tom, i cant pass the lint check becasue the file itself can't pass the lint check specific to rfftfreq, |
@mobley-trent Hi Eddy, during learning of development, as there is a general rule for manuplate the shape of x tensor, none is a better choice The valid reason that here should set to be none, is the setup method for frontend test is only supporting the axis but not axes, the frontend is expecting the single axis as test input rather than the axes, this is out scope with the specific use of s. Take example of input a tensor x which is 3 dim with 2 dim size, (2, 2, 2) irfftn(my_tensor, s=(2, 2, 2), axes=(0, 1, 2)) irfftn(my_tensor, s=(3, 3, 3), axes=(0, 1, 2)) Specific Axes: If you want to transform along specific axes but not others, specify the axes and shape accordingly. irfftn(my_tensor, s=(3, 3), axes=(0, 1)) |
Fix the irfftn with mutiple dims case, specific the axe is none, apply all axes
test case for apply all axes to irfftn
…transform-(irfftn)-function-for-paddle-frontend
@mobley-trent Hi Eddy I have carefully review the irfftn explnation, and rewrite the function.
Now this is a true irfftn function for any dims any size, it enable:
|
…transform-(irfftn)-function-for-paddle-frontend
Hey @xingshuodong your function should at least pass for the minimal example I provided earlier from the paddle docs |
it does pass, you can check the picture, what i mean is the test method fixed doesn't mean it works in limited case, it depends on how the backend developed in other backend, just like in tensorflow there is no nature irfftn function, so it is better to have irfftn special for tensorflow itself, or just rasie the error. Please check this picture, it works for most cases, not only limit one. @mobley-trent , this function is work well for numpy and paddle, for those who dont have ifftn support N-D, it will only work for 3-D. |
Please pay attention to check, it is tested. @tomatillos, it should meet the irfftn performance for paddle, becasue it can work in paddle. |
Only the paddle backend seems to be running in this case. We can just merge for now |
The case here is this irfftn is working correctly in numpy backend and paddle backend. |
Reference PR: ivy-llc#23526
PR Description
feat: implement inverse fast Fourier transform (irfftn) function for paddle frontend
Add paddle.fft Fast Fourier Transform Functions to Paddle Frontend #15047
This pull request is related to resolves [irfftn #22913].
Close irfftn #22913
Checklist
Socials:
xingshu@deakin.edu.au
ins: xingshuodong