Skip to content

Conversation

@oleksandr-pavlyk
Copy link
Contributor

@oleksandr-pavlyk oleksandr-pavlyk commented Mar 5, 2021

This PR represent a work-in-progress that reached a milestone ready for an initial feedback.

It contains changes to SyclDevice (incorporating changes in #277) and SyclQueue, allowing users to create device/queue from filter selector string,

SyclQueue can be created from a filter selector string, from an instance of SyclDevice, or from a pair of SyclContext and SyclDevice.

One can (or will be able to in a near future) set queue properties during the construction.

Device context manager has change, its argument is used to create a new queue, which is temporarily set as global queue.

@diptorupd @1e-to @PokhodenkoSA

Closes #311
Closes #312
Closes #100
Closes #266

Diptorup Deb and others added 30 commits February 27, 2021 19:37
  - Add a new dpctl_sycl_device_manager module to store a
    cache of root devices along with a cached context per
    device.
  - The device manager includes functions to get a vector of
    devices and the number of root devices of a specific type
    and backend combination.
  - Move the DPCTLDevice_DumpInfo() to a new module called
    dpctl_sycl_device_manager, and rename it to
    DPCTLDeviceMgr_PrintDeviceInfo().
  - Introduce a new _sycl_device_factory module in the Python API.
  - Move device selector functions to the _sycl_device_factory
    module.
  - Add functions to get list of SYCL devies in dpctl.
1. error_handler function typedef changed
2. DPCTLDevice_Copy, DPCTLQueue_Copy added
3. DPCTLDeviceMgr_GetContextAndDevicePair exported as well as
   the struct it returns.
…se them in tests intsead of has_cpu_queue,etc.
SyclQueue(device_selector, props)
SyclQueue(sycl_device, props)
SyclQueue(sycl_context, sycl_device, props)

create SyclQueue from given data. A default asynch error handler is
used. The error handler raises SyclAsynchronousError.
Removed get_num_queues, has_cpu_queues, has_gpu_queues.

The context manager accepts device selector string, device,
or a queue itself.
This way _SyclDevice, which can be create with data attributes default
using _SyclDevice() can not be used (no methods defined).

Modified __repr__ for SyclDevice to reflect backend, device kind and the
the device name as reported by dev.get_info<sycl::info::device::name>().
oleksandr-pavlyk and others added 9 commits March 9, 2021 15:27
…er_v2

Fixed merge conflicts in dpctl/_backend.pxd, dpctl/_sycl_device.pxd and
dpctl/_sycl_device.pyx

Tests pass locally.
This way the handler does not use `PyErr_WriteUnraisable`, but uses
`PyErr_PrintEx` instead.
to skip tests that would create queue from a device for which it is
impossible (like accelerator device with driver installed, but hardware absent)
@diptorupd diptorupd closed this Mar 13, 2021
@diptorupd diptorupd deleted the feature/queue_manager_v2 branch May 23, 2021 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants