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

Device doesn't cover all traits from Cpu/Cuda #866

Open
jackerschott opened this issue Sep 8, 2023 · 2 comments
Open

Device doesn't cover all traits from Cpu/Cuda #866

jackerschott opened this issue Sep 8, 2023 · 2 comments

Comments

@jackerschott
Copy link

jackerschott commented Sep 8, 2023

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
Copy link
Contributor

This is also partially why I proposed #859, but this seems like a much better full solution to the matter.

@coreylowman
Copy link
Owner

Yeah we can add more instances of ToDtypeKernel constraints to Device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants