-
Notifications
You must be signed in to change notification settings - Fork 33
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
Converting scale array in adjoint plan application fails for subarrays #112
Comments
5 tasks
gaurav-arya
added a commit
to gaurav-arya/AbstractFFTs.jl
that referenced
this issue
Jul 19, 2023
stevengj
pushed a commit
that referenced
this issue
Jul 29, 2023
* Add TestUtils submodule/extension * Fix typo * Support Julia 1.0 * Add missing test deps * Add adjoint testing to test utilities * Remove mul! method from inplace test plan (consistent with fftw) * Fix typo * Document test utilities * Apply code review suggestions and refactor TestUtils * Support Julia 1.0 * Reorder kwargs in doc string * Also explicitly test AbstractFFTs.plan_inv * Lift isdefined checks out of __init__ * Update src/definitions.jl Co-authored-by: David Widmann <[email protected]> * Note TestUtils is a weak extension * Update function names in error handler * Add missing test_adjoint's for BRFFT, IRFFT * Collect x_rfft so as to not hit #112 --------- Co-authored-by: David Widmann <[email protected]>
gaurav-arya
changed the title
Converting scale array in adjoint computation fails for subarrays
Converting scale array in adjoint computation fails for some arrays
Aug 8, 2023
This comment was marked as off-topic.
This comment was marked as off-topic.
gaurav-arya
changed the title
Converting scale array in adjoint computation fails for some arrays
Converting scale array in adjoint computation fails for subarrays
Aug 9, 2023
gaurav-arya
changed the title
Converting scale array in adjoint computation fails for subarrays
Converting scale array in adjoint plan application fails for subarrays
Aug 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code
convert(typeof(x), scale)
fails whenx
is a subarray, e.g. in lineAbstractFFTs.jl/src/definitions.jl
Line 641 in 1cc9ca0
It would also fail if
x
is e.g. aZygote.OneElement
, e.g. in the context of the plan reverse rule.Jax's implementation for reference: https://github.com/google/jax/blob/c3aa3a4c312826cdfb0d617e30f0467c18ab4564/jax/_src/lax/fft.py#L211. Not terribly useful here because there they have no problems with generic broadcasting array construction
The text was updated successfully, but these errors were encountered: