34 cpuinfo::CpuInfo
info{};
35 unsigned int L1_cache_size = 32768;
36 unsigned int L2_cache_size = 262144;
46 : _impl(std::make_unique<Impl>())
51 CPUInfo::~CPUInfo() =
default;
55 return _impl->info.num_cpus();
60 return _impl->info.has_fp16();
65 return _impl->info.has_bf16();
70 return _impl->info.has_svebf16();
75 return _impl->info.has_dotprod();
80 return _impl->info.has_svef32mm();
85 return _impl->info.has_i8mm();
90 return _impl->info.has_svei8mm();
95 return _impl->info.has_sve();
100 return _impl->info.has_sve2();
105 return _impl->info.cpu_model();
110 return _impl->info.cpu_model(cpuid);
115 return _impl->L1_cache_size;
120 return _impl->L2_cache_size;
bool has_sve() const
Checks if the cpu model supports sve.
static CpuInfo build()
CpuInfo builder function from system related information.
bool has_bf16() const
Checks if the cpu model supports bf16.
bool has_svei8mm() const
Checks if the cpu model supports integer matrix multiplication.
bool has_svef32mm() const
Checks if the cpu model supports floating-point matrix multiplication.
bool has_fp16() const
Checks if the cpu model supports fp16.
CPUModel
CPU models types.
Copyright (c) 2017-2021 Arm Limited.
bool has_sve2() const
Checks if the cpu model supports sve2.
bool has_dotprod() const
Checks if the cpu model supports dot product.
unsigned int get_cpu_num() const
Return the maximum number of CPUs present.
unsigned int get_L1_cache_size() const
Gets the L1 cache size.
unsigned int get_L2_cache_size() const
Gets the L2 cache size.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
CPUModel get_cpu_model() const
Gets the current thread's cpu model.
static CPUInfo & get()
Access the KernelLibrary singleton.
bool has_svebf16() const
Checks if the cpu model supports bf16.
bool has_i8mm() const
Checks if the cpu model supports integer matrix multiplication.