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

Document/Decide on adapt(Backend, ...) API #501

Open
vchuravy opened this issue Aug 7, 2024 · 0 comments
Open

Document/Decide on adapt(Backend, ...) API #501

vchuravy opened this issue Aug 7, 2024 · 0 comments
Labels
design documentation Improvements or additions to documentation

Comments

@vchuravy
Copy link
Member

vchuravy commented Aug 7, 2024

In #364 I added adapt(backend, x) as a natural extension for adapt, instead of having to use something like adapt(default_array_type(backend), x) which we don't currently have.

This was inspired by #353 and #297

As noted by @maleadt I didn't document it and it is a rather unofficial API that has lead users astray JuliaGPU/CUDA.jl#2459 (comment)

Ideally it would simply be adapt(::CUDABackend, x) = adapt(CuArray, x). I am not sure why I didn't use that definition before.

@vchuravy vchuravy added documentation Improvements or additions to documentation design labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant