Ir.Host_initsmodule Nd = Ndarraymodule Tn = TnodeA weakly-owned association from a tensor node to the host buffer holding its initialization data (ndarray-backed literals and persistence-loaded nodes). After gh-ocannl-333 the data is no longer stored on Tnode.t; instead it is registered here at construction and uploaded into a backend context, on demand, at link time.
The table is:
module Init_table : sig ... endval table : Nd.t Base.Lazy.t Init_table.tval register : Init_table.key -> Nd.t Base.Lazy.t -> unitRecords the host initialization buffer for tn. A later registration for the same node overwrites the earlier one (the buffers describe the same node's data).
val find : Init_table.key -> Nd.t Base.Lazy.t optionReturns the host initialization buffer for tn, if any, without removing it.
val mem : Init_table.key -> boolWhether tn has registered host initialization data.