einsums::compute_graph::check_descriptor#
Note
Generated from the C++ headers by apiary --emit-cpp-docs-json.
Defined in header Einsums/ComputeGraph/DescriptorConformance.hpp.
-
std::vector<std::string> check_descriptor(std::string_view name, std::span<const ConformanceSample> samples)#
Run the claims of the codec registered as
nameagainstsamples.For each sample, the node is captured as
record_builtwould capture it, run once for a reference, and then held to:its saved form:
writethenreadgives the descriptor back (the same JSON, every key read), and the node rebuilt from it computes the reference;its effects: a node said to be deterministic computes the same bytes when run again;
its destination: a node said to overwrite its destination without reading it computes the reference over a poisoned destination, and its input list keeps the destination rule;
its accesses: a node run with only the parameters it declares computes the reference, and declares none the sample does not set;
its output extents: the hook’s answer matches the outputs;
its threading: a moldable node run at
ConformanceSample::widthunder the DataflowExecutor computes the reference, withinConformanceSample::width_tolerance.its tiles: for a tiled output, every tile the node writes nonzero is one its
tileshook names, and thetilehook’s node for each named tile computes that tile of the reference.its slices: for a dense output, the
slicehook’s node at every index of every axis the node generates (one itsaxeshook gives no input) computes that slice of the reference.
A tiled output is compared tile by tile, an absent tile counting as zero.
Across the samples, an
equalhook must call each descriptor equal to itself, give the same answer both ways round, and call two descriptors equal only when the second, run on the first sample’s inputs, computes the first’s reference.- Returns:
One line per problem found, each naming the sample; empty when every claim held. A codec not registered under
nameis one problem.