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

Add query function for if we are executing on a GPU #422

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

vchuravy
Copy link
Member

Requires an API bump since backend need to implement this
with device_overlay.

@maleadt
Copy link
Member

maleadt commented Sep 19, 2023

Feels a little ad-hoc. I haven't thought this through, but what about a Device or Accelerator object, which could be used to query additional properties (SIMD width, etc)? The GPU-ness could be a part of the type hierarchy (CUDAGPU <: AbstractGPU <: AbstractAccelerator or whatever).

@vchuravy
Copy link
Member Author

Hm yeah, I was thinking current_backend() but Simon wanted the ability to not use it on the top-level.

We could pre-empt some other work I am thinking about and expose something like target() or compilation_target() and and then return a Features struct.

@simonbyrne
Copy link
Collaborator

We could pre-empt some other work I am thinking about and expose something like target() or compilation_target() and and then return a Features struct.

Any more thoughts on this?

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

Successfully merging this pull request may close these issues.

4 participants