Sarek_execute.Kernel_accessHow a kernel uses its vector parameters, and whether it can be fused horizontally (specs/launch-window.md).
Both answers are read from the IR only and are conservative: a use this module cannot classify counts as a read AND a write, and a construct it does not understand makes the kernel non-fusable. Wrong in the other direction would let the launch window reorder or merge launches that conflict.
val no_access : accessval both : accessval vector_params : Sarek_ir_types.kernel -> string listVector parameter names of k, in declaration order.
type acc = (string, access) Stdlib.Hashtbl.tval read_ : accessval write_ : accessval base_access : acc -> access -> Sarek_ir_types.expr -> unitval expr : acc -> Sarek_ir_types.expr -> unitval lvalue : acc -> Sarek_ir_types.lvalue -> unitval coopmat : acc -> Sarek_ir_types.coopmat_op -> unitval stmt : acc -> Sarek_ir_types.stmt -> unitval param_accesses : Sarek_ir_types.kernel -> (string * access) listAccess of each vector parameter of k, in declaration order. Helper functions receive vectors only as arguments, which expr already counts as both.
Position intrinsics that horizontal fusion rewrites, under the exact path Sarek_stdlib.Gpu only. Each rewritten form keeps the type the backends give the original: block_idx_x - off and gdx * block_dim_x stay in the backend's own unsigned type where it has one.
Position intrinsics a member may not use at all. grid_dim_x would have to become an int parameter, while CUDA/HIP, OpenCL and Metal emit it as an unsigned value, so comparisons and divisions with negative operands would change meaning. block_id_x is an alias the backends accept for block_idx_x; it is refused rather than rewritten under a second name.
module Ids : sig ... endmodule Names : sig ... endval bind : scope -> Sarek_ir_types.var -> scopeval bind_pattern : scope -> Sarek_ir_types.pattern -> scopeval check_intrinsic : scope -> string list -> string -> unitval check_expr : scope -> Sarek_ir_types.expr -> unitval check_lvalue : scope -> Sarek_ir_types.lvalue -> unitval check_stmt : scope -> Sarek_ir_types.stmt -> unitval kernel_scope : Sarek_ir_types.kernel -> scopeval check_helper : Sarek_ir_types.kernel -> Sarek_ir_types.helper_func -> unitval check_kernel : Sarek_ir_types.kernel -> intval horizontal_verdict : Sarek_ir_types.kernel -> (int, string) Stdlib.resultOk bytes when k can be a member of a horizontally fused kernel, with the shared memory it declares; otherwise the reason it cannot.