Crate tract

Crate tract 

Source

Structs§

TractFact
TractInferenceFact
TractInferenceModel
TractModel
TractNnef
TractOnnx
TractRunnable
TractState
TractValue

Enums§

TRACT_RESULT
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§

tract_fact_destroy
tract_fact_dump
Write a fact as its specification string.
tract_fact_parse
Parse a fact specification string into an Fact.
tract_free_cstring
Frees a string allocated by libtract.
tract_get_last_error
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.
tract_inference_fact_destroy
Destroy a fact.
tract_inference_fact_dump
Write an inference fact as its specification string.
tract_inference_fact_empty
Creates an empty inference fact.
tract_inference_fact_parse
Parse a fact specification string into an InferenceFact.
tract_inference_model_analyse
Analyse an InferencedModel in-place.
tract_inference_model_destroy
Destroy an InferenceModel.
tract_inference_model_input_count
Query an InferenceModel input counts.
tract_inference_model_input_fact
tract_inference_model_input_name
Query the name of a model input.
tract_inference_model_into_optimized
Convenience function to obtain an optimized TypedModel from an InferenceModel.
tract_inference_model_into_typed
Transform a fully analysed InferenceModel to a TypedModel.
tract_inference_model_output_count
Query an InferenceModel output counts.
tract_inference_model_output_fact
Query an output fact for an InferenceModel.
tract_inference_model_output_name
Query the name of a model output.
tract_inference_model_set_input_fact
Set an input fact of an InferenceModel.
tract_inference_model_set_output_fact
Set an output fact of an InferenceModel.
tract_inference_model_set_output_names
Change the model outputs nodes (by name).
tract_model_concretize_symbols
Give value one or more symbols used in the model.
tract_model_declutter
Declutter a TypedModel in-place.
tract_model_destroy
Destroy a TypedModel.
tract_model_input_count
Query an InferenceModel input counts.
tract_model_input_fact
Query the input fact of a model.
tract_model_input_name
Query the name of a model input.
tract_model_into_runnable
Convert a TypedModel into a TypedRunnableModel.
tract_model_optimize
Optimize a TypedModel in-place.
tract_model_output_count
Query an InferenceModel output counts.
tract_model_output_fact
Query the output fact of a model.
tract_model_output_name
Query the name of a model output.
tract_model_profile_json
Perform a profile of the model using the provided inputs.
tract_model_property
Query a property value in a model.
tract_model_property_count
Query the number of properties in a model.
tract_model_property_names
Query the properties names of a model.
tract_model_pulse_simple
Pulsify the model
tract_model_set_output_names
Change the model outputs nodes (by name).
tract_model_transform
Apply a transform to the model.
tract_nnef_create
Creates an instance of an NNEF framework and parser that can be used to load and dump NNEF models.
tract_nnef_destroy
Destroy the NNEF parser. It is safe to detroy the NNEF parser once the model had been loaded.
tract_nnef_enable_extended_identifier_syntax
tract_nnef_enable_onnx
tract_nnef_enable_pulse
tract_nnef_enable_tract_core
tract_nnef_enable_tract_extra
tract_nnef_enable_tract_transformers
tract_nnef_model_for_path
Parse and load an NNEF model as a tract TypedModel.
tract_nnef_transform_model
tract_nnef_write_model_to_dir
Dump a TypedModel as a NNEF directory.
tract_nnef_write_model_to_tar
Dump a TypedModel as a NNEF tar file.
tract_nnef_write_model_to_tar_gz
Dump a TypedModel as a NNEF .tar.gz file.
tract_onnx_create
Creates an instance of an ONNX framework and parser that can be used to load models.
tract_onnx_destroy
Destroy the NNEF parser. It is safe to detroy the NNEF parser once the model had been loaded.
tract_onnx_model_for_path
Parse and load an ONNX model as a tract InferenceModel.
tract_runnable_input_count
Query a Runnable input counts.
tract_runnable_output_count
Query an Runnable output counts.
tract_runnable_release
tract_runnable_run
Convenience function to run a stateless model.
tract_runnable_spawn_state
Spawn a session state from a runnable model.
tract_state_destroy
tract_state_get_states
Get Stateful Ops’s current states.
tract_state_get_states_facts
Get Stateful Ops’s state facts
tract_state_initializable_states_count
Get number of initializable stateful op
tract_state_input_count
Query a State input counts.
tract_state_output_count
Query an State output counts.
tract_state_run
Run a turn on a model state
tract_state_set_states
Initialize Stateful Ops with specified values
tract_value_as_bytes
Inspect part of a value. Except value, all argument pointers can be null if only some specific bits are required.
tract_value_destroy
Destroy a value.
tract_value_from_bytes
Create a TractValue (aka tensor) from caller data and metadata.
tract_version
Returns a pointer to a static buffer containing a null-terminated version string.