Device doesn't cover all traits from Cpu/Cuda
jackerschott opened this issue · 2 comments
jackerschott commented
It is hard to work with a generic device type, e.g. D: Device<f32>
, since some of the traits from Cpu
/Cuda
are not implemented for Device
and not all of them are public. E.g. the ToDtypeKernel
trait, such that I have to use something like AutoDevice when using to_dtype
with other types than f32 and f64.
Would it be sensible to include all shared traits of Cpu
/Cuda
in Device
or implement some new trait that includes everything?
LeoDog896 commented
This is also partially why I proposed #859, but this seems like a much better full solution to the matter.
coreylowman commented
Yeah we can add more instances of ToDtypeKernel constraints to Device.