Skip to content

Use cpuid 4 with subleafs to query L1 cache size on Intel processors - #1236

Merged
xianyi merged 2 commits into
OpenMathLib:developfrom
martin-frbg:l1cache
Jul 24, 2017
Merged

xianyi merged 2 commits into
OpenMathLib:developfrom
martin-frbg:l1cache

Conversation

@martin-frbg

@martin-frbg martin-frbg commented Jul 12, 2017 •

Copy link
Copy Markdown
Collaborator

Needs testing as the implementation of cpuid_count may break some systems. Not sure if there is an easier solution to the problem of passing subleaf values to cpuid page 4. (This is intended to fix #1232 at some point)

@wangshankun

Copy link
Copy Markdown

Yes, it's work

./getarch 1
#define HASWELL
#define L1_CODE_SIZE 32768
#define L1_CODE_ASSOCIATIVE 8
#define L1_CODE_LINESIZE 64
#define L1_DATA_SIZE 32768
#define L1_DATA_ASSOCIATIVE 8
#define L1_DATA_LINESIZE 64
#define L2_SIZE 262144
#define L2_ASSOCIATIVE 8
#define L2_LINESIZE 64
#define ITB_SIZE 2097152
#define ITB_ASSOCIATIVE 0
#define ITB_ENTRIES 8
#define DTB_SIZE 4096
#define DTB_ASSOCIATIVE 4
#define DTB_DEFAULT_ENTRIES 64
#define HAVE_CMOV
#define HAVE_MMX
#define HAVE_SSE
#define HAVE_SSE2
#define HAVE_SSE3
#define HAVE_SSSE3
#define HAVE_SSE4_1
#define HAVE_SSE4_2
#define HAVE_AVX
#define HAVE_FMA3
#define HAVE_CFLUSH
#define NUM_SHAREDCACHE 1
#define NUM_CORES 1
#define CORE_HASWELL
#define CHAR_CORENAME "HASWELL"

@xianyi
xianyi merged commit 3c4c472 into OpenMathLib:develop Jul 24, 2017
crbaird added a commit to openhpc/ohpc that referenced this pull request Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

why getarch get L1d(8k) is different from lscpu(32k) ?

3 participants