numba_dpex.dpctl_iface.dpctl_capi_fn_builder module
This module provides a set of wrapper functions to insert dpctl C API function declarations into an LLVM module.
- class numba_dpex.dpctl_iface.dpctl_capi_fn_builder.DpctlCAPIFnBuilder
Bases:
objectDefines a set of static functions to add declarations for dpctl C API library function into an LLVM module.
- static get_dpctl_event_delete(builder, context)
Inserts an LLVM Function for
DPCTLEvent_Delete.The
DPCTLEvent_Deletefunction deletes aDPCTLSyclEventRefopaque pointer.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Returns: A Python object wrapping an LLVM Function for
DPCTLEvent_Delete.
- static get_dpctl_event_wait(builder, context)
Inserts an LLVM Function for
DPCTLEvent_Wait.The
DPCTLEvent_Waitfunction is a wrapper over thesycl::eventclass’wait()function.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Return: A Python object wrapping an LLVM Function for
DPCTLEvent_Wait.
- static get_dpctl_free_with_queue(builder, context)
Inserts an LLVM Function for
DPCTLfree_with_queue.The
DPCTLfree_with_queuefunction is a wrapper oversycl::free(void*, queue)function. All the opaque pointers arguments to theDPCTLfree_with_queueare passed as void pointers.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Return: A Python object wrapping an LLVM Function for
DPCTLfree_with_queue.
Inserts an LLVM Function for
DPCTLmalloc_shared.DPCTLmalloc_sharedis a wrapper over thesycl::malloc_sharedfunction to allocate USM shared memory.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Return: A Python object wrapping an LLVM Function for
DPCTLmalloc_shared.
- static get_dpctl_queue_delete(builder, context)
Inserts an LLVM Function for the
DPCTLQueue_Delete.The
DPCTLQueue_Deletedeletes a DPCTLSyclQueueRef opaque pointer.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Return: A Python object wrapping an LLVM Function for
DPCTLQueue_Delete.
- static get_dpctl_queue_memcpy(builder, context)
Inserts an LLVM Function for the
DPCTLQueue_Memcpy.The
DPCTLQueue_Memcpyfunction is a wrapper oversycl::queueclass’event memcpy(void* dest, const void* src, size_t numBytes)function. Currently, the DPCTLQueue_Memcpy does not return an event reference, but in future will return an opaque pointer to asycl::event. All the opaque pointers arguments to theDPCTLQueue_Memcpyare passed as void pointers.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Return: A Python object wrapping an LLVM Function for
DPCTLQueue_Memcpy.
- static get_dpctl_queue_submit_range(builder, context)
Inserts an LLVM Function for
DPCTLQueue_SubmitRange.The
DPCTLQueue_SubmitRangefunction is a wrapper over thesycl::queueclass’event parallel_for(range<dimensions> numWorkItems, Rest&&... rest)function. All the opaque pointers arguments to theDPCTLQueue_SubmitRangefunction are passed as void pointers.Note: The
DPCTLQueue_SubmitRangecalls returns an opaque pointer to asycl::eventthat needs to be destroyed properly.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Return: A Python object wrapping an LLVM Function for
DPCTLQueue_SubmitRange.
- static get_dpctl_queue_wait(builder, context)
Inserts an LLVM Function for
DPCTLQueue_Wait.The
DPCTLQueue_Waitis a wrapper oversycl::queueclass’wait()function.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Returns: A Python object wrapping an LLVM Function for
DPCTLQueue_Wait.
- static get_dpctl_queuemgr_get_current_queue(builder, context)
Inserts an LLVM Function for
DPCTLQueueMgr_GetCurrentQueue.The
DPCTLQueueMgr_GetCurrentQueuefunction returns the current top-of-the-stack SYCL queue that is stored in dpclt’s queue manager.- Args:
builder: The LLVM IR builder to be used for code generation. context: The LLVM IR builder context.
- Return: A Python object wrapping an LLVM Function for
DPCTLQueueMgr_GetCurrentQueue.