Skip to main content

Import

thx.compile

Compile a THRINDEX model to a .thx artifact.
Parameters Raises
  • [E0105] — model has no layers
  • [E0106] — consecutive layer dimensions do not match
  • [E0107] — unknown reset mode string
  • [E0101]tau_mem ≤ dt
Example

thx.run

Run a compiled artifact and return the inference result.
Parameters Returns: RunResult

thx.artifact_info

Read metadata from a .thx artifact without running it.
Returns: ArtifactInfo

thx.check

Verify the integrity of a .thx artifact. Raises [E0009] if the CRC32 does not match.

thx.register_target

Register a custom hardware backend for compilation and inference.
Notes This is the extension point for hardware integrators. Once registered, the target name is accepted by thx.compile(target=name) and thrindex run --target name. See conformance/adding-a-backend for the full integration guide.

Constants