Backend Extension API#
Backend loading#
tvm.backend discovers and loads target-owned Python semantics. Depending
on the target, loading a backend registers its TVMScript namespaces,
tile-dispatch implementations, target tags, compilation-pipeline entry points,
and code-generation support.
Backend-owned Python modules and load hooks.
CUDA registration#
- tvm.backend.cuda.register_backend()
Register CUDA-owned Python semantics.
- tvm.backend.cuda.script_namespace(**kwargs)
Return the CUDA TVMScript namespace object.
- tvm.backend.cuda.script_namespaces(**_)
Return CUDA-owned TVMScript namespaces.
Trainium registration#
- tvm.backend.trn.register_backend()
Register Trainium-owned Python semantics.
- tvm.backend.trn.script_namespace(op_wrapper=None)
Return the Trainium TVMScript namespace object.
- tvm.backend.trn.script_namespaces(op_wrapper=None, **_)
Return Trainium-owned TVMScript namespaces.
These functions are backend integration points. Kernel-facing CUDA APIs are documented in CUDA Authoring and Support APIs and Direct PTX Instructions; Trainium APIs are documented in Trainium Authoring and Support APIs. See Backend Internals for module ownership and registration side effects.