Skip to content

Added get_queue_ref_from_ptr_and_syclobj #380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2021

Conversation

oleksandr-pavlyk
Copy link
Contributor

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

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
Contributor Author

Intended for 0.7.0

@diptorupd diptorupd added this to the 0.7.0 milestone Apr 8, 2021
@diptorupd
Copy link
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
Copy link
Contributor Author

oleksandr-pavlyk commented Apr 8, 2021

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