Skip to content

Specifying backend for device_context #100

Closed
@diptorupd

Description

@diptorupd

Is it possible to set only "gpu" ? Is it possible to select default backend?

Originally posted by @PokhodenkoSA in #93 (comment)

Another thing that I have concerns this – API device_context('opencl:gpu:0')
As user I don’t want to select backend or gpu device unless I would like to do so. And currently this are mandatory params. Even with DPC++ runtime i’m not providing such level of details – so I assume I shouldn’t do this in python as well.

Originally posted by @napetrov

Another point about specifying backend:
For now, we have to specify “OpenCL” backend if we run on CPU. But in oneDAL, we have no OpenCL dependency for CPU computations – we run native code. I think it’s incorrect to specify “OpenCL” backend in such cases where you don’t know what the actual backend will be used – why we need to specify it?
The same case for MKL – they run native GEN9-12 assembly on GPUs – I’m not sure we can specify “opencl” or “level0” backend here.
And what should the library do if the requested backend does not match the way how device support is implemented inside? Check backend type and throw an exception?

Originally posted by @michael-smirnov

what’s about the host device on the dpctl side, which do not require to have any backend installed? I did not find this in your sources.

Originally posted by @michael-smirnov

Related: #131

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions