-
Notifications
You must be signed in to change notification settings - Fork 30
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
Use public keyword in _sycl_core.pxd on SyclContext/SyclQueue #218
Conversation
Further decoration of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM barring the two comments I left on the PR.
@@ -28,7 +28,7 @@ from .._sycl_device cimport SyclDevice | |||
from .._sycl_queue cimport SyclQueue | |||
|
|||
|
|||
cdef class _Memory: | |||
cdef public class _Memory [object Py_MemoryObject, type Py_MemoryType]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to expose the _Memory
class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought yes. Mostly for type detection. Testing that an object obj
is a USM memory buffer can be as simpler as using PyObject_TypeCheck
with Py_MemoryType
.
e83f1e7
to
eda6a92
Compare
I thought this change should make it into 0.7.0 |
This causes Cython to convert
_sycl_core.pxd
,_sycl_core.pyx
into
_sycl_core.h
and_sycl_core.cpp
.The header file can be used by external C++/C projects to be aware
of SyclContext and SyclQueue python objects defined by dpctl.
These are PySyclContextObject, PySyclQueueObject, which are instances
of PyObject, and
PySyclContextType
,PySyclQueueType
which can be usedin
PyObject_TypeCheck
calls, validating that a Python object isa valid
syclobj
entry in__sycl_usm_array_interface__
.