@@ -59,7 +59,7 @@ class dpctl_capi
5959 PyTypeObject * PyMemoryUSMDeviceType_ ;
6060 PyTypeObject * PyMemoryUSMSharedType_ ;
6161 PyTypeObject * PyMemoryUSMHostType_ ;
62- PyTypeObject * PySyclProgramType_ ;
62+ PyTypeObject * PySyclKernelBundleType_ ;
6363 PyTypeObject * PySyclKernelType_ ;
6464
6565 DPCTLSyclDeviceRef (* SyclDevice_GetDeviceRef_ )(PySyclDeviceObject * );
@@ -89,9 +89,10 @@ class dpctl_capi
8989 DPCTLSyclKernelRef (* SyclKernel_GetKernelRef_ )(PySyclKernelObject * );
9090 PySyclKernelObject * (* SyclKernel_Make_ )(DPCTLSyclKernelRef , const char * );
9191
92- DPCTLSyclKernelBundleRef (* SyclProgram_GetKernelBundleRef_ )(
93- PySyclProgramObject * );
94- PySyclProgramObject * (* SyclProgram_Make_ )(DPCTLSyclKernelBundleRef );
92+ DPCTLSyclKernelBundleRef (* SyclKernelBundle_GetKernelBundleRef_ )(
93+ PySyclKernelBundleObject * );
94+ PySyclKernelBundleObject * (* SyclKernelBundle_Make_ )(
95+ DPCTLSyclKernelBundleRef );
9596
9697 bool PySyclDevice_Check_ (PyObject * obj ) const
9798 {
@@ -113,9 +114,9 @@ class dpctl_capi
113114 {
114115 return PyObject_TypeCheck (obj , PySyclKernelType_ ) != 0 ;
115116 }
116- bool PySyclProgram_Check_ (PyObject * obj ) const
117+ bool PySyclKernelBundle_Check_ (PyObject * obj ) const
117118 {
118- return PyObject_TypeCheck (obj , PySyclProgramType_ ) != 0 ;
119+ return PyObject_TypeCheck (obj , PySyclKernelBundleType_ ) != 0 ;
119120 }
120121
121122 ~dpctl_capi ()
@@ -165,7 +166,7 @@ class dpctl_capi
165166 Py_SyclQueueType_ (nullptr ), PySyclQueueType_ (nullptr ),
166167 Py_MemoryType_ (nullptr ), PyMemoryUSMDeviceType_ (nullptr ),
167168 PyMemoryUSMSharedType_ (nullptr ), PyMemoryUSMHostType_ (nullptr ),
168- PySyclProgramType_ (nullptr ), PySyclKernelType_ (nullptr ),
169+ PySyclKernelBundleType_ (nullptr ), PySyclKernelType_ (nullptr ),
169170 SyclDevice_GetDeviceRef_ (nullptr ), SyclDevice_Make_ (nullptr ),
170171 SyclContext_GetContextRef_ (nullptr ), SyclContext_Make_ (nullptr ),
171172 SyclEvent_GetEventRef_ (nullptr ), SyclEvent_Make_ (nullptr ),
@@ -174,8 +175,9 @@ class dpctl_capi
174175 Memory_GetContextRef_ (nullptr ), Memory_GetQueueRef_ (nullptr ),
175176 Memory_GetNumBytes_ (nullptr ), Memory_Make_ (nullptr ),
176177 SyclKernel_GetKernelRef_ (nullptr ), SyclKernel_Make_ (nullptr ),
177- SyclProgram_GetKernelBundleRef_ (nullptr ), SyclProgram_Make_ (nullptr ),
178- default_sycl_queue_ {}, default_usm_memory_ {}, as_usm_memory_ {}
178+ SyclKernelBundle_GetKernelBundleRef_ (nullptr ),
179+ SyclKernelBundle_Make_ (nullptr ), default_sycl_queue_ {},
180+ default_usm_memory_ {}, as_usm_memory_ {}
179181
180182 {
181183 // Import Cython-generated C-API for dpctl
@@ -198,7 +200,7 @@ class dpctl_capi
198200 this -> PyMemoryUSMDeviceType_ = & PyMemoryUSMDeviceType ;
199201 this -> PyMemoryUSMSharedType_ = & PyMemoryUSMSharedType ;
200202 this -> PyMemoryUSMHostType_ = & PyMemoryUSMHostType ;
201- this -> PySyclProgramType_ = & PySyclProgramType ;
203+ this -> PySyclKernelBundleType_ = & PySyclKernelBundleType ;
202204 this -> PySyclKernelType_ = & PySyclKernelType ;
203205
204206 // SyclDevice API
@@ -228,8 +230,9 @@ class dpctl_capi
228230 // dpctl.program API
229231 this -> SyclKernel_GetKernelRef_ = SyclKernel_GetKernelRef ;
230232 this -> SyclKernel_Make_ = SyclKernel_Make ;
231- this -> SyclProgram_GetKernelBundleRef_ = SyclProgram_GetKernelBundleRef ;
232- this -> SyclProgram_Make_ = SyclProgram_Make ;
233+ this -> SyclKernelBundle_GetKernelBundleRef_ =
234+ SyclKernelBundle_GetKernelBundleRef ;
235+ this -> SyclKernelBundle_Make_ = SyclKernelBundle_Make ;
233236
234237 // create shared pointers to python objects used in type-casters
235238 // for dpctl::memory::usm_memory
@@ -484,7 +487,7 @@ template <> struct type_caster<sycl::kernel>
484487
485488/* This type caster associates
486489 * ``sycl::kernel_bundle<sycl::bundle_state::executable>`` C++ class with
487- * :class:`dpctl.program.SyclProgram ` for the purposes of generation of
490+ * :class:`dpctl.program.SyclKernelBundle ` for the purposes of generation of
488491 * Python bindings by pybind11.
489492 */
490493template < >
@@ -495,10 +498,10 @@ struct type_caster<sycl::kernel_bundle<sycl::bundle_state::executable>>
495498 {
496499 PyObject * source = src .ptr ();
497500 auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
498- if (api .PySyclProgram_Check_ (source )) {
501+ if (api .PySyclKernelBundle_Check_ (source )) {
499502 DPCTLSyclKernelBundleRef KBRef =
500- api .SyclProgram_GetKernelBundleRef_ (
501- reinterpret_cast < PySyclProgramObject * > (source ));
503+ api .SyclKernelBundle_GetKernelBundleRef_ (
504+ reinterpret_cast < PySyclKernelBundleObject * > (source ));
502505 value = std ::make_unique <
503506 sycl ::kernel_bundle < sycl ::bundle_state ::executable >>(
504507 * (reinterpret_cast <
@@ -508,7 +511,7 @@ struct type_caster<sycl::kernel_bundle<sycl::bundle_state::executable>>
508511 }
509512 else {
510513 throw py ::type_error ("Input is of unexpected type, expected "
511- "dpctl.program.SyclProgram " );
514+ "dpctl.program.SyclKernelBundle " );
512515 }
513516 }
514517
@@ -517,13 +520,13 @@ struct type_caster<sycl::kernel_bundle<sycl::bundle_state::executable>>
517520 handle )
518521 {
519522 auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
520- auto tmp = api .SyclProgram_Make_ (
523+ auto tmp = api .SyclKernelBundle_Make_ (
521524 reinterpret_cast < DPCTLSyclKernelBundleRef > (& src ));
522525 return handle (reinterpret_cast < PyObject * > (tmp ));
523526 }
524527
525528 DPCTL_TYPE_CASTER (sycl ::kernel_bundle < sycl ::bundle_state ::executable > ,
526- _ ("dpctl.program.SyclProgram " ));
529+ _ ("dpctl.program.SyclKernelBundle " ));
527530};
528531
529532/* This type caster associates
0 commit comments