Owl_computation_engine.Make_Graph
module Device : Owl_types_computation_device.Sig
include sig ... end
module Optimiser : sig ... end
type graph =
Owl_computation_graph.Make(Owl_computation_optimiser.Make(Owl_computation_operator.Make(Owl_computation_symbol.Make(Owl_computation_shape.Make(Owl_computation_type.Make(Device)))))).graph =
{
mutable name : string;
mutable input : Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array;
mutable output : Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array;
mutable iopair : (Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node
* Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node)
array;
mutable iosafe : bool array;
mutable random : Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array;
mutable htbl : (string,
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node)
Stdlib.Hashtbl.t;
mutable device : Optimiser.Operator.Symbol.Shape.Type.Device.device;
}
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
val graph_to_dot : graph -> string
val graph_to_trace : graph -> string
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
val invalidate_rvs : graph -> unit
val make_graph :
input:Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
output:Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
string ->
graph
val get_inputs :
graph ->
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
val get_outputs :
graph ->
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
val get_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.A.elt
val set_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
unit
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
unit
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
val make_iopair :
graph ->
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
unit
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
'a Owl_graph.node array * 'b array
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
unit
val optimise : graph -> unit