-
Notifications
You must be signed in to change notification settings - Fork 29
Specifying backend for device_context #100
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
Comments
Should it be the default based on behavior of SYCL's device selector for the specified group of devices? For example for |
Comment on default behavior - the assumption is that in case just gpu device selected we are are not mapping to particular device underneath or doing some sort of round robin dispatching - compiler runtime is capable of doing dispatching assuming internal load balancing across devices - so i would say this should be done in similar way. |
Please see SYCL extension proposal for filter selectors: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/FilterSelector/FilterSelector.adoc |
I think most important part - "Every element of the triple is optional, but a filter must contain at least one component." |
std::string filter_spec = "gpu";
sycl::device d { sycl::ONEAPI::filter_selector(filter_spec) }; |
Closing as we now support filter selectors in |
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
The text was updated successfully, but these errors were encountered: