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

sending to devices tuples, named tuples and arrays does not keep track of identical objects #1017

Closed
CarloLucibello opened this issue Nov 3, 2024 · 4 comments · Fixed by #1069

Comments

@CarloLucibello
Copy link
Contributor

The issue has been reported in
FluxML/Flux.jl#2513
and is due to these specializations
https://github.com/LuxDL/MLDataDevices.jl/blob/17419d27888e3a48b52f318249a0f037524f0f1e/src/public.jl#L341
The simplest solution would be to remove the specializations and let fmap handle everything.

Possible optimized implementations could be upstreamed to Functors.jl, but we really want to keep track of object identity here.

@avik-pal
Copy link
Member

avik-pal commented Nov 3, 2024

Removing those makes hot loops completely type-unstable for common types

@avik-pal avik-pal transferred this issue from LuxDL/MLDataDevices.jl Nov 3, 2024
@CarloLucibello
Copy link
Contributor Author

Why the repo has been archived?

@CarloLucibello
Copy link
Contributor Author

With FluxML/Functors.jl#82 fmap is type stable for all types

@avik-pal
Copy link
Member

avik-pal commented Nov 4, 2024

Let's do it together with updating functors to v0.5.

@avik-pal avik-pal linked a pull request Nov 13, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants