Skip to main content

Module target

Module target 

Source
Expand description

Compilation targets. A Target describes the device and options code is compiled for, as an instance of a registered TargetKind; it is created from a tag, a kind name or a config.

Structs§

Target
A compilation target: its kind, the keys that classify it, such as cpu, the attrs of its options, and an optional host target for the code that runs on the host. A target may come from a registered tag, such as nvidia/nvidia-a100.
TargetKind
A kind of target, such as llvm or cuda: its name, the options it takes, and the device type and keys of its targets by default.
TargetKindObj
The object behind TargetKind.
TargetObj
The object behind Target.

Functions§

build
Generate the code of module with the code generator target.build.<kind>, such as llvm, c, cuda, cuda_host or nvptx.
list_tags
Return the registered target tags, with their targets (target.TargetTagListTags).
register_tag
Register the tag name for the target config describes, replacing a previous one only if override_, and return that target (target.TargetTagAddTag).