Fix handling of device string
@@ -69,8 +69,12 @@ def _get_global_queue():
if target != 'auto':
if d4p_target is not None and \
- d4p_target != target and \
- d4p_target not in target.sycl_device.get_filter_string():
+ d4p_target != target:
+ if not isinstance(target, str):
+ if d4p_target not in target.sycl_device.get_filter_string():
+ raise RuntimeError("Cannot use target offload option "
+ "inside daal4py.oneapi.sycl_context")
+ else:
raise RuntimeError("Cannot use target offload option "
"inside daal4py.oneapi.sycl_context")
if isinstance(target, QueueClass):
