package caisar
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=1b25c8668d428bcfc83c95147b6e45ff0a3bfa05ecd11369d12e963e29819e2e
sha512=edc7d7c0e96802811de3cb1caa3d14cc3d867ee7310748e8188eca9246a362549545c7816c8037511931dc4b7770b5ccc11b0d03abe8843b7c4db7880bf8e1fd
doc/caisar.nir/Nir/Node/index.html
Module Nir.Node
Source
Nodes descriptions
A node is composed of
- a unique
id
of type int - a node description of type
descr
descr
describes several operations. When an operation shares the same name as an ONNX operation, it follows the standard defined in the ONNX IR v8 and ONNX Opset v13 standards, described here: https://onnx.ai/onnx/operators/index.html.
Nodes only require their inputs: it is assumed that a node only returns one value.
type descr =
| Constant of {
data : Gentensor.t;
}
(*A constant tensor, used to store non-varying parameters during inference.
*)| Add of {
}
| Sub of {
}
| Mul of {
}
| Div of {
}
| Matmul of {
}
| Gemm of {
inputA : t;
inputB : t;
inputC : t Base.option;
alpha : Base.float;
beta : Base.float;
transA : Base.int;
transB : Base.int;
}
| LogSoftmax
| ReLu of {
input : t;
}
| Transpose of {
input : t;
(*Called "data" in ONNX documentation : https://onnx.ai/onnx/operators/onnx__Transpose.html .
*)perm : Base.int Base.list;
}
| Squeeze of {
data : t;
axes : t Base.option;
}
| MaxPool
| Conv
| Reshape of {
}
| Flatten of {
}
| Identity of {
input : t;
}
| Input of {
shape : Shape.t;
}
| RW_Linearized_ReLu
| Concat of {
}
| Gather of {
}
| ReduceSum of {
input : t;
axes : t Base.option;
keepdims : Base.int;
noop_with_empty_axes : Base.int;
}
| GatherND of {
}
| RandomNormal of {
dtype : Base.int;
mean : Base.float;
scale : Base.float;
seed : Base.float;
shape : Base.int Base.array;
}
| Abs of {
input : t;
}
| Log of {
input : t;
}
create descr
returns a value of type node with proper indexing and the shape according to the ONNX semantic.
map_rec f n
replace top-bottom the nodes i
accessible from n
by f i
replace_input f n
replace the input in n
by f ()
Iterate on the predecessors of a t and itself. Repect topological order.