diff --git a/docs/owl-base/Owl_algodiff_check/Make/argument-1-AD/index.html b/docs/owl-base/Owl_algodiff_check/Make/argument-1-AD/index.html index 64ca52bd0..4122984b5 100644 --- a/docs/owl-base/Owl_algodiff_check/Make/argument-1-AD/index.html +++ b/docs/owl-base/Owl_algodiff_check/Make/argument-1-AD/index.html @@ -1,5 +1,5 @@ -
Make.AD
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+AD (owl-base.Owl_algodiff_check.Make.AD) Parameter Make.AD
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_algodiff_core/Make/index.html b/docs/owl-base/Owl_algodiff_core/Make/index.html
index 7af95d99e..d820af632 100644
--- a/docs/owl-base/Owl_algodiff_core/Make/index.html
+++ b/docs/owl-base/Owl_algodiff_core/Make/index.html
@@ -1,3 +1,3 @@
Make (owl-base.Owl_algodiff_core.Make) Module Owl_algodiff_core.Make
Parameters
module A : Owl_types_ndarray_algodiff.Sig
Signature
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
+ Owl_types_ndarray_algodiff.Sig with type arr = A.arr with type elt = A.elt
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
Owl_algodiff_generic.Make
module A : Owl_types_ndarray_algodiff.Sig
include Owl_algodiff_core_sig.Sig
with type A.arr = A.arr
with type A.elt = A.elt
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+ Owl_types_ndarray_algodiff.Sig with type arr = A.arr with type elt = A.elt
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_algodiff_generic_sig/module-type-Sig/index.html b/docs/owl-base/Owl_algodiff_generic_sig/module-type-Sig/index.html
index 14201a47b..545da5e2c 100644
--- a/docs/owl-base/Owl_algodiff_generic_sig/module-type-Sig/index.html
+++ b/docs/owl-base/Owl_algodiff_generic_sig/module-type-Sig/index.html
@@ -1,5 +1,5 @@
-Sig (owl-base.Owl_algodiff_generic_sig.Sig) Module type Owl_algodiff_generic_sig.Sig
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Sig (owl-base.Owl_algodiff_generic_sig.Sig) Module type Owl_algodiff_generic_sig.Sig
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_algodiff_graph_convert/Make/argument-1-Core/index.html b/docs/owl-base/Owl_algodiff_graph_convert/Make/argument-1-Core/index.html
index 05115d4fe..1aa73b66b 100644
--- a/docs/owl-base/Owl_algodiff_graph_convert/Make/argument-1-Core/index.html
+++ b/docs/owl-base/Owl_algodiff_graph_convert/Make/argument-1-Core/index.html
@@ -1,2 +1,2 @@
-Core (owl-base.Owl_algodiff_graph_convert.Make.Core) Parameter Make.Core
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
+Core (owl-base.Owl_algodiff_graph_convert.Make.Core) Parameter Make.Core
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
diff --git a/docs/owl-base/Owl_algodiff_ops/Make/argument-1-Core/index.html b/docs/owl-base/Owl_algodiff_ops/Make/argument-1-Core/index.html
index eee55e17e..6f9ff432b 100644
--- a/docs/owl-base/Owl_algodiff_ops/Make/argument-1-Core/index.html
+++ b/docs/owl-base/Owl_algodiff_ops/Make/argument-1-Core/index.html
@@ -1,2 +1,2 @@
-Core (owl-base.Owl_algodiff_ops.Make.Core) Parameter Make.Core
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
+Core (owl-base.Owl_algodiff_ops.Make.Core) Parameter Make.Core
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
diff --git a/docs/owl-base/Owl_algodiff_ops_builder/Make/argument-1-Core/index.html b/docs/owl-base/Owl_algodiff_ops_builder/Make/argument-1-Core/index.html
index 431c1f0b6..88d8b892a 100644
--- a/docs/owl-base/Owl_algodiff_ops_builder/Make/argument-1-Core/index.html
+++ b/docs/owl-base/Owl_algodiff_ops_builder/Make/argument-1-Core/index.html
@@ -1,2 +1,2 @@
-Core (owl-base.Owl_algodiff_ops_builder.Make.Core) Parameter Make.Core
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
+Core (owl-base.Owl_algodiff_ops_builder.Make.Core) Parameter Make.Core
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
diff --git a/docs/owl-base/Owl_algodiff_reverse/Make/argument-1-C/index.html b/docs/owl-base/Owl_algodiff_reverse/Make/argument-1-C/index.html
index a225a2dfc..e5ad85038 100644
--- a/docs/owl-base/Owl_algodiff_reverse/Make/argument-1-C/index.html
+++ b/docs/owl-base/Owl_algodiff_reverse/Make/argument-1-C/index.html
@@ -1,2 +1,2 @@
-C (owl-base.Owl_algodiff_reverse.Make.C) Parameter Make.C
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
+C (owl-base.Owl_algodiff_reverse.Make.C) Parameter Make.C
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
diff --git a/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index 428d80057..963bdad87 100644
--- a/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_cpu_engine.Make_Nested.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_cpu_engine.Make_Nested.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/Optimiser/Operator/Symbol/index.html
index 9b54a442b..f7c8aacee 100644
--- a/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_cpu_engine.Make_Nested.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_cpu_engine.Make_Nested.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/index.html b/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/index.html
index 1959f41bc..ebe242204 100644
--- a/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/index.html
+++ b/docs/owl-base/Owl_computation_cpu_engine/Make_Nested/argument-1-Graph/index.html
@@ -1,33 +1,33 @@
-Graph (owl-base.Owl_computation_cpu_engine.Make_Nested.Graph) Parameter Make_Nested.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Graph (owl-base.Owl_computation_cpu_engine.Make_Nested.Graph) Parameter Make_Nested.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index 993055c56..fcdbc912a 100644
--- a/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_cpu_eval.Make.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_cpu_eval.Make.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/Optimiser/Operator/Symbol/index.html
index 0436531cd..a9e81ec71 100644
--- a/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_cpu_eval.Make.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_cpu_eval.Make.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/index.html b/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/index.html
index 16220fff3..0a45e105e 100644
--- a/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/index.html
+++ b/docs/owl-base/Owl_computation_cpu_eval/Make/argument-1-Graph/index.html
@@ -1,33 +1,33 @@
-Graph (owl-base.Owl_computation_cpu_eval.Make.Graph) Parameter Make.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Graph (owl-base.Owl_computation_cpu_eval.Make.Graph) Parameter Make.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index 7920378fd..5238a2d8c 100644
--- a/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_cpu_init.Make.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_cpu_init.Make.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/Optimiser/Operator/Symbol/index.html
index 0b1f16889..374916467 100644
--- a/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_cpu_init.Make.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_cpu_init.Make.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/index.html b/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/index.html
index 1a47efab4..eb7644c5f 100644
--- a/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/index.html
+++ b/docs/owl-base/Owl_computation_cpu_init/Make/argument-1-Graph/index.html
@@ -1,33 +1,33 @@
-Graph (owl-base.Owl_computation_cpu_init.Make.Graph) Parameter Make.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Graph (owl-base.Owl_computation_cpu_init.Make.Graph) Parameter Make.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index be6e51a1b..c3770504c 100644
--- a/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine.Flatten.Engine.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine.Flatten.Engine.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/Optimiser/Operator/Symbol/index.html
index b01e8c043..1a1549d88 100644
--- a/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_engine.Flatten.Engine.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_engine.Flatten.Engine.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/index.html b/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/index.html
index 22380e708..eb03bf8ed 100644
--- a/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/index.html
+++ b/docs/owl-base/Owl_computation_engine/Flatten/argument-1-Engine/Graph/index.html
@@ -1,33 +1,33 @@
-Graph (owl-base.Owl_computation_engine.Flatten.Engine.Graph) Module Engine.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Graph (owl-base.Owl_computation_engine.Flatten.Engine.Graph) Module Engine.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl-base/Owl_computation_engine/Make_Graph/argument-1-Device/index.html b/docs/owl-base/Owl_computation_engine/Make_Graph/argument-1-Device/index.html
index b97fb1fcd..f878eb075 100644
--- a/docs/owl-base/Owl_computation_engine/Make_Graph/argument-1-Device/index.html
+++ b/docs/owl-base/Owl_computation_engine/Make_Graph/argument-1-Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine.Make_Graph.Device) Parameter Make_Graph.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine.Make_Graph.Device) Parameter Make_Graph.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Device/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Device/index.html
index 5efb3e620..e2c71f230 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Device) Module Flatten_Sig.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Device) Module Flatten_Sig.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index 2edbdf24f..526d24b6e 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/Optimiser/Operator/Symbol/index.html
index 6b912ef63..5ddeda9db 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_engine_sig.Flatten_Sig.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_engine_sig.Flatten_Sig.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/index.html
index 821791cc0..b9b1ca54e 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Graph/index.html
@@ -1,33 +1,33 @@
-Graph (owl-base.Owl_computation_engine_sig.Flatten_Sig.Graph) Module Flatten_Sig.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Graph (owl-base.Owl_computation_engine_sig.Flatten_Sig.Graph) Module Flatten_Sig.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Operator/Symbol/Shape/Type/Device/index.html
index 68b478432..e11720af2 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Operator/Symbol/index.html
index c1aa76362..29415fd82 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_engine_sig.Flatten_Sig.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_engine_sig.Flatten_Sig.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index fed50578a..80f9bcbdd 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Optimiser/Operator/Symbol/index.html
index e75127b8c..6c18e1092 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_engine_sig.Flatten_Sig.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_engine_sig.Flatten_Sig.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Shape/Type/Device/index.html
index 27ca4d181..f3ebeeb18 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Symbol/Shape/Type/Device/index.html
index c1f674aa2..9e2670be6 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Symbol/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Symbol/index.html
index a1945f241..a951eac7c 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_engine_sig.Flatten_Sig.Symbol) Module Flatten_Sig.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_engine_sig.Flatten_Sig.Symbol) Module Flatten_Sig.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Type/Device/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Type/Device/index.html
index dc5681380..bd60973e1 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine_sig.Flatten_Sig.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/index.html
index 9639ed70f..39b5ed32c 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Flatten_Sig/index.html
@@ -1,36 +1,36 @@
-Flatten_Sig (owl-base.Owl_computation_engine_sig.Flatten_Sig) Module type Owl_computation_engine_sig.Flatten_Sig
include Owl_types_computation_engine.Sig
module Graph : Owl_computation_graph_sig.Sig
Core evaluation functions of the engine
val eval_arr : Graph.Optimiser.Operator.Symbol.Shape.Type.arr array -> unit
Execute actual computation included in each CGraph element (of output type ndarray) in an array.
val eval_elt : Graph.Optimiser.Operator.Symbol.Shape.Type.elt array -> unit
Execute actual computation included in each CGraph element (of output type float) in an array.
val eval_graph : Graph.graph -> unit
Execute actual computation of a computation graph.
include Owl_computation_graph_sig.Sig
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Flatten_Sig (owl-base.Owl_computation_engine_sig.Flatten_Sig) Module type Owl_computation_engine_sig.Flatten_Sig
include Owl_types_computation_engine.Sig
module Graph : Owl_computation_graph_sig.Sig
Core evaluation functions of the engine
val eval_arr : Graph.Optimiser.Operator.Symbol.Shape.Type.arr array -> unit
Execute actual computation included in each CGraph element (of output type ndarray) in an array.
val eval_elt : Graph.Optimiser.Operator.Symbol.Shape.Type.elt array -> unit
Execute actual computation included in each CGraph element (of output type float) in an array.
val eval_graph : Graph.graph -> unit
Execute actual computation of a computation graph.
include Owl_computation_graph_sig.Sig
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
include Owl_computation_optimiser_sig.Sig
module Operator : Owl_computation_operator_sig.Sig
Core functions
val estimate_complexity : 'a Owl_graph.node array -> int * int
TODO
val optimise : graph -> unit
optimise the graph structure
include Owl_computation_optimiser_sig.Sig
module Operator : Owl_computation_operator_sig.Sig
Core functions
val estimate_complexity : 'a Owl_graph.node array -> int * int
TODO
val optimise_nodes :
Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
unit
TODO
include Owl_computation_operator_sig.Sig
module Symbol : Owl_computation_symbol_sig.Sig
Vectorised functions
val noop : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
noop arr
performs no operation on the array arr
and returns it as is. This can be useful as a placeholder function. Returns the input array arr
.
val empty : int array -> Symbol.Shape.Type.arr
empty shape
creates an uninitialized array with the specified shape
. The contents of the array are undefined. Returns a new array with the given shape.
val zeros : int array -> Symbol.Shape.Type.arr
zeros shape
creates an array with the specified shape
, filled with zeros. Returns a new array with all elements initialized to zero.
val ones : int array -> Symbol.Shape.Type.arr
ones shape
creates an array with the specified shape
, filled with ones. Returns a new array with all elements initialized to one.
val create : int array -> Symbol.Shape.Type.elt -> Symbol.Shape.Type.arr
create shape value
creates an array with the specified shape
, filled with the given value
. Returns a new array with all elements initialized to value
.
val sequential :
?a:Symbol.Shape.Type.elt ->
@@ -450,7 +450,7 @@
Symbol.Shape.Type.arr
transpose ?axis arr
transposes the array arr
. If axis
is provided, the transpose is performed according to the specified axes. Returns a new array with the transposed data.
val to_rows : Symbol.Shape.Type.arr -> 'a array
to_rows arr
converts the array arr
into an array of row vectors. Returns an array where each element is a row from the original array.
val of_rows : Symbol.Shape.Type.arr array -> Symbol.Shape.Type.arr
of_rows rows
creates an array by stacking the row vectors in rows
. Returns a new array constructed from the row vectors.
val to_cols : Symbol.Shape.Type.arr -> 'a array
to_cols arr
converts the array arr
into an array of column vectors. Returns an array where each element is a column from the original array.
val of_cols : Symbol.Shape.Type.arr array -> Symbol.Shape.Type.arr
of_cols cols
creates an array by stacking the column vectors in cols
. Returns a new array constructed from the column vectors.
val of_array :
Symbol.Shape.Type.elt array ->
int array ->
- Symbol.Shape.Type.arr
of_array data shape
creates an array from a flat array data
with the specified shape
. Returns a new array with the data arranged according to the shape.
val of_arrays : Symbol.Shape.Type.elt array array -> Symbol.Shape.Type.arr
of_arrays data
creates an array from a 2D array data
, where each sub-array represents a row. Returns a new array with the data from the 2D array.
val to_arrays : Symbol.Shape.Type.arr -> Symbol.Shape.Type.elt array array
to_arrays arr
converts the array arr
into a 2D array where each sub-array represents a row. Returns a 2D array with the data from the original array.
Scalar functions
module Scalar : sig ... end
module Mat : sig ... end
module Linalg : sig ... end
include Owl_computation_symbol_sig.Sig
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+ Symbol.Shape.Type.arr
of_array data shape
creates an array from a flat array data
with the specified shape
. Returns a new array with the data arranged according to the shape.
val of_arrays : Symbol.Shape.Type.elt array array -> Symbol.Shape.Type.arr
of_arrays data
creates an array from a 2D array data
, where each sub-array represents a row. Returns a new array with the data from the 2D array.
val to_arrays : Symbol.Shape.Type.arr -> Symbol.Shape.Type.elt array array
to_arrays arr
converts the array arr
into a 2D array where each sub-array represents a row. Returns a 2D array with the data from the original array.
Scalar functions
module Scalar : sig ... end
module Mat : sig ... end
module Linalg : sig ... end
include Owl_computation_symbol_sig.Sig
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -458,11 +458,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
include Owl_computation_shape_sig.Sig
module Type : Owl_computation_type_sig.Sig
Core functions
val infer_shape :
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
include Owl_computation_shape_sig.Sig
module Type : Owl_computation_type_sig.Sig
Core functions
val infer_shape :
Type.op ->
Type.attr Owl_graph.node array ->
int array option array
TODO
include Owl_computation_type_sig.Sig
module Device : Owl_types_computation_device.Sig
Type definition
type t = attr Owl_graph.node
TODO
and block = {
size : int;
block_id : int;
mutable active : t option;
mutable memory : Device.value;
mutable nodes : t list;
}
block
type keeps a reference to a block of memory and to the nodes sharing that block.
and attr = {
mutable op : op;
mutable freeze : bool;
mutable reuse : bool;
mutable state : state;
mutable shape : int array option array;
mutable value : Device.value array;
mutable block : block array option;
}
TODO
and op =
| Noop
| Var
| Const
| Empty of int array
| Zeros of int array
| Ones of int array
| Create of int array
| Sequential of int array
| Uniform of int array
| Gaussian of int array
| Bernoulli of int array
| Init of int array * int -> elt
| Get of int array
| Set of int array
| GetSlice of int list list
| SetSlice of int list list
| GetFancy of Owl_types_common.index list
| SetFancy of Owl_types_common.index list
| Copy
| Reset
| Reshape of int array
| Reverse
| Tile of int array
| Repeat of int array
| Pad of elt * int list list
| Concatenate of int
| Stack of int
| Split of int * int array
| Draw of int * int
| Map of elt -> elt
| Fold of int * elt -> elt -> elt
| Scan of int * elt -> elt -> elt
| OneHot of int
| OfArray of int array
| Delay of Device.A.arr -> Device.A.arr
| DelayArray of int array * Device.A.arr array -> Device.A.arr
| LazyPrint of int option
* int option
* bool option
- * (Device.A.elt -> string) option
| Abs
| Neg
| Floor
| Ceil
| Round
| Sqr
| Sqrt
| Log
| Log2
| Log10
| Exp
| Sin
| Cos
| Tan
| Sinh
| Cosh
| Tanh
| Asin
| Acos
| Atan
| Asinh
| Acosh
| Atanh
| Min of bool * int
| Max of bool * int
| Sum of bool * int
| SumReduce of int array
| Signum
| Sigmoid
| Relu
| Dawsn
| Min'
| Max'
| Sum'
| LogSumExp'
| LogSumExp of bool * int
| L1norm'
| L2norm'
| L2NormSqr'
| ClipByValue
| ClipByL2norm
| Pow
| ScalarPow
| PowScalar
| Atan2
| ScalarAtan2
| Atan2Scalar
| Hypot
| Min2
| Max2
| Add
| Sub
| Mul
| Div
| AddScalar
| SubScalar
| MulScalar
| DivScalar
| ScalarAdd
| ScalarSub
| ScalarMul
| ScalarDiv
| FMA
| EltEqual
| EltNotEqual
| EltLess
| EltGreater
| EltLessEqual
| EltGreaterEqual
| EltEqualScalar
| EltNotEqualScalar
| EltLessScalar
| EltGreaterScalar
| EltLessEqualScalar
| EltGreaterEqualScalar
| Conv1d of Owl_types_common.padding * int array
| Conv2d of Owl_types_common.padding * int array
| Conv3d of Owl_types_common.padding * int array
| TransposeConv1d of Owl_types_common.padding * int array
| TransposeConv2d of Owl_types_common.padding * int array
| TransposeConv3d of Owl_types_common.padding * int array
| DilatedConv1d of Owl_types_common.padding * int array * int array
| DilatedConv2d of Owl_types_common.padding * int array * int array
| DilatedConv3d of Owl_types_common.padding * int array * int array
| MaxPool1d of Owl_types_common.padding * int array * int array
| MaxPool2d of Owl_types_common.padding * int array * int array
| MaxPool3d of Owl_types_common.padding * int array * int array
| AvgPool1d of Owl_types_common.padding * int array * int array
| AvgPool2d of Owl_types_common.padding * int array * int array
| AvgPool3d of Owl_types_common.padding * int array * int array
| UpSampling2d of int array
| Conv1dBackwardInput of int array
| Conv1dBackwardKernel of int array
| Conv2dBackwardInput of int array
| Conv2dBackwardKernel of int array
| Conv3dBackwardInput of int array
| Conv3dBackwardKernel of int array
| TransposeConv1dBackwardInput of int array
| TransposeConv1dBackwardKernel of int array
| TransposeConv2dBackwardInput of int array
| TransposeConv2dBackwardKernel of int array
| TransposeConv3dBackwardInput of int array
| TransposeConv3dBackwardKernel of int array
| DilatedConv1dBackwardInput of int array * int array
| DilatedConv1dBackwardKernel of int array * int array
| DilatedConv2dBackwardInput of int array * int array
| DilatedConv2dBackwardKernel of int array * int array
| DilatedConv3dBackwardInput of int array * int array
| DilatedConv3dBackwardKernel of int array * int array
| MaxPool1dBackward of Owl_types_common.padding * int array * int array
| MaxPool2dBackward of Owl_types_common.padding * int array * int array
| MaxPool3dBackward of Owl_types_common.padding * int array * int array
| AvgPool1dBackward of Owl_types_common.padding * int array * int array
| AvgPool2dBackward of Owl_types_common.padding * int array * int array
| AvgPool3dBackward of Owl_types_common.padding * int array * int array
| UpSampling2dBackward of int array
| RowNum
| ColNum
| Row
| Rows of int array
| CopyRowTo
| CopyColTo
| Dot of bool * bool * elt * elt
| Inv
| Trace
| Transpose of int array
| ToRows
| OfRows
| Scalar_Add
| Scalar_Sub
| Scalar_Mul
| Scalar_Div
| Scalar_Pow
| Scalar_Atan2
| Scalar_Abs
| Scalar_Neg
| Scalar_Sqr
| Scalar_Sqrt
| Scalar_Exp
| Scalar_Log
| Scalar_Log2
| Scalar_Log10
| Scalar_Signum
| Scalar_Floor
| Scalar_Ceil
| Scalar_Round
| Scalar_Sin
| Scalar_Cos
| Scalar_Tan
| Scalar_Sinh
| Scalar_Cosh
| Scalar_Tanh
| Scalar_Asin
| Scalar_Acos
| Scalar_Atan
| Scalar_Asinh
| Scalar_Acosh
| Scalar_Atanh
| Scalar_Relu
| Scalar_Dawsn
| Scalar_Sigmoid
| Fused_Adagrad of float * float
(*TODO
*)
include Owl_types_computation_device.Sig
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
val number : Owl_types_common.number
+ * (Device.A.elt -> string) option
| Abs
| Neg
| Floor
| Ceil
| Round
| Sqr
| Sqrt
| Log
| Log2
| Log10
| Exp
| Sin
| Cos
| Tan
| Sinh
| Cosh
| Tanh
| Asin
| Acos
| Atan
| Asinh
| Acosh
| Atanh
| Min of bool * int
| Max of bool * int
| Sum of bool * int
| SumReduce of int array
| Signum
| Sigmoid
| Relu
| Dawsn
| Min'
| Max'
| Sum'
| LogSumExp'
| LogSumExp of bool * int
| L1norm'
| L2norm'
| L2NormSqr'
| ClipByValue
| ClipByL2norm
| Pow
| ScalarPow
| PowScalar
| Atan2
| ScalarAtan2
| Atan2Scalar
| Hypot
| Min2
| Max2
| Add
| Sub
| Mul
| Div
| AddScalar
| SubScalar
| MulScalar
| DivScalar
| ScalarAdd
| ScalarSub
| ScalarMul
| ScalarDiv
| FMA
| EltEqual
| EltNotEqual
| EltLess
| EltGreater
| EltLessEqual
| EltGreaterEqual
| EltEqualScalar
| EltNotEqualScalar
| EltLessScalar
| EltGreaterScalar
| EltLessEqualScalar
| EltGreaterEqualScalar
| Conv1d of Owl_types_common.padding * int array
| Conv2d of Owl_types_common.padding * int array
| Conv3d of Owl_types_common.padding * int array
| TransposeConv1d of Owl_types_common.padding * int array
| TransposeConv2d of Owl_types_common.padding * int array
| TransposeConv3d of Owl_types_common.padding * int array
| DilatedConv1d of Owl_types_common.padding * int array * int array
| DilatedConv2d of Owl_types_common.padding * int array * int array
| DilatedConv3d of Owl_types_common.padding * int array * int array
| MaxPool1d of Owl_types_common.padding * int array * int array
| MaxPool2d of Owl_types_common.padding * int array * int array
| MaxPool3d of Owl_types_common.padding * int array * int array
| AvgPool1d of Owl_types_common.padding * int array * int array
| AvgPool2d of Owl_types_common.padding * int array * int array
| AvgPool3d of Owl_types_common.padding * int array * int array
| UpSampling2d of int array
| Conv1dBackwardInput of int array
| Conv1dBackwardKernel of int array
| Conv2dBackwardInput of int array
| Conv2dBackwardKernel of int array
| Conv3dBackwardInput of int array
| Conv3dBackwardKernel of int array
| TransposeConv1dBackwardInput of int array
| TransposeConv1dBackwardKernel of int array
| TransposeConv2dBackwardInput of int array
| TransposeConv2dBackwardKernel of int array
| TransposeConv3dBackwardInput of int array
| TransposeConv3dBackwardKernel of int array
| DilatedConv1dBackwardInput of int array * int array
| DilatedConv1dBackwardKernel of int array * int array
| DilatedConv2dBackwardInput of int array * int array
| DilatedConv2dBackwardKernel of int array * int array
| DilatedConv3dBackwardInput of int array * int array
| DilatedConv3dBackwardKernel of int array * int array
| MaxPool1dBackward of Owl_types_common.padding * int array * int array
| MaxPool2dBackward of Owl_types_common.padding * int array * int array
| MaxPool3dBackward of Owl_types_common.padding * int array * int array
| AvgPool1dBackward of Owl_types_common.padding * int array * int array
| AvgPool2dBackward of Owl_types_common.padding * int array * int array
| AvgPool3dBackward of Owl_types_common.padding * int array * int array
| UpSampling2dBackward of int array
| RowNum
| ColNum
| Row
| Rows of int array
| CopyRowTo
| CopyColTo
| Dot of bool * bool * elt * elt
| Inv
| Trace
| Transpose of int array
| ToRows
| OfRows
| Scalar_Add
| Scalar_Sub
| Scalar_Mul
| Scalar_Div
| Scalar_Pow
| Scalar_Atan2
| Scalar_Abs
| Scalar_Neg
| Scalar_Sqr
| Scalar_Sqrt
| Scalar_Exp
| Scalar_Log
| Scalar_Log2
| Scalar_Log10
| Scalar_Signum
| Scalar_Floor
| Scalar_Ceil
| Scalar_Round
| Scalar_Sin
| Scalar_Cos
| Scalar_Tan
| Scalar_Sinh
| Scalar_Cosh
| Scalar_Tanh
| Scalar_Asin
| Scalar_Acos
| Scalar_Atan
| Scalar_Asinh
| Scalar_Acosh
| Scalar_Atanh
| Scalar_Relu
| Scalar_Dawsn
| Scalar_Sigmoid
| Fused_Adagrad of float * float
(*TODO
*)include Owl_types_computation_device.Sig
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
val number : Owl_types_common.number
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index dfb60dae5..01ea8c130 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_engine_sig.Make_Graph_Sig.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_engine_sig.Make_Graph_Sig.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/Optimiser/Operator/Symbol/index.html
index 9ef99a2f9..d70746072 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_engine_sig.Make_Graph_Sig.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_engine_sig.Make_Graph_Sig.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/index.html b/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/index.html
index 15b81226e..c525514ab 100644
--- a/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/index.html
+++ b/docs/owl-base/Owl_computation_engine_sig/module-type-Make_Graph_Sig/index.html
@@ -1,33 +1,33 @@
-Make_Graph_Sig (owl-base.Owl_computation_engine_sig.Make_Graph_Sig) Module type Owl_computation_engine_sig.Make_Graph_Sig
include Owl_computation_graph_sig.Sig
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Make_Graph_Sig (owl-base.Owl_computation_engine_sig.Make_Graph_Sig) Module type Owl_computation_engine_sig.Make_Graph_Sig
include Owl_computation_graph_sig.Sig
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl-base/Owl_computation_graph/Make/argument-1-Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_graph/Make/argument-1-Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index 5b0e9f747..0717c4518 100644
--- a/docs/owl-base/Owl_computation_graph/Make/argument-1-Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_graph/Make/argument-1-Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_graph.Make.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_graph.Make.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_graph/Make/argument-1-Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_graph/Make/argument-1-Optimiser/Operator/Symbol/index.html
index 2d0abcd38..1e68db6dc 100644
--- a/docs/owl-base/Owl_computation_graph/Make/argument-1-Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_graph/Make/argument-1-Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_graph.Make.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_graph.Make.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index 7cd32ae30..a80c6e846 100644
--- a/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_graph_sig.Sig.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_graph_sig.Sig.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/Optimiser/Operator/Symbol/index.html
index 9b5cf481f..208644ec7 100644
--- a/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_graph_sig.Sig.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_graph_sig.Sig.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/index.html b/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/index.html
index 75728aaec..b4d7dcaaa 100644
--- a/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/index.html
+++ b/docs/owl-base/Owl_computation_graph_sig/module-type-Sig/index.html
@@ -1,33 +1,33 @@
-Sig (owl-base.Owl_computation_graph_sig.Sig) Module type Owl_computation_graph_sig.Sig
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Sig (owl-base.Owl_computation_graph_sig.Sig) Module type Owl_computation_graph_sig.Sig
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl-base/Owl_computation_operator/Make/argument-1-Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_operator/Make/argument-1-Symbol/Shape/Type/Device/index.html
index 4e65b0fb5..6763786d5 100644
--- a/docs/owl-base/Owl_computation_operator/Make/argument-1-Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_operator/Make/argument-1-Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_operator.Make.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_operator.Make.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_operator/Make/argument-1-Symbol/index.html b/docs/owl-base/Owl_computation_operator/Make/argument-1-Symbol/index.html
index 5ba99e85a..42107b9e3 100644
--- a/docs/owl-base/Owl_computation_operator/Make/argument-1-Symbol/index.html
+++ b/docs/owl-base/Owl_computation_operator/Make/argument-1-Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_operator.Make.Symbol) Parameter Make.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_operator.Make.Symbol) Parameter Make.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_operator_sig/module-type-Sig/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_operator_sig/module-type-Sig/Symbol/Shape/Type/Device/index.html
index 1e80f1fa6..36da5756e 100644
--- a/docs/owl-base/Owl_computation_operator_sig/module-type-Sig/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_operator_sig/module-type-Sig/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_operator_sig.Sig.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_operator_sig.Sig.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_operator_sig/module-type-Sig/Symbol/index.html b/docs/owl-base/Owl_computation_operator_sig/module-type-Sig/Symbol/index.html
index e0e2d61b9..6011af62d 100644
--- a/docs/owl-base/Owl_computation_operator_sig/module-type-Sig/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_operator_sig/module-type-Sig/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_operator_sig.Sig.Symbol) Module Sig.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_operator_sig.Sig.Symbol) Module Sig.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_optimiser/Make/argument-1-Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_optimiser/Make/argument-1-Operator/Symbol/Shape/Type/Device/index.html
index 8edff486c..7d9619d99 100644
--- a/docs/owl-base/Owl_computation_optimiser/Make/argument-1-Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_optimiser/Make/argument-1-Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_optimiser.Make.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_optimiser.Make.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_optimiser/Make/argument-1-Operator/Symbol/index.html b/docs/owl-base/Owl_computation_optimiser/Make/argument-1-Operator/Symbol/index.html
index 00ebdca45..01d4b860c 100644
--- a/docs/owl-base/Owl_computation_optimiser/Make/argument-1-Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_optimiser/Make/argument-1-Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_optimiser.Make.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_optimiser.Make.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_optimiser_sig/module-type-Sig/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_optimiser_sig/module-type-Sig/Operator/Symbol/Shape/Type/Device/index.html
index d8b6a5edd..baa4c46f9 100644
--- a/docs/owl-base/Owl_computation_optimiser_sig/module-type-Sig/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_optimiser_sig/module-type-Sig/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_optimiser_sig.Sig.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_optimiser_sig.Sig.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_optimiser_sig/module-type-Sig/Operator/Symbol/index.html b/docs/owl-base/Owl_computation_optimiser_sig/module-type-Sig/Operator/Symbol/index.html
index 17c4a6aa8..57857422b 100644
--- a/docs/owl-base/Owl_computation_optimiser_sig/module-type-Sig/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_computation_optimiser_sig/module-type-Sig/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_computation_optimiser_sig.Sig.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_computation_optimiser_sig.Sig.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_shape/Make/argument-1-Type/Device/index.html b/docs/owl-base/Owl_computation_shape/Make/argument-1-Type/Device/index.html
index 3ded8638b..194385ce2 100644
--- a/docs/owl-base/Owl_computation_shape/Make/argument-1-Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_shape/Make/argument-1-Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_shape.Make.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_shape.Make.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_shape_sig/module-type-Sig/Type/Device/index.html b/docs/owl-base/Owl_computation_shape_sig/module-type-Sig/Type/Device/index.html
index 3aa2e2b28..85c16e636 100644
--- a/docs/owl-base/Owl_computation_shape_sig/module-type-Sig/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_shape_sig/module-type-Sig/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_shape_sig.Sig.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_shape_sig.Sig.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_symbol/Make/argument-1-Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_symbol/Make/argument-1-Shape/Type/Device/index.html
index 108fd94c7..4757e08c7 100644
--- a/docs/owl-base/Owl_computation_symbol/Make/argument-1-Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_symbol/Make/argument-1-Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_symbol.Make.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_symbol.Make.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_symbol_sig/module-type-Sig/Shape/Type/Device/index.html b/docs/owl-base/Owl_computation_symbol_sig/module-type-Sig/Shape/Type/Device/index.html
index cb081737f..a4fe1a081 100644
--- a/docs/owl-base/Owl_computation_symbol_sig/module-type-Sig/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_computation_symbol_sig/module-type-Sig/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_symbol_sig.Sig.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_symbol_sig.Sig.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_symbol_sig/module-type-Sig/index.html b/docs/owl-base/Owl_computation_symbol_sig/module-type-Sig/index.html
index 80397f456..a0b90ac55 100644
--- a/docs/owl-base/Owl_computation_symbol_sig/module-type-Sig/index.html
+++ b/docs/owl-base/Owl_computation_symbol_sig/module-type-Sig/index.html
@@ -1,5 +1,5 @@
-Sig (owl-base.Owl_computation_symbol_sig.Sig) Module type Owl_computation_symbol_sig.Sig
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Sig (owl-base.Owl_computation_symbol_sig.Sig) Module type Owl_computation_symbol_sig.Sig
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_computation_type/Make/argument-1-Device/index.html b/docs/owl-base/Owl_computation_type/Make/argument-1-Device/index.html
index f434f2129..570bce172 100644
--- a/docs/owl-base/Owl_computation_type/Make/argument-1-Device/index.html
+++ b/docs/owl-base/Owl_computation_type/Make/argument-1-Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_type.Make.Device) Parameter Make.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_type.Make.Device) Parameter Make.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_computation_type_sig/module-type-Sig/Device/index.html b/docs/owl-base/Owl_computation_type_sig/module-type-Sig/Device/index.html
index 4babd3c46..c13986636 100644
--- a/docs/owl-base/Owl_computation_type_sig/module-type-Sig/Device/index.html
+++ b/docs/owl-base/Owl_computation_type_sig/module-type-Sig/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_computation_type_sig.Sig.Device) Module Sig.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_computation_type_sig.Sig.Device) Module Sig.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_lazy/Make/index.html b/docs/owl-base/Owl_lazy/Make/index.html
index 21b44bff7..afa128f4a 100644
--- a/docs/owl-base/Owl_lazy/Make/index.html
+++ b/docs/owl-base/Owl_lazy/Make/index.html
@@ -1,5 +1,5 @@
-Make (owl-base.Owl_lazy.Make) Module Owl_lazy.Make
Parameters
module A : Owl_types.Ndarray_Mutable
Signature
Type definition
Type conversion functions
val value_to_float : value -> float
TODO
val node_to_arr : attr Owl_graph.node -> arr
TODO
val arr_to_node : arr -> attr Owl_graph.node
TODO
val node_to_elt : attr Owl_graph.node -> elt
TODO
val elt_to_node : elt -> attr Owl_graph.node
TODO
val float_to_elt : float -> elt
TODO
val elt_to_float : elt -> float
TODO
Utility functions
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
Create variables
val var_arr : ?shape:int array -> string -> arr
TODO
val var_elt : string -> elt
TODO
Maths functions
val empty : int array -> arr
empty shape
creates an uninitialized array with the specified shape
.
val zeros : int array -> arr
zeros shape
creates an array of the specified shape
filled with zeros.
val ones : int array -> arr
ones shape
creates an array of the specified shape
filled with ones.
create shape value
creates an array of the specified shape
filled with the given value
.
sequential ?a ?step shape
creates an array of the specified shape
filled with sequential values starting from a
and incremented by step
.
uniform ?a ?b shape
creates an array of the specified shape
filled with values drawn from a uniform distribution between a
and b
.
gaussian ?mu ?sigma shape
creates an array of the specified shape
filled with values drawn from a Gaussian distribution with mean mu
and standard deviation sigma
.
bernoulli ?p shape
creates an array of the specified shape
filled with values drawn from a Bernoulli distribution with probability p
.
init shape f
creates an array of the specified shape
where each element is initialized by the function f
, which takes the index of the element as input.
val shape : arr -> int array
shape arr
returns the shape of the array arr
.
val numel : arr -> int
numel arr
returns the total number of elements in the array arr
.
get arr indices
retrieves the value at the specified indices
from the array arr
.
set arr indices value
sets the value at the specified indices
in the array arr
to value
.
get_slice slice_spec arr
extracts a slice from the array arr
according to the slice specification slice_spec
.
set_slice slice_spec src dst
sets the specified slice in the array dst
to the values from src
according to the slice specification slice_spec
.
val reset : arr -> unit
reset arr
resets all elements in the array arr
to zero.
reshape arr shape
returns a new array with the elements of arr
rearranged into the specified shape
.
reverse arr
returns a new array with the elements of arr
reversed along all axes.
tile arr reps
creates a new array by repeating the array arr
according to the repetition pattern reps
.
repeat arr reps
repeats the elements of arr
along each axis according to the repetition pattern reps
.
concatenate ?axis arrs
concatenates the arrays in arrs
along the specified axis
.
split ?axis indices arr
splits the array arr
into multiple sub-arrays along the specified axis
at the given indices
.
draw ?axis arr n
randomly selects n
elements from the array arr
along the specified axis
, returning the selected elements and their corresponding indices.
map f arr
applies the function f
to each element of the array arr
, returning a new array with the results.
fold ?axis f init arr
reduces the array arr
along the specified axis
using the function f
, starting with the initial value init
.
scan ?axis f arr
performs a cumulative reduction of the array arr
along the specified axis
using the function f
.
one_hot depth arr
converts the array arr
into a one-hot encoded array with the specified depth.
val lazy_print :
+Make (owl-base.Owl_lazy.Make) Module Owl_lazy.Make
Parameters
module A : Owl_types.Ndarray_Mutable
Signature
Type definition
Type conversion functions
val value_to_float : value -> float
retrieve float type from value type input
val node_to_arr : attr Owl_graph.node -> arr
get Arr type from node
val arr_to_node : arr -> attr Owl_graph.node
pack Arr type into node
val node_to_elt : attr Owl_graph.node -> elt
get Elt type from node
val elt_to_node : elt -> attr Owl_graph.node
pack Elt type into node
val float_to_elt : float -> elt
build Elt type to float
val elt_to_float : elt -> float
get float value from Elt type
Utility functions
val graph_to_dot : graph -> string
convert graph to dot string, which can be saved into file and later rendered into figures to show graph structure
val graph_to_trace : graph -> string
print graph structure
Create variables
val var_arr : ?shape:int array -> string -> arr
create Arr
val var_elt : string -> elt
create Elt
Maths functions
val empty : int array -> arr
empty shape
creates an uninitialized array with the specified shape
.
val zeros : int array -> arr
zeros shape
creates an array of the specified shape
filled with zeros.
val ones : int array -> arr
ones shape
creates an array of the specified shape
filled with ones.
create shape value
creates an array of the specified shape
filled with the given value
.
sequential ?a ?step shape
creates an array of the specified shape
filled with sequential values starting from a
and incremented by step
.
uniform ?a ?b shape
creates an array of the specified shape
filled with values drawn from a uniform distribution between a
and b
.
gaussian ?mu ?sigma shape
creates an array of the specified shape
filled with values drawn from a Gaussian distribution with mean mu
and standard deviation sigma
.
bernoulli ?p shape
creates an array of the specified shape
filled with values drawn from a Bernoulli distribution with probability p
.
init shape f
creates an array of the specified shape
where each element is initialized by the function f
, which takes the index of the element as input.
val shape : arr -> int array
shape arr
returns the shape of the array arr
.
val numel : arr -> int
numel arr
returns the total number of elements in the array arr
.
get arr indices
retrieves the value at the specified indices
from the array arr
.
set arr indices value
sets the value at the specified indices
in the array arr
to value
.
get_slice slice_spec arr
extracts a slice from the array arr
according to the slice specification slice_spec
.
set_slice slice_spec src dst
sets the specified slice in the array dst
to the values from src
according to the slice specification slice_spec
.
val reset : arr -> unit
reset arr
resets all elements in the array arr
to zero.
reshape arr shape
returns a new array with the elements of arr
rearranged into the specified shape
.
reverse arr
returns a new array with the elements of arr
reversed along all axes.
tile arr reps
creates a new array by repeating the array arr
according to the repetition pattern reps
.
repeat arr reps
repeats the elements of arr
along each axis according to the repetition pattern reps
.
concatenate ?axis arrs
concatenates the arrays in arrs
along the specified axis
.
split ?axis indices arr
splits the array arr
into multiple sub-arrays along the specified axis
at the given indices
.
draw ?axis arr n
randomly selects n
elements from the array arr
along the specified axis
, returning the selected elements and their corresponding indices.
map f arr
applies the function f
to each element of the array arr
, returning a new array with the results.
fold ?axis f init arr
reduces the array arr
along the specified axis
using the function f
, starting with the initial value init
.
scan ?axis f arr
performs a cumulative reduction of the array arr
along the specified axis
using the function f
.
one_hot depth arr
converts the array arr
into a one-hot encoded array with the specified depth.
val lazy_print :
?max_row:int ->
?max_col:int ->
?header:bool ->
@@ -80,8 +80,8 @@
input:attr Owl_graph.node array ->
output:attr Owl_graph.node array ->
string ->
- graph
TODO
val get_inputs : graph -> attr Owl_graph.node array
TODO
val get_outputs : graph -> attr Owl_graph.node array
TODO
val make_iopair :
+ graph
build a computation graph
val get_inputs : graph -> attr Owl_graph.node array
get input nodes of graph
val get_outputs : graph -> attr Owl_graph.node array
get output nodes of graph
val make_iopair :
graph ->
attr Owl_graph.node array ->
attr Owl_graph.node array ->
- unit
TODO
val update_iopair : graph -> unit
TODO
val init_inputs : (attr Owl_graph.node -> value) -> graph -> unit
TODO
val optimise : graph -> unit
TODO
val eval_elt : elt array -> unit
TODO
val eval_arr : arr array -> unit
TODO
val eval_graph : graph -> unit
TODO
+ unit
connect iopairs in a graph
val update_iopair : graph -> unit
update iopairs in a graph
val init_inputs : (attr Owl_graph.node -> value) -> graph -> unit
initialize input nodes of a graph with given function f
val optimise : graph -> unit
optimise graph structures
val eval_elt : elt array -> unit
evaluate each Elt element in an array
val eval_arr : arr array -> unit
evaluate each Arr element in an array
val eval_graph : graph -> unit
evaluate all nodes in a computation graph
diff --git a/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index 411d00aad..bdc5d6a19 100644
--- a/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_neural_compiler.Make.E.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_neural_compiler.Make.E.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/Optimiser/Operator/Symbol/index.html
index 80338cd9b..b7a55df9f 100644
--- a/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_neural_compiler.Make.E.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_neural_compiler.Make.E.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/index.html b/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/index.html
index babb9ad75..56af65a83 100644
--- a/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/index.html
+++ b/docs/owl-base/Owl_neural_compiler/Make/argument-1-E/Graph/index.html
@@ -1,33 +1,33 @@
-Graph (owl-base.Owl_neural_compiler.Make.E.Graph) Module E.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Graph (owl-base.Owl_neural_compiler.Make.E.Graph) Module E.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl-base/Owl_neural_generic/Flatten/argument-1-Graph/Neuron/Optimise/Algodiff/index.html b/docs/owl-base/Owl_neural_generic/Flatten/argument-1-Graph/Neuron/Optimise/Algodiff/index.html
index 895b1edc4..a8e82f7b2 100644
--- a/docs/owl-base/Owl_neural_generic/Flatten/argument-1-Graph/Neuron/Optimise/Algodiff/index.html
+++ b/docs/owl-base/Owl_neural_generic/Flatten/argument-1-Graph/Neuron/Optimise/Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl-base.Owl_neural_generic.Flatten.Graph.Neuron.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl-base.Owl_neural_generic.Flatten.Graph.Neuron.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_neural_graph/Make/argument-1-Neuron/Optimise/Algodiff/index.html b/docs/owl-base/Owl_neural_graph/Make/argument-1-Neuron/Optimise/Algodiff/index.html
index 9f98a65ed..b50dbca34 100644
--- a/docs/owl-base/Owl_neural_graph/Make/argument-1-Neuron/Optimise/Algodiff/index.html
+++ b/docs/owl-base/Owl_neural_graph/Make/argument-1-Neuron/Optimise/Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl-base.Owl_neural_graph.Make.Neuron.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl-base.Owl_neural_graph.Make.Neuron.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_neural_graph_sig/module-type-Sig/Neuron/Optimise/Algodiff/index.html b/docs/owl-base/Owl_neural_graph_sig/module-type-Sig/Neuron/Optimise/Algodiff/index.html
index 056b2af84..7f81f0a5b 100644
--- a/docs/owl-base/Owl_neural_graph_sig/module-type-Sig/Neuron/Optimise/Algodiff/index.html
+++ b/docs/owl-base/Owl_neural_graph_sig/module-type-Sig/Neuron/Optimise/Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl-base.Owl_neural_graph_sig.Sig.Neuron.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl-base.Owl_neural_graph_sig.Sig.Neuron.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_neural_neuron/Make/argument-1-Optimise/Algodiff/index.html b/docs/owl-base/Owl_neural_neuron/Make/argument-1-Optimise/Algodiff/index.html
index b20fb4a98..10fb975a5 100644
--- a/docs/owl-base/Owl_neural_neuron/Make/argument-1-Optimise/Algodiff/index.html
+++ b/docs/owl-base/Owl_neural_neuron/Make/argument-1-Optimise/Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl-base.Owl_neural_neuron.Make.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl-base.Owl_neural_neuron.Make.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_neural_neuron_sig/module-type-Sig/Optimise/Algodiff/index.html b/docs/owl-base/Owl_neural_neuron_sig/module-type-Sig/Optimise/Algodiff/index.html
index 8ae5f5456..0258a060e 100644
--- a/docs/owl-base/Owl_neural_neuron_sig/module-type-Sig/Optimise/Algodiff/index.html
+++ b/docs/owl-base/Owl_neural_neuron_sig/module-type-Sig/Optimise/Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl-base.Owl_neural_neuron_sig.Sig.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl-base.Owl_neural_neuron_sig.Sig.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_optimise_generic/Make/argument-1-Algodiff/index.html b/docs/owl-base/Owl_optimise_generic/Make/argument-1-Algodiff/index.html
index b0e74ba49..95f12c7f2 100644
--- a/docs/owl-base/Owl_optimise_generic/Make/argument-1-Algodiff/index.html
+++ b/docs/owl-base/Owl_optimise_generic/Make/argument-1-Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl-base.Owl_optimise_generic.Make.Algodiff) Parameter Make.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl-base.Owl_optimise_generic.Make.Algodiff) Parameter Make.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_optimise_generic_sig/module-type-Sig/Algodiff/index.html b/docs/owl-base/Owl_optimise_generic_sig/module-type-Sig/Algodiff/index.html
index 3f0bd6ef8..c325f9956 100644
--- a/docs/owl-base/Owl_optimise_generic_sig/module-type-Sig/Algodiff/index.html
+++ b/docs/owl-base/Owl_optimise_generic_sig/module-type-Sig/Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl-base.Owl_optimise_generic_sig.Sig.Algodiff) Module Sig.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl-base.Owl_optimise_generic_sig.Sig.Algodiff) Module Sig.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl-base/Owl_types/module-type-Computation_Device/index.html b/docs/owl-base/Owl_types/module-type-Computation_Device/index.html
index 810840a28..291b7da1f 100644
--- a/docs/owl-base/Owl_types/module-type-Computation_Device/index.html
+++ b/docs/owl-base/Owl_types/module-type-Computation_Device/index.html
@@ -1,2 +1,2 @@
-Computation_Device (owl-base.Owl_types.Computation_Device) Module type Owl_types.Computation_Device
include Owl_types_computation_device.Sig
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Computation_Device (owl-base.Owl_types.Computation_Device) Module type Owl_types.Computation_Device
include Owl_types_computation_device.Sig
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_types_computation_device/module-type-Sig/index.html b/docs/owl-base/Owl_types_computation_device/module-type-Sig/index.html
index 40cf53df6..84d611720 100644
--- a/docs/owl-base/Owl_types_computation_device/module-type-Sig/index.html
+++ b/docs/owl-base/Owl_types_computation_device/module-type-Sig/index.html
@@ -1,2 +1,2 @@
-Sig (owl-base.Owl_types_computation_device.Sig) Module type Owl_types_computation_device.Sig
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Sig (owl-base.Owl_types_computation_device.Sig) Module type Owl_types_computation_device.Sig
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html b/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
index bbca23023..528435786 100644
--- a/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
+++ b/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/Optimiser/Operator/Symbol/Shape/Type/Device/index.html
@@ -1,2 +1,2 @@
-Device (owl-base.Owl_types_computation_engine.Sig.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
TODO
val value_to_float : value -> float
TODO
val is_arr : value -> bool
TODO
val is_elt : value -> bool
TODO
+Device (owl-base.Owl_types_computation_engine.Sig.Graph.Optimiser.Operator.Symbol.Shape.Type.Device) Module Type.Device
module A : Owl_types_ndarray_mutable.Sig
Type definition
Core functions
val make_device : unit -> device
val value_to_float : value -> float
val is_arr : value -> bool
val is_elt : value -> bool
diff --git a/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/Optimiser/Operator/Symbol/index.html b/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/Optimiser/Operator/Symbol/index.html
index 5980aea16..b6539ac39 100644
--- a/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/Optimiser/Operator/Symbol/index.html
+++ b/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/Optimiser/Operator/Symbol/index.html
@@ -1,5 +1,5 @@
-Symbol (owl-base.Owl_types_computation_engine.Sig.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
TODO
val is_random_variable : Shape.Type.op -> bool
TODO
val refnum : 'a Owl_graph.node -> int
TODO
val node_shape : Shape.Type.attr Owl_graph.node -> int array
TODO
val node_numel : Shape.Type.attr Owl_graph.node -> int
TODO
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
TODO
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
TODO
val node_to_str : Shape.Type.attr Owl_graph.node -> string
TODO
val node_to_arr : Shape.Type.t -> Shape.Type.arr
TODO
val arr_to_node : Shape.Type.arr -> Shape.Type.t
TODO
val node_to_elt : Shape.Type.t -> Shape.Type.elt
TODO
val elt_to_node : Shape.Type.elt -> Shape.Type.t
TODO
val make_node :
+Symbol (owl-base.Owl_types_computation_engine.Sig.Graph.Optimiser.Operator.Symbol) Module Operator.Symbol
module Shape : Owl_computation_shape_sig.Sig
Core functions
val op_to_str : Shape.Type.op -> string
return the name of the operator as string
val is_random_variable : Shape.Type.op -> bool
check if operator is randon variable
val refnum : 'a Owl_graph.node -> int
return the reference number of the given node
val node_shape : Shape.Type.attr Owl_graph.node -> int array
return the shape of a node
val node_numel : Shape.Type.attr Owl_graph.node -> int
return the number of elements of a node
val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool
check if the shape of the input node is unknown
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
automatically infer the shape of input node according to its descendents' shapes
helper function; return the input array in string format.
val node_to_str : Shape.Type.attr Owl_graph.node -> string
print node's information to string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
Wrap computation graph node in an array type
val arr_to_node : Shape.Type.arr -> Shape.Type.t
Unwrap the array type to get the computation graph node within
val node_to_elt : Shape.Type.t -> Shape.Type.elt
Wrap computation graph node in an Elt type
val elt_to_node : Shape.Type.elt -> Shape.Type.t
Unwrap the Elt type to get the computation graph node within
val make_node :
?name:string ->
?value:Shape.Type.Device.value array ->
?shape:int array option array ->
@@ -7,11 +7,11 @@
?reuse:bool ->
?state:Shape.Type.state ->
Shape.Type.op ->
- Shape.Type.attr Owl_graph.node
TODO
val make_then_connect :
+ Shape.Type.attr Owl_graph.node
crate a computation graph node
val make_then_connect :
?shape:int array option array ->
Shape.Type.op ->
Shape.Type.attr Owl_graph.node array ->
- Shape.Type.attr Owl_graph.node
TODO
val var_arr : ?shape:int array -> string -> Shape.Type.arr
TODO
val var_elt : string -> Shape.Type.elt
TODO
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
+ Shape.Type.attr Owl_graph.node
make nodes and then connect parents and children
val var_arr : ?shape:int array -> string -> Shape.Type.arr
creat a node and wrap in Arr type
val var_elt : string -> Shape.Type.elt
creat a node and wrap in Elt type
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
get ndarray value from input and create an node and wrap in Arr type
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
get value from input and create an node and wrap in Elt type
val make_empty_block : ?block_id:int -> int -> Shape.Type.block
make_empty_block s
returns an empty block of memory of size s
.
val make_value_block :
Shape.Type.Device.value ->
Shape.Type.attr Owl_graph.node ->
unit
make_value_block value node
creates a block of memory initialised with value
and links the new block to node
.
val get_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block array
get_block node
returns the memory block allocated to node
. If no block is allocated, throws an exception.
Update the node that is currently using the block of memory.
val get_block_id : Shape.Type.attr Owl_graph.node -> int
get_block_id node
returns the id of the block assigned to node
. If node
has not been assigned yet, returns -1
.
val set_value :
Shape.Type.attr Owl_graph.node ->
Shape.Type.Device.value array ->
- unit
TODO
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
TODO
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
TODO
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
TODO
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
TODO
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
TODO
TODO
set the arrays of value to cgraph node
val get_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array
get the arrays of value of cgraph node
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
set the operator of cgraph node
val get_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op
get the operator of cgraph node
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
set reuse attribute in a node
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
get reuse attribute in a node
check of the data block of memory is shared in a node
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_const : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
TODO
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
TODO
val validate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate : Shape.Type.attr Owl_graph.node -> unit
TODO
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
TODO
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
TODO
val freeze : Shape.Type.attr Owl_graph.node -> unit
TODO
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
TODO
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
TODO
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
TODO
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
TODO
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
TODO
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
TODO
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
TODO
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
TODO
val float_to_elt : float -> Shape.Type.elt
TODO
val elt_to_float : Shape.Type.elt -> float
TODO
+ Shape.Type.attr Owl_graph.node array
get_shared_nodes node
returns the nodes sharing the same block of memory as node
.
val is_var : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Var type
val is_const : Shape.Type.attr Owl_graph.node -> bool
check if the node's operator is Const type
val is_node_arr : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an ndarray
val is_node_elt : Shape.Type.attr Owl_graph.node -> bool
check the shape of a node's attr and return if it indicates an elt
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
is_assigned node
checks if a block of memory has been assigned to node
.
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
check_assigned node
throws an exception if node
has not been assigned to a block.
val is_valid : Shape.Type.attr Owl_graph.node -> bool
check if the state attribute of a node is Valid
val validate : Shape.Type.attr Owl_graph.node -> unit
set Valid to the state attribute of a node
val invalidate : Shape.Type.attr Owl_graph.node -> unit
set Invalid to the state attribute of a node
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
iteratively invalidate the nodes in a graph
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
check the freeze attribute of a node
val freeze : Shape.Type.attr Owl_graph.node -> unit
return the freeze attribute of a node
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the descendants of a node
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
iteratively freeze the ancestors of a node
val pack_arr : Shape.Type.Device.A.arr -> Shape.Type.arr
pack an A.arr type input into Arr type
val unpack_arr : Shape.Type.arr -> Shape.Type.Device.A.arr
unpack input into A.arr type
val pack_elt : Shape.Type.Device.A.elt -> Shape.Type.elt
pack an A.elt type input into Elt type
val unpack_elt : Shape.Type.elt -> Shape.Type.Device.A.elt
unpack input into A.elt type
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
assign Arr type value
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
assign Elt type value
val float_to_elt : float -> Shape.Type.elt
build an Elt type based on float value
val elt_to_float : Shape.Type.elt -> float
retrive a float value from an Elt type value
diff --git a/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/index.html b/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/index.html
index cca269e39..a30479ed0 100644
--- a/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/index.html
+++ b/docs/owl-base/Owl_types_computation_engine/module-type-Sig/Graph/index.html
@@ -1,33 +1,33 @@
-Graph (owl-base.Owl_types_computation_engine.Sig.Graph) Module Sig.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
TODO
val graph_to_dot : graph -> string
TODO
val graph_to_trace : graph -> string
TODO
val collect_rvs :
+Graph (owl-base.Owl_types_computation_engine.Sig.Graph) Module Sig.Graph
Type definition
Core functions
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
print shape for ndarrays, whilst value for scalars
val graph_to_dot : graph -> string
generate a string that can be written to a .dot file to draw the graph
val graph_to_trace : graph -> string
print the graph structure to a string
save the graph object to a file with given name, using marshall format
val collect_rvs :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val invalidate_rvs : graph -> unit
TODO
val make_graph :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
traverse each node in the input array, and return the random variable type nodes.
val invalidate_rvs : graph -> unit
TODO
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
TODO
val get_inputs :
+ graph
Build a graph based on input nodes, output nodes, and graph name
val get_inputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_outputs :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get input nodes of a graph
val get_outputs :
graph ->
- Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
TODO
val get_node_arr_val :
+ Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node array
get output nodes of a graph
val get_node_arr_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
- Optimiser.Operator.Symbol.Shape.Type.Device.A.arr
TODO
val get_node_elt_val :
+ 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
TODO
val set_node_arr_val :
+ 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
TODO
val set_node_elt_val :
Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value ->
- unit
TODO
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
TODO
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
TODO
val update_iopair : graph -> unit
TODO
create an iopair between the input nodes and output nodes in a graph
val update_iopair : graph -> unit
val remove_unused_iopair :
'a Owl_graph.node array ->
'b array ->
- 'a Owl_graph.node array * 'b array
TODO
val init_inputs :
+ 'a Owl_graph.node array * 'b array
remove unuserd iopair from an array of nodes
val init_inputs :
(Optimiser.Operator.Symbol.Shape.Type.attr Owl_graph.node ->
Optimiser.Operator.Symbol.Shape.Type.Device.value) ->
graph ->
- unit
TODO
val optimise : graph -> unit
TODO
+ unit
initialize inputs nodes of a graph with given function f
val optimise : graph -> unit
optimise the graph structure
diff --git a/docs/owl/Owl_regression_generic/Make/argument-1-Optimise/Algodiff/index.html b/docs/owl/Owl_regression_generic/Make/argument-1-Optimise/Algodiff/index.html
index ed2700a91..fcd8395cb 100644
--- a/docs/owl/Owl_regression_generic/Make/argument-1-Optimise/Algodiff/index.html
+++ b/docs/owl/Owl_regression_generic/Make/argument-1-Optimise/Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl.Owl_regression_generic.Make.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl.Owl_regression_generic.Make.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
with type t := t
and type elt := A.elt
and type arr := A.arr
diff --git a/docs/owl/Owl_regression_generic_sig/module-type-Sig/Optimise/Algodiff/index.html b/docs/owl/Owl_regression_generic_sig/module-type-Sig/Optimise/Algodiff/index.html
index 63de134ab..354375ecb 100644
--- a/docs/owl/Owl_regression_generic_sig/module-type-Sig/Optimise/Algodiff/index.html
+++ b/docs/owl/Owl_regression_generic_sig/module-type-Sig/Optimise/Algodiff/index.html
@@ -1,5 +1,5 @@
-Algodiff (owl.Owl_regression_generic_sig.Sig.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
val shape : t -> int array
TODO
val is_float : t -> bool
TODO
val is_arr : t -> bool
TODO
val row_num : t -> int
number of rows
val col_num : t -> int
number of columns
val numel : t -> int
number of elements
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
TODO
val type_info : t -> string
TODO
val error_uniop : string -> t -> 'a
TODO
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.
include Owl_algodiff_ops_sig.Sig
+Algodiff (owl.Owl_regression_generic_sig.Sig.Optimise.Algodiff) Module Optimise.Algodiff
include Owl_algodiff_core_sig.Sig
module A : Owl_types_ndarray_algodiff.Sig
Type definition
Core functions
iteratively get primal component of DF or DR type until the component itself is not DF/DR
val shape : t -> int array
get the shape of primal' value of input
val is_float : t -> bool
check if input is of float value; if input is of type DF/DR, check its primal' value
val is_arr : t -> bool
check if input is of ndarray value; if input is of type DF/DR, check its primal' value
val row_num : t -> int
get the shape of primal' value of input; and then get the first dimension
val col_num : t -> int
get the shape of primal' value of input; and then get the second dimension
val numel : t -> int
for ndarray type input, return its total number of elements.
if primal' value of input is ndarray, copy its value in a new AD type ndarray
val pack_flt : float -> t
convert from float
type to t
type.
val _f : float -> t
A shortcut function for F A.(float_to_elt x)
.
val unpack_flt : t -> float
convert from t
type to float
type.
val deep_info : t -> string
val type_info : t -> string
val error_uniop : string -> t -> 'a
make_forward p t i
construct a forward algodiff data type DF, consisting of primal p
, tangent t
, and tag i
.
make_reverse p i
construct a reverse algodiff data type DR, consisting of primal, adjoint, op, fanout, tag, and tracker.
reverse_prop f x
performs reverse propagation for function f
using the output value x
.
diff f x
returns the exat derivative of a function f : scalar -> scalar
at point x
. Simply calling diff f
will return its derivative function g
of the same type, i.e. g : scalar -> scalar
.
Keep calling this function will give you higher-order derivatives of f
, i.e. f |> diff |> diff |> diff |> ...
jacobian of f
: (vector -> vector) at x
, both x
and y
are row vectors.
jacobian vector product of f
: (vector -> vector) at x
along v
, forward ad. Namely, it calcultes (jacobian x) v
similar to jacobianv'
, but return (f x, jacobianv f x v)
transposed jacobian vector product of f : (vector -> vector)
at x
along v
, backward ad. Namely, it calculates transpose ((jacobianv f x v))
.
similar to jacobianTv
, but return (f x, transpose (jacobianv f x v))
hessian vector product of f
: (scalar -> scalar) at x
along v
. Namely, it calculates (hessian x) v
.