Opencl_plugin.BackendOpenCL Backend - implements BACKEND
module Device : sig ... endDevice management
module Stream : sig ... endAsync execution streams / command queues
module Memory : sig ... endGPU memory allocation and transfer
module Event : sig ... endTiming events
module Kernel : sig ... endKernel compilation and execution
val execution_model : Spoc_framework.Framework_sig.execution_modelThe execution model this backend uses
val generate_source :
?block:Spoc_framework.Framework_sig.dims ->
Sarek_ir_types.kernel ->
string optionGenerate source code from Sarek IR (for JIT backends). Returns None for Direct/Custom backends.
val execute_direct :
native_fn:
(block:Spoc_framework.Framework_sig.dims ->
grid:Spoc_framework.Framework_sig.dims ->
Spoc_framework.Framework_sig.exec_arg array ->
unit)
option ->
ir:Sarek_ir_types.kernel option ->
block:Spoc_framework.Framework_sig.dims ->
grid:Spoc_framework.Framework_sig.dims ->
Spoc_framework.Framework_sig.exec_arg array ->
unitExecute a kernel directly (for Direct/Custom backends). JIT backends should raise an error if this is called. The backend chooses which component to use:
Backend-specific intrinsic registry
val supported_source_langs : Spoc_framework.Framework_sig.source_lang listList of source languages this backend supports
val run_source :
source:string ->
lang:Spoc_framework.Framework_sig.source_lang ->
kernel_name:string ->
block:Spoc_framework.Framework_sig.dims ->
grid:Spoc_framework.Framework_sig.dims ->
shared_mem:int ->
Spoc_framework.Framework_sig.run_source_arg list ->
unitExecute an external kernel from source code.
Type-safe wrapping/unwrapping of backend-specific kernel args into the extensible kargs type. Each backend extends kargs with its own variant.
val wrap_kargs : Kernel.args -> Spoc_framework.Framework_sig.kargsWrap this backend's kernel args into a kargs variant
val unwrap_kargs : Spoc_framework.Framework_sig.kargs -> Kernel.args optionUnwrap kargs to this backend's kernel args. Returns None if wrong backend.