Add query function for if we are executing on a GPU
Requires an API bump since backend need to implement this
with device_overlay.
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).
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.
We could pre-empt some other work I am thinking about and expose something like
target()orcompilation_target()and and then return a Features struct.
Any more thoughts on this?