Skip to content

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

Description

@vchuravy

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    designdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions