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

Is there a Diffractor-native interface? #287

Closed
gdalle opened this issue Mar 28, 2024 · 2 comments
Closed

Is there a Diffractor-native interface? #287

gdalle opened this issue Mar 28, 2024 · 2 comments

Comments

@gdalle
Copy link
Member

gdalle commented Mar 28, 2024

For operators like gradient and jacobian in DifferentiationInterface.jl, I'm wondering if the best thing to do is just call the relevant AbstractDifferentiation functions? From what I can read in https://github.com/JuliaDiff/Diffractor.jl/blob/main/src/AbstractDifferentiation.jl, it all comes down to the pushforward anyway.

Related:

@oxinabox
Copy link
Member

I would say this is the diffractor naitive interface.

z = ∂☆{1}()(ZeroBundle{1}(f), map(bundle, args, vs)...)
z[TaylorTangentIndex(1)]

Its what I normally work with.
It's not documented as such but it does just come down to that pushforward.

@gdalle
Copy link
Member Author

gdalle commented Mar 28, 2024

Fair enough!
The idea is that when we compare autodiff backends in DifferentiationInterface, we want to have the optimal performance for each.
In Diffractor's case, every one of our operators can be implemented using
https://github.com/gdalle/DifferentiationInterface.jl/blob/07d272af4351bc44344c9ba90705df6c4454a9f8/ext/DifferentiationInterfaceDiffractorExt/DifferentiationInterfaceDiffractorExt.jl#L12-L16
so if there are no faster shortcuts in specific cases, let's keep it that way!

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

No branches or pull requests

2 participants