For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python function
set_virtual_cpu_target
set_virtual_cpu_target()
Sets the CPU target for host-independent kernel codegen.
Set this before any CPU kernel is compiled. CPU kernels compiled
afterwards target this CPU, so the kernel cache can be shipped to,
and reused on, a host with a different CPU. Mirrors
set_virtual_device_target_arch() for GPUs.
-
Parameters:
-
cpu – An LLVM target-CPU name, such as
x86-64-v3orneoverse-n1;generic, for the most portable baseline of the host architecture family (x86-64on x86_64, the armv8-a baseline on AArch64, an error for other families); or an empty string, which restores host-CPU codegen.nativeis rejected because it would compile for the host’s CPU.