Host check for the instruction set an AOTInductor package needs. More...
#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | pot::AotiPackageTarget |
| The fields of an AOTInductor package that name the hardware it targets. More... | |
| struct | pot::HostIsa |
Namespaces | |
| namespace | pot |
| Potential wrappers and the batched oracle interface. | |
Functions | |
| AotiPackageTarget | pot::readAotiPackageTarget (const std::string &path) |
| std::vector< std::string > | pot::missingIsa (const AotiPackageTarget &target, const HostIsa &host) |
| void | pot::requireAotiPackageRunsOnHost (const std::string &path) |
| void | pot::requireAotiPackageRunsOn (const std::string &path, const HostIsa &host) |
| requireAotiPackageRunsOnHost against an explicit host description. | |
Host check for the instruction set an AOTInductor package needs.
torch.export packages a model (.pt2, a stored zip) with a shared library compiled for the CPU it was exported on: AOTInductor builds with -march=native and vectorizes for the widest ISA it finds. A package exported on an AVX-512 host executes AVX-512 instructions, and on a host without them (AMD EPYC 7713 and 7742, for instance) the first force call dies with SIGILL. The package records the ISA in the AOTI_CPU_ISA field of its *_metadata.json entries; this module reads that field and compares it with CPUID before the package is loaded, so a mismatch stops the run with a message naming the package, its ISA and what the host lacks.
Definition in file AotiPackageIsa.h.