dpnp icon indicating copy to clipboard operation
dpnp copied to clipboard

Tweaks needed for compute follows data implementation

Open oleksandr-pavlyk opened this issue 3 years ago • 1 comments

IntelPython/dpctl#797 changed equivalency relation between queues.

Previously two queues were equivalent if they had the same device, same context, and same properties. This made two copies of the same instance of sycl::queue as well as two distinct copies be equivalent.

The PR made it more stringent, so that distinct copies are no longer equivalent, i.e. dpctl.SyclQueue(dev) and dpctl.SyclQueue(dev) are no longer equivalent.

This revealed issues with dpnp. In constructors both device= and sycl_queue= keywords are used. They are complementary. Use only sycl_queue, e.g. https://github.com/IntelPython/dpnp/blob/master/dpnp/dpnp_array.py#L67-L69

Also in https://github.com/IntelPython/dpnp/blob/master/dpnp/dpnp_container.py#L97

Then at https://github.com/IntelPython/dpnp/blob/master/dpnp/dpnp_utils/dpnp_algo_utils.pyx#L403

again we are specifying both device and queue as the same time. Instead we should use normalize_queue_device and only pass the queue.

oleksandr-pavlyk avatar Mar 22 '22 11:03 oleksandr-pavlyk

https://github.com/IntelPython/dpnp/pull/1146

densmirn avatar Mar 22 '22 12:03 densmirn