Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2017
Merged

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

merged 2 commits into from
Jul 24, 2017

Conversation

martin-frbg
Copy link
Collaborator

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

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

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