← Back to C-Kernel-Engine Docs Doxygen Source Documentation
CPUInfo Struct Reference

#include <cpu_features.h>

Data Fields

float base_freq_mhz
 
int cores_per_socket
 
int family
 
bool has_amx
 
bool has_amx_bf16
 
bool has_amx_int8
 
bool has_amx_tile
 
int has_avx
 
bool has_avx
 
int has_avx2
 
bool has_avx2
 
bool has_avx512_bf16
 
bool has_avx512bw
 
int has_avx512f
 
bool has_avx512f
 
bool has_avx512vl
 
int has_fma
 
bool has_sse4_2
 
bool has_vnni
 
size_t l1_line_size
 
size_t l1d_size
 
size_t l2_size
 
size_t l3_size
 
int logical_cores
 
float max_freq_mhz
 
int model
 
char model_name [256]
 
int num_cores
 
int pcie_generation
 
int pcie_lanes_total
 
int physical_cores
 
int sockets
 
int stepping
 
int threads_per_core
 
char vendor [64]
 

Detailed Description

CPU Feature Detection and Cache-Aware Parameter Tuning

This module detects CPU cache sizes at runtime and computes optimal GEMM blocking parameters based on the BLIS/oneDNN methodology.

Key formulas:

  • KC: MR * KC * sizeof(float) fits in L1 (with room for B streaming)
  • MC: MC * KC * sizeof(float) fits in L2
  • NC: KC * NR fits in L1 for B panel, NC scales with L3

Definition at line 20 of file cpu_features.h.

Field Documentation

◆ base_freq_mhz

float CPUInfo::base_freq_mhz

Definition at line 47 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ cores_per_socket

int CPUInfo::cores_per_socket

Definition at line 44 of file system_topology.h.

Referenced by topology_discover_cpu().

◆ family

int CPUInfo::family

Definition at line 37 of file system_topology.h.

Referenced by topology_discover_cpu().

◆ has_amx

bool CPUInfo::has_amx

Definition at line 58 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ has_amx_bf16

bool CPUInfo::has_amx_bf16

Definition at line 61 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ has_amx_int8

bool CPUInfo::has_amx_int8

Definition at line 60 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ has_amx_tile

bool CPUInfo::has_amx_tile

Definition at line 59 of file system_topology.h.

Referenced by topology_discover_cpu().

◆ has_avx [1/2]

int CPUInfo::has_avx

◆ has_avx [2/2]

bool CPUInfo::has_avx

Definition at line 52 of file system_topology.h.

◆ has_avx2 [1/2]

◆ has_avx2 [2/2]

bool CPUInfo::has_avx2

Definition at line 53 of file system_topology.h.

◆ has_avx512_bf16

bool CPUInfo::has_avx512_bf16

Definition at line 57 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ has_avx512bw

bool CPUInfo::has_avx512bw

Definition at line 55 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ has_avx512f [1/2]

◆ has_avx512f [2/2]

bool CPUInfo::has_avx512f

Definition at line 54 of file system_topology.h.

◆ has_avx512vl

bool CPUInfo::has_avx512vl

Definition at line 56 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ has_fma

int CPUInfo::has_fma

Definition at line 29 of file cpu_features.h.

Referenced by compute_gemm_params(), and print_cpu_info().

◆ has_sse4_2

bool CPUInfo::has_sse4_2

Definition at line 51 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ has_vnni

bool CPUInfo::has_vnni

Definition at line 62 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ l1_line_size

size_t CPUInfo::l1_line_size

Definition at line 24 of file cpu_features.h.

Referenced by print_cpu_info().

◆ l1d_size

size_t CPUInfo::l1d_size

Definition at line 21 of file cpu_features.h.

Referenced by compute_gemm_params(), cpu_features_init(), and print_cpu_info().

◆ l2_size

size_t CPUInfo::l2_size

Definition at line 22 of file cpu_features.h.

Referenced by compute_gemm_params(), and print_cpu_info().

◆ l3_size

size_t CPUInfo::l3_size

Definition at line 23 of file cpu_features.h.

Referenced by compute_gemm_params(), and print_cpu_info().

◆ logical_cores

int CPUInfo::logical_cores

◆ max_freq_mhz

float CPUInfo::max_freq_mhz

Definition at line 48 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ model

int CPUInfo::model

Definition at line 38 of file system_topology.h.

Referenced by topology_discover_cpu().

◆ model_name

char CPUInfo::model_name[256]

Definition at line 35 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ num_cores

int CPUInfo::num_cores

◆ pcie_generation

int CPUInfo::pcie_generation

Definition at line 66 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ pcie_lanes_total

int CPUInfo::pcie_lanes_total

Definition at line 65 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ physical_cores

int CPUInfo::physical_cores

◆ sockets

int CPUInfo::sockets

◆ stepping

int CPUInfo::stepping

Definition at line 39 of file system_topology.h.

Referenced by topology_discover_cpu().

◆ threads_per_core

int CPUInfo::threads_per_core

Definition at line 45 of file system_topology.h.

Referenced by topology_discover_cpu(), and topology_print_cpu().

◆ vendor

char CPUInfo::vendor[64]

Definition at line 36 of file system_topology.h.

Referenced by topology_discover_cpu().


The documentation for this struct was generated from the following files: