Module type Autotune.Driver

type ctx

An execution context: a device stream with its compilation lineage (Context.t).

type routine

A linked routine of a ctx (Context.routine).

type program

What a compile compiles (Ir.Assignments.comp). The autotuner never inspects one: it hands it to the compiles and asks the two questions below.

type retained

Compiled code kept for a later relink_outcome (Context.retained).

type reuse

A lowering cell shared by one search's compiles (Ir.Lowering_reuse.t): the cell itself is the driver's, since what it is keyed on is the driver's program.

val routine_name : routine -> Base.string
val routine_id : routine -> Base.int
val routine_bindings : routine -> Ir.Indexing.lowered_bindings

The routine's live launch-parameter cells, not copies: timing assigns and restores them.

val routine_grid : routine -> Ir.C_syntax.grid_summary
val routine_segments : routine -> Ir.Low_level.optimized Base.list
val routine_mma : routine -> Ir.C_syntax.mma_summary

The routine accessors: the name, routine_id, bindings, grid, segments and mma fields of Context.routine.

val program_name : program -> Base.string Base.option

The name a compile given no ?name derives for the program's routine, or None where that derivation fails (the compile then refuses the program itself). Read lazily, as a diagnostic label only.

val program_nodes : program -> Base.Set.M(Ir.Tnode).t

Every node the program reads or writes; gates the bounds-blind cache rebase (gh-ocannl-1614), so it is cache-replay behaviour, not a diagnostic.

val reuse_create : Base.unit -> reuse
val reuse_reseed : reuse -> Ir.Low_level.optimized -> Base.unit
val compile : ?name:Base.string -> ?lowered_transform: (Ir.Low_level.optimized -> Ir.Low_level.optimized Base.list) -> ?prelowered:Ir.Low_level.optimized -> ?reuse:reuse -> ctx -> program -> Ir.Indexing.unit_bindings -> ctx * routine
val compile_outcome : ?name:Base.string -> ?lowered_transform: (Ir.Low_level.optimized -> Ir.Low_level.optimized Base.list) -> ?prelowered:Ir.Low_level.optimized -> ?reuse:reuse -> provenance:Ir.Schedule_outcome.provenance -> ?candidate:Base.string -> ?retain:(retained -> Base.unit) -> ctx -> program -> Ir.Indexing.unit_bindings -> (ctx * routine) Ir.Schedule_outcome.outcome
val backend_compiles : Base.unit -> Base.int
val lowered_for_decisions : ?name:Base.string -> ?materialized:Ir.Tnode.t Base.list -> ?inline:Ir.Tnode.t Base.list -> ?footprint:Ir.Tnode.t Base.list -> ?facts:Ir.Backend_intf.backend_facts -> ?limits:Ir.Backend_intf.hardware_limits -> ctx -> program -> Ir.Indexing.unit_bindings -> Ir.Low_level.optimized
val lowered_transform_input : Ir.Low_level.optimized -> Ir.Low_level.optimized
val run : ?timing:Base.bool -> ctx -> routine -> ctx
val sync : ctx -> Base.unit
val release : ctx -> Base.unit
val check_lineage_runnable : ctx -> routine -> Base.unit
val check_launch_bindings : routine -> Base.unit
val failure_classifier : ctx -> Ir.Schedule_outcome.phase -> Base.exn -> Ir.Schedule_outcome.classified_cause Base.option
val rollback_execution : ctx -> Base.int -> Base.unit
val poison_lineage : ctx -> routine_name:Base.string -> Base.exn -> Base.unit
val poisoned_failure : ctx -> Base.exn Base.option
val save_accumulation_history : ctx -> Base.unit -> Base.unit
val timing_identity : ctx -> Ir.Backend_intf.timing_identity Base.option
val hardware_limits : ctx -> Ir.Backend_intf.hardware_limits
val codegen_capabilities : ctx -> Ir.Backend_intf.codegen_capabilities
val backend_facts : ctx -> Ir.Backend_intf.backend_facts
val same_backend : ctx -> ctx -> Base.bool
val backend_name : ctx -> Base.string
val ordinal : ctx -> Base.int
val get_used_memory : ctx -> Base.int
val placements : ctx -> Ir.Tnode.Placements.t
val inherits_computation : ctx -> Ir.Tnode.t -> Base.bool
val decide_readings : ?skip_empty:Base.bool -> ctx -> (Ir.Tnode.t Base.list * Ir.Tnode.t Base.list * Ir.Tnode.t Base.list) -> ctx
val mem : ctx -> Ir.Tnode.t -> Base.bool
val to_host : ctx -> Ir.Tnode.t -> Ir.Ndarray.t
val from_host : ctx -> Ir.Tnode.t -> Ir.Ndarray.t -> ctx

The remaining members are Context's same-named functions, with the same contracts.