-
Notifications
You must be signed in to change notification settings - Fork 63
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
(AbstractDevice)(x)
should respect Adapt.adapt_structure
#1149
Comments
The issue with |
would you recommend overloading |
the issue with the functor implementation is that adapt_structure is applied to leaf elements of x. so if i want a custom conversion for x.a, that won't be possible if x.a has subfields. the adapt approach is preferable for overloading as the conversion of x.a.b would be handled by the recursive adapt call to x.a. |
Mark |
Thanks, let me try that. |
Thanks Avik, that did work. |
The current implementation of
cpu_device()(x)
does not work ifx
, say, has an abstract FFT plan. Rather, it should calladapt_storage
onx
if that is defined.https://github.com/LuxDL/Lux.jl/blob/main/lib/MLDataDevices/src/public.jl#L366
The text was updated successfully, but these errors were encountered: