einsums::compute_graph::ManifestEntry#
Note
Generated from the C++ headers by apiary --emit-cpp-docs-json.
Defined in header Einsums/ComputeGraph/InterfaceManifest.hpp.
-
class ManifestEntry#
One named slot of a graph’s interface: an operand the graph does not own.
The formalization of the complement of
TensorHandle::is_intermediate. A handle flagged intermediate is storage the graph created for itself and is never an entry here; everything else a node touches is part of the contract a caller has to satisfy, and this says what satisfying it means.Note
dimsholds the extents of the instance the graph was captured at.dim_symbolssays which of them are part of the contract and which a bind may move; an entry with no symbols is fixed at exactlydims, asGraph::rebindalways required.See also
Graph::manifest
See also
Graph::bind
Added in version 2.0.0.
-
std::string direction_name() const#
The direction by name, for Python, where the enum is not bound.
Added in version 2.0.0.
- Returns:
"input","output"or"inout", asmanifest_direction_namespells it.
-
std::string dtype_name() const#
The element type a bound tensor must hold, by name.
Added in version 2.0.0.
- Returns:
As
scalar_type_namespells it,"float64"for instance.
-
std::string scope_name() const#
The scope that owns the slot’s storage, by name.
Added in version 2.0.0.
- Returns:
As
tensor_ownership_namespells it.
-
std::string name#
The binding key. Copied from
TensorHandle::name, which capture in turn copied from the tensor. Names are the interface: a saved graph is bound by name, never by id. A tensor registered without a meaningful name of its own (the generated “tensor_<n>” spellings) is a legal entry and a fragile key - it is stable only as long as nothing upstream renumbers, so a graph meant to be saved should name its operands.
-
TensorId id#
This graph’s id for the slot. Graph-LOCAL and not stable across processes: ids are minted in registration order, so the same tensor in a re-captured graph can hold a different one. Useful to reach
Graph::tensorand to expressaliases_inputwithin one manifest; never a binding key and never written to a file.
-
ManifestDirection direction#
Read, written, or both.
-
packed_gemm::ScalarType dtype#
Element type a bound tensor must match.
-
std::size_t rank#
Number of dimensions.
-
std::vector<std::size_t> dims#
Extents at capture, one per axis. See the note above.
-
std::vector<std::string> dim_symbols#
Per-axis symbolic extent declaration, parallel to
dims, or empty when every axis is literal. An empty string in a populated vector is one literal axis, an ordinary string is a symbol every slot naming it must agree on, and a"ragged:<space>"spelling is an axis whose extent differs per instance.Names, never ids, for the same reason
spacesholds names: this is what a serializer writes and a loader reads back, and a symbol is only meaningful by name.See also
TensorHandle::dim_symbols
See also
Graph::annotate_dims
-
std::vector<std::string> spaces#
Per-axis index-space NAMES, parallel to
dims, or empty when the slot is unannotated. Names, notSpaceIdvalues: an id is a handle into the registry that issued it and means nothing in another process or another registry.
-
bool spaces_inferred#
Whether
spaceswas inferred rather than declared by a user.See also
TensorHandle::spaces_inferred
-
TensorOwnership scope#
The scope that owns the slot’s storage:
Graphfor an operand supplied to this graph alone,Pipelinefor one carried between a pipeline’s stages,Workspacefor one that outlives every pipeline over it.
-
TensorId aliases_input#
Manifest-level alias declaration: the
idof the entry whose storage this entry is part of, or 0 when the slot aliases nothing another entry names.Populated from
TensorHandle::aliases, but only when BOTH ends are manifest entries - an alias of an intermediate is the graph’s own business. A loaded graph has no addresses, so this declaration is how an aliasing relation between two caller-supplied tensors survives a save at all;Graph::bindvalidates a bind against it and rejects an aliasing bind that no entry declares.
-
std::vector<TensorId> also#
The OTHER graph-local ids this one slot covers, or empty for the ordinary case.
A name is a slot, and one slot may stand over more than one handle. Two factorization providers handed one collocation matrix each capture their own view of it into their own setup body, and each view object is a separate capture identity, so the graph holds two handles over one buffer under one name.
The entry folds them, and this is what the fold has to remember:
Graph::bindrepoints every id here alongsideid, so the caller supplies the matrix ONCE. Folding is refused unless the handles agree on the whole shape contract and are either the same storage or all still unbound, so two different buffers that merely share a name are still the ambiguity they always were.Graph-LOCAL, like
id, and never written to a file.
-
std::string direction_name() const#