tvm_tirx.target

tvm_tirx.target#

Target configuration and registry.

TVM uses JSON-based target configuration. Targets can be constructed via:

  • A config dictionary: Target({"kind": "cuda", "arch": "sm_80"})

  • A tag name: Target("nvidia/nvidia-a100")

  • A tag with overrides: Target({"tag": "nvidia/nvidia-a100", "l2_cache_size_bytes": 12345})

  • A kind name: Target("cuda")

Use target.attrs["key"] to access target attributes such as "arch", "max_num_threads", "mcpu", "libs", etc.

Use tvm_tirx.target.list_tags() to list all available target tags, and tvm_tirx.target.register_tag() to register new tags.

Classes#

Target(target[, host])

Target device information, use through TVM API.

TargetKind(name, default_device_type, ...)

Kind of a compilation target

Functions#

device_from_target(target[, index])

Construct a runtime device from a compilation target.

list_tags()

Returns a dict of tags, which maps each tag name to its corresponding target.

register_tag(name, config[, override])

Add a user-defined tag into the target tag registry.

Namespaces#

Supporting classes#

TargetFeatures(target)