Skip to content

Rethinking eltype conversions in Adaptors #1015

@avik-pal

Description

@avik-pal

Currently, we forward calls to cu, mtl, etc., from the device adaptors. This is well-motivated because users often don't want to do FP64 ops on GPUs.

But there is a clear design problem. Let's say we want to convert to FP64 GPUArray, the current way is Array FP64 --> CuArray FP32 --> CuArray FP64.

We can solve this by associating an eltype with the adaptor:

  1. Default for CPUAdaptor: nothing, i.e., preserve eltype while converting
  2. For all other GPU Backends: FP32, i.e. convert to FP32.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions