Skip to content

Added get_queue_ref_from_ptr_and_syclobj - #380

Merged
oleksandr-pavlyk merged 2 commits into
masterfrom
feature/suai-helper
Apr 9, 2021
Merged

oleksandr-pavlyk merged 2 commits into
masterfrom
feature/suai-helper

Conversation

@oleksandr-pavlyk

@oleksandr-pavlyk oleksandr-pavlyk commented Apr 8, 2021 •

Copy link
Copy Markdown
Contributor

Implements

   DPCTLSyclQueueRef get_queue_ref_from_ptr_and_syclobj(
      DPCTLSyclUSMRef ptr, object syclobj)

This function is to help users of __sycl_usm_array_interface__ to
create a queue from a pointer and a valid syclobj entry in the
interface dictionary.

Currently supported variants are:

    - filter selector string
          : creates queue for the device created from the selector
    - dpctl.SyclQueue
          : use given queue
    - dpctl.SyclContext
          : find device from ptr and context, create queue from context
	  : and device
    - capsule with SyclQueueRef
          : use this queue
    - capsule with SyclContextRef
          : use this context to recover device and create queue
    - any python object that implements method _get_capsule()
          : use that capsule as outlined above

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor Author

Intended for 0.7.0

@diptorupd diptorupd added this to the 0.7.0 milestone Apr 8, 2021
@diptorupd

Copy link
Copy Markdown
Contributor

how about get_queue_ref_from_ptr_and_syclobj

Implements
   DPCTLSyclQueueRef get_queue_ref_from_ptr_and_syclobj(
      DPCTLSyclUSMRef ptr, object syclobj)

This function is to help users of __sycl_usm_array_interface__ to
create a queue from a pointer and a valid syclobj entry in the
interface.

Currently supported variants are:
    - filter selector string
          : creates queue for the device created from the selector
    - dpctl.SyclQueue
          : use given queue
    - dpctl.SyclContext
          : find device from ptr and context, create queue from context
	  : and device
    - capsule with SyclQueueRef
          : use this queue
    - capsule with SyclContextRef
          : use this context to recover device and create queue
    - any python object that implements method _get_capsule()
          : use that capsule as outlined above
@oleksandr-pavlyk

oleksandr-pavlyk commented Apr 8, 2021 •

Copy link
Copy Markdown
Contributor Author

get_queue_ref_from_ptr_and_syclobj

Done.

@oleksandr-pavlyk oleksandr-pavlyk changed the title Added get_queue_ref_from_pointer_and_syclobj Added get_queue_ref_from_ptr_and_syclobj Apr 8, 2021
@oleksandr-pavlyk
oleksandr-pavlyk merged commit 4076fb2 into master Apr 9, 2021
@oleksandr-pavlyk
oleksandr-pavlyk deleted the feature/suai-helper branch April 9, 2021 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants