Cubin bundle inspection API
tensoracle.bundle wraps the C++ inspection API in tensoracle/cubin.h and tensoracle/cubin.hpp. It checks the schema version 2 manifest, cubin contents and architectures, declared public arguments, resource declarations, and optional plugin embedding without loading the plugin or initializing a GPU. CUDA C++ bundles have no hidden trailing parameters or Triton scratch declarations. Use these checks before distributing a model wheel.
inspect_bundle(root, *, plugin=None)
Verify the manifest, cubins, and optional plugin without loading the plugin.
inspect_wheel(path, *, plugin=None)
Inspect the one cubin bundle inside a wheel without installing it.
bundle_sha256(manifest)
Return the C++ manifest identity, excluding its own digest field.
cubin_sm(data)
Read a cubin's NVIDIA architecture without initializing CUDA.
Inspection errors
C and C++ model modules can also inspect embedded manifest and cubin bytes
with tensoracle_inspect_embedded_bundle / tensoracle::inspect_embedded_bundle.
This uses the same validation without reading a directory or loading a plugin.
The following exception classes are exported by tensoracle.bundle from the native binding:
| Exception | Meaning |
|---|---|
BundleError |
Invalid manifest or another bundle validation failure |
MissingCubinError |
A referenced cubin is missing or unreadable |
CorruptCubinError |
Cubin contents disagree with the declared size or SHA-256 |
CubinArchitectureError |
Cubin ELF architecture or ABI is unsupported, or the actual SM disagrees with the manifest |
PluginBundleMismatchError |
The plugin's embedded bundle does not match the supplied bundle |