Open avik-pal opened 1 month ago
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.
cu,
mtl,
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.
Array FP64 --> CuArray FP32 --> CuArray FP64
We can solve this by associating an eltype with the adaptor:
eltype
nothing
FP32
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:nothing
, i.e., preserve eltype while convertingFP32
, i.e. convert to FP32.