Loading...
Searching...
No Matches
AotiPackageIsa.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) gpridge developers
3// See LICENSE for details.
4
5#ifndef GPR_POTENTIALS_AOTIPACKAGEISA_H_
6#define GPR_POTENTIALS_AOTIPACKAGEISA_H_
7
22
23#include <string>
24#include <vector>
25
26namespace pot {
27
30 bool metadata_found = false;
31 std::string device;
32 std::vector<std::string> cpu_isa;
33};
34
37struct HostIsa {
38 bool avx2 = false;
39 bool fma = false;
40 bool avx512f = false;
41 bool avx512dq = false;
42 bool avx512bw = false;
43 bool avx512vl = false;
44 bool avx512_vnni = false;
45 bool avx512_bf16 = false;
46 bool amx_tile = false;
47 bool amx_bf16 = false;
48 bool amx_int8 = false;
49
51 static HostIsa detect() noexcept;
52};
53
59
63std::vector<std::string> missingIsa(const AotiPackageTarget& target,
64 const HostIsa& host);
65
71void requireAotiPackageRunsOnHost(const std::string& path);
72
74void requireAotiPackageRunsOn(const std::string& path, const HostIsa& host);
75
76} // namespace pot
77
78#endif // GPR_POTENTIALS_AOTIPACKAGEISA_H_
Potential wrappers and the batched oracle interface.
AotiPackageTarget readAotiPackageTarget(const std::string &path)
std::vector< std::string > missingIsa(const AotiPackageTarget &target, const HostIsa &host)
void requireAotiPackageRunsOnHost(const std::string &path)
void requireAotiPackageRunsOn(const std::string &path, const HostIsa &host)
requireAotiPackageRunsOnHost against an explicit host description.
STL namespace.
The fields of an AOTInductor package that name the hardware it targets.
std::string device
AOTI_DEVICE_KEY, e.g. "cpu" or "cuda".
bool metadata_found
any *_metadata.json entry read
std::vector< std::string > cpu_isa
AOTI_CPU_ISA tokens, upper case.
static HostIsa detect() noexcept
CPUID and XGETBV of the calling host; all false off x86-64.