scikit-learn-intelex
scikit-learn-intelex copied to clipboard
Check available of host and cpu devices for sycl examples
Host and Cpu devices can be not available in python package and there is a failed:
python daal4py\examples\sycl\sklearn_sycl.py
********************************************************************************
device context: host
Traceback (most recent call last):
File "daal4py\examples\sycl\sklearn_sycl.py", line 179, in <module>
with get_context(device):
File "C:\Users\kpetrov\Miniconda3\envs\py36\lib\contextlib.py", line 81, in __enter__
return next(self.gen)
File "src\oneapi\oneapi.pyx", line 78, in sycl_context
File "src\oneapi\oneapi.pyx", line 42, in _oneapi.sycl_execution_context.__cinit__
RuntimeError: No device of requested type available. Please check https://software.intel.com/en-us/articles/intel-oneapi-dpcpp-compiler-system-requirements-beta -1 (CL_DEVICE_NOT_FOUND)
These changes do a check for the availability of devices and does not run examples if there is no package
General question: how proper is it not to raise any error or warning if no host device is available?
@michael-smirnov
General question: how proper is it not to raise any error or warning if no host device is available?
I think the behavior should be aligned in the case when the GPU is not found.
@michael-smirnov
General question: how proper is it not to raise any error or warning if no host device is available?
I think the behavior should be aligned in the case when the GPU is not found.
I don't think that for cpu/host we should have same path as for GPU. There are might be cases there you don't have GPU, but you always having CPU.
The problem is that in this setup in case of some major problems with DPC++ environment we will have green examples in both customer systems and our testing.
Might be we should consider separation of sycl and normal examples? In case you are running sycl examples we can expect that they are failing without dpc++ env..
I would say at least the host device should be present always with DPC++ RT.