You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now current device is changed via dpctl.device_context. Internally it changes current device at enter to context and return previous device on exit from context. Functions for changing current device should be provided in API.
Functions:
select_device
close
Also functions could provide access to internal contexts stack.
@PokhodenkoSA can you clarify what exactly needs to be done here? The concept of default queue is going to go away from dpctl. Instead we can make the dpctl._SyclQueueManager class public and numba-dppy can use it to manage a current queue for numba-dppy.
Also, the recent changes that got merged into master adds an API call dpctl.set_global_queue to change the current queue without having to use a with dpctl.device_context. The function previously existed as dpctl.set_default_queue.
The device manager has been significantly modified to let users create SYCL devices as they wish. The notion of current device is deprecated and we will not have the feature in dpctl eventually. @oleksandr-pavlyk Fine with closing the issue?
dpctl.device_context currently works by manipulating a singleton class implementing a stack. The global nature of this class makes it async-unsafe, e.g. #11.
With adoption of computation follows data paradigm, dpctl.device_context becomes deprecated and should eventually be removed.
Activity
diptorupd commentedon Mar 15, 2021
@PokhodenkoSA can you clarify what exactly needs to be done here? The concept of default queue is going to go away from
dpctl. Instead we can make thedpctl._SyclQueueManagerclass public andnumba-dppycan use it to manage a current queue for numba-dppy.Also, the recent changes that got merged into master adds an API call
dpctl.set_global_queueto change the current queue without having to use awith dpctl.device_context. The function previously existed asdpctl.set_default_queue.PokhodenkoSA commentedon Apr 5, 2021
@diptorupd I propose to meet and discuss it.
diptorupd commentedon Oct 10, 2021
The device manager has been significantly modified to let users create SYCL devices as they wish. The notion of current device is deprecated and we will not have the feature in dpctl eventually. @oleksandr-pavlyk Fine with closing the issue?
oleksandr-pavlyk commentedon Oct 11, 2021
Vote to close.
PokhodenkoSA commentedon Oct 12, 2021
@diptorupd
What we have now instead of current device?
oleksandr-pavlyk commentedon Oct 12, 2021
Explicit creation of devices/queues.
dpctl.SyclDevice()gives default selected devicedpctl.SyclQueue()gives queue constructed from default selector.dpctl.SyclQueue(filter_string)constructs sycl queue from given filter selector string.PokhodenkoSA commentedon Oct 13, 2021
How
dpctl.device_context()is working now? Does not it change some variable which is used buy code inside the context?oleksandr-pavlyk commentedon Oct 13, 2021
dpctl.device_contextcurrently works by manipulating a singleton class implementing a stack. The global nature of this class makes it async-unsafe, e.g. #11.With adoption of computation follows data paradigm,
dpctl.device_contextbecomes deprecated and should eventually be removed.PokhodenkoSA commentedon Oct 13, 2021
Thanks.
diptorupd commentedon Mar 1, 2024
Closing as the design based on a "current device" has been removed and the device manager code is also slotted to be removed.