Expand description
The LLVM backend: intrinsics, the host system and the CPUs and features of LLVM targets.
The functions of python/tvm_tirx/codegen/llvm.py, and the host queries
python/tvm_tirx/target/detect_target.py makes. A query that takes an optional target falls
back to the current one, and answers nothing for a target that is not llvm.
Functionsยง
- Whether the CPU of
targethas the featurefeature(codegen.llvm_cpu_has_feature). - The CPUs of the
-mtripleoftarget(codegen.llvm_get_cpu_archlist). - The CPU features of the
-mtriple,-mcpuand-mattroftarget(codegen.llvm_get_cpu_features). - The default LLVM target triple of the host (
tvm.codegen.llvm.GetDefaultTargetTriple). - The features of the host CPU, each with a boolean saying whether it is enabled; empty when LLVM cannot tell (
tvm.codegen.llvm.GetHostCPUFeatures). - The LLVM name of the host CPU (
tvm.codegen.llvm.GetHostCPUName). - The name of the LLVM intrinsic
intrin_id(codegen.llvm_get_intrinsic_name). - The LLVM target triple of the running process (
tvm.codegen.llvm.GetProcessTriple). - The LLVM name of the host CPU (
codegen.llvm_get_system_cpu). - The default LLVM target triple of the host (
codegen.llvm_get_system_triple). - The vendor of the host x86 CPU:
intel,amd,unknown, orunimplementedon other CPUs (codegen.llvm_get_system_x86_vendor). - The LLVM targets LLVM was built with (
codegen.llvm_get_targets). - The vector width of the CPU of
target, in bits; -1 for a target that is notllvm(codegen.llvm_get_vector_width). - Whether LLVM knows the CPU
cpufor the target tripletriple(codegen.llvm_is_valid_cpu). - The id of the LLVM intrinsic
name, 0 when there is none (codegen.llvm_lookup_intrinsic_id). - Whether LLVM can create a target machine for the target string
target, such as"llvm -mtriple=aarch64-linux-gnu"(codegen.llvm_target_enabled). - The major version of LLVM (
codegen.llvm_version_major).