Crate tract

source ·

Structs

Enums

Used as a return type of functions that can encounter errors. If the function encountered an error, you can retrieve it using the tract_get_last_error function

Functions

Write a fact as its specification string.
Parse a fact specification string into an Fact.
Frees a string allocated by libtract.
Retrieve the last error that happened in this thread. A function encountered an error if its return type is of type TRACT_RESULT and it returned TRACT_RESULT_KO.
Write an inference fact as its specification string.
Parse a fact specification string into an InferenceFact.
Analyse an InferencedModel in-place.
Destroy an InferenceModel.
Query the name of a model input.
Convenience function to obtain an optimized TypedModel from an InferenceModel.
Transform a fully analysed InferenceModel to a TypedModel.
Query an InferenceModel input and output counts.
Query an output fact for an InferenceModel.
Query the name of a model output.
Set an input fact of an InferenceModel.
Set an output fact of an InferenceModel.
Declutter a TypedModel in-place.
Destroy a TypedModel.
Query the name of a model input.
Convert a TypedModel into a TypedRunnableModel.
Query an Model input and output counts.
Optimize a TypedModel in-place.
Query the name of a model output.
Query a property value in a model.
Query the number of properties in a model.
Query the properties names of a model.
Creates an instance of an NNEF framework and parser that can be used to load models.
Destroy the NNEF parser. It is safe to detroy the NNEF parser once the model had been loaded.
Parse and load an NNEF model as a tract TypedModel.
Dump a TypedModel as a NNEF directory.
Dump a TypedModel as a NNEF tar file.
Dump a TypedModel as a NNEF .tar.gz file.
Creates an instance of an ONNX framework and parser that can be used to load models.
Destroy the NNEF parser. It is safe to detroy the NNEF parser once the model had been loaded.
Parse and load an ONNX model as a tract InferenceModel.
Query a runnable model input and output counts.
Convenience function to run a stateless model.
Spawn a session state from a runnable model.
Run a turn on a model state
Create a TractValue (aka tensor) from caller data and metadata.
Destroy a value.
Inspect part of a value. Except value, all argument pointers can be null if only some specific bits are required.
Returns a pointer to a static buffer containing a null-terminated version string.