Opencl_api.Programtype t = {mutable handle : Opencl_types.cl_program;context : Context.t;source : string;mutable _pinned : (char,
Stdlib.Bigarray.int8_unsigned_elt,
Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t;}A program holding binary, or None if the driver refuses it (CL_INVALID_BINARY, a binary built for another device or driver). Not yet built: build_status does that.
val binary : t -> string optionThe binary the driver produced for the (single) device of the program's context, or None if the driver returns none (size 0). Only meaningful after a successful build.
val effective_options : t -> caller:string -> stringThe complete option string clBuildProgram receives for caller. caller is what the CALLER wants; it is not what the driver gets. Opencl_fp.build_options screens it - raising Opencl_fp.Fp_conformance_violation on anything that would relax float semantics below docs/fp-contraction-policy.md §1 - and appends the options this backend requires on its own behalf, gated on the device's CL_DEVICE_SINGLE_FP_CONFIG.
build_status is the ONLY place an option string reaches clBuildProgram, and every caller reaches it through this function: the guard sits here rather than at the caller on purpose, so it screens flags a FUTURE maintainer of this module adds itself, not merely a caller's. Same placement argument as Cuda_nvrtc.compile_with_string_opts (docs/fp-contraction-policy.md §5).
Until backlog #136 the options passed straight through, and every caller in the tree passed nothing - so the effective option string was empty and Sarek silently accepted each vendor's default, including a sqrt of up to 3 ulp.
val build_status : t -> options:string -> Opencl_types.cl_intclBuildProgram with the already-screened options; the raw status.
val build_log : t -> stringval release : t -> unitval cache_target : t -> options:string -> Opencl_disk_cache.targetThe identity of what program is built for, as the disk cache keys it.
val adopt_cached_binary : t -> key:string -> options:string -> boolReplace program's handle by a built-from-binary one if key names a usable cached binary. false leaves program untouched: a corrupt entry, a binary the driver refuses, or one that fails to build all mean "compile from source", never an error.
val build_from_source : t -> options:string -> unitval build : t -> ?options:string -> unit -> unitBuild a program, through the persistent disk cache when the driver gives programs a binary. A hit skips the compiler; a miss (or an unusable entry) compiles source and (over)writes the entry.