@@ -230,7 +230,7 @@ cdef class SyclProgram:
230
230
return int (< size_t> self ._program_ref)
231
231
232
232
233
- cpdef create_program_from_source(SyclQueue q, unicode src, unicode copts = " " ):
233
+ cpdef create_program_from_source(SyclQueue q, str src, str copts = " " ):
234
234
"""
235
235
Creates a Sycl interoperability program from an OpenCL source string.
236
236
@@ -240,20 +240,24 @@ cpdef create_program_from_source(SyclQueue q, unicode src, unicode copts=""):
240
240
Note: This function is currently only supported for the OpenCL backend.
241
241
242
242
Parameters:
243
- q (SyclQueue) : The :class:`SyclQueue` for which the
244
- :class:`SyclProgram` is going to be built.
245
- src (unicode): Source string for an OpenCL program.
246
- copts (unicode) : Optional compilation flags that will be used
247
- when compiling the program.
243
+ q (SyclQueue)
244
+ The :class:`dpctl.SyclQueue` for which the
245
+ :class:`.SyclProgram` is going to be built.
246
+ src (str)
247
+ Source string for an OpenCL program.
248
+ copts (str, optional)
249
+ Optional compilation flags that will be used
250
+ when compiling the program. Default: ``""``.
248
251
249
252
Returns:
250
- program (SyclProgram): A :class:`SyclProgram` object wrapping the
251
- ``sycl::kernel_bundle<sycl::bundle_state::executable>`` returned
252
- by the C API.
253
+ program (SyclProgram)
254
+ A :class:`.SyclProgram` object wrapping the
255
+ ``sycl::kernel_bundle<sycl::bundle_state::executable>``
256
+ returned by the C API.
253
257
254
258
Raises:
255
- SyclProgramCompilationError: If a SYCL kernel bundle could not be
256
- created.
259
+ SyclProgramCompilationError
260
+ If a SYCL kernel bundle could not be created.
257
261
"""
258
262
259
263
cdef DPCTLSyclKernelBundleRef KBref
@@ -272,7 +276,7 @@ cpdef create_program_from_source(SyclQueue q, unicode src, unicode copts=""):
272
276
273
277
274
278
cpdef create_program_from_spirv(SyclQueue q, const unsigned char [:] IL,
275
- unicode copts = " " ):
279
+ str copts = " " ):
276
280
"""
277
281
Creates a Sycl interoperability program from an SPIR-V binary.
278
282
@@ -281,20 +285,24 @@ cpdef create_program_from_spirv(SyclQueue q, const unsigned char[:] IL,
281
285
from an compiled SPIR-V binary file.
282
286
283
287
Parameters:
284
- q (SyclQueue): The :class:`SyclQueue` for which the
285
- :class:`SyclProgram` is going to be built.
286
- IL (bytes) : SPIR-V binary IL file for an OpenCL program.
287
- copts (str) : Optional compilation flags that will be used
288
- when compiling the program.
288
+ q (SyclQueue)
289
+ The :class:`dpctl.SyclQueue` for which the
290
+ :class:`.SyclProgram` is going to be built.
291
+ IL (bytes)
292
+ SPIR-V binary IL file for an OpenCL program.
293
+ copts (str, optional)
294
+ Optional compilation flags that will be used
295
+ when compiling the program. Default: ``""``.
289
296
290
297
Returns:
291
- program (SyclProgram): A :class:`SyclProgram` object wrapping the
292
- ``sycl::kernel_bundle<sycl::bundle_state::executable>`` returned by
293
- the C API.
298
+ program (SyclProgram)
299
+ A :class:`SyclProgram` object wrapping the
300
+ ``sycl::kernel_bundle<sycl::bundle_state::executable>``
301
+ returned by the C API.
294
302
295
303
Raises:
296
- SyclProgramCompilationError: If a SYCL kernel bundle could not be
297
- created.
304
+ SyclProgramCompilationError
305
+ If a SYCL kernel bundle could not be created.
298
306
"""
299
307
300
308
cdef DPCTLSyclKernelBundleRef KBref
@@ -323,7 +331,8 @@ cdef api DPCTLSyclKernelBundleRef SyclProgram_GetKernelBundleRef(SyclProgram pro
323
331
cdef api SyclProgram SyclProgram_Make(DPCTLSyclKernelBundleRef KBRef):
324
332
"""
325
333
C-API function to create :class:`dpctl.program.SyclProgram`
326
- instance from opaque sycl kernel bundle reference.
334
+ instance from opaque ``sycl::kernel_bundle<sycl::bundle_state::executable>``
335
+ reference.
327
336
"""
328
337
cdef DPCTLSyclKernelBundleRef copied_KBRef = DPCTLKernelBundle_Copy(KBRef)
329
338
return SyclProgram._create(copied_KBRef)
0 commit comments