Comments (18)
Probably something like this: https://software.intel.com/en-us/articles/gpu-detect-sample
However, that requires DirectX, and if there's no way around it - we should be doing something else. Geekbench apparently has L4 cache detection, and they are crossplatform, so chances are it's doable.
from libcpuid.
Did you have a chance to explore? We might close this if it's windows-specific or requires directX.
from libcpuid.
Apparently it uses many win api functions, will take a closer look
from libcpuid.
There is useful code, but the means to get the raw is quite obscure to me, full of win api functions, which requires learning what most functions do internally, too much for me.
I'll close for it now, perhaps @x0rg can look into the code, I see there is a __cpuid
https://msdn.microsoft.com/en-us/library/hskdteyh.aspx
from libcpuid.
I have never used Win API, and my C++ level is very bad.
I'll take a look in Intel Architectures Software Developer’s Manual, maybe there are explanations.
from libcpuid.
Actually, John from GeekBench tuned in and shared that L4 cache is a simple matter of deterministic cache decoding in CPUID leaf 04h. In hindsight, I've made cpuid_get_raw_data()
only fetch the data for ECX=0, 1, 2 and 3 - getting us L1i, L1d, L2 and L3 - but no L4. I will update the relevant code about this soon.
from libcpuid.
Do you will add l4_cache
, l4_assoc
and l4_cacheline
variables in cpu_id_t?
from libcpuid.
Yes. I want to have this tested first, and I am waiting for some friends which might have Crystalwell CPUs to send in some raw.txt files to test decoding. Of course, that means all tests will be invalidated soon, since they'd need those two fields.
from libcpuid.
Ok. I think you'll tag v0.3.0 after these tests?
from libcpuid.
Yes. I plan to
- Add
l4_cache
,l4_assoc
andl4_cacheline
fields tocpu_id_t
. - Test L4 cache handling code.
- Add the sent raw.txt to tests, and update all other tests.
- Compile static and dynamic library versions for Win32, Win64, and Mac OS X, and make a release in Sourceforge. I believe there will be some minor changes here, since the MSVC compiler is C89 only (I'm using MSVC7.1 for best compatibility) and doesn't like declaring variables "as needed". Anyways, the fixes there will be trivial.
- Tag v0.3.0 in github.
from libcpuid.
@anrieff
raw.txt for Intel Core i7-4750HQ: http://ark.intel.com/products/codename/51802/Crystal-Well#@Mobile
raw.txt
from libcpuid.
Thank you SO much! I've been trying desperately to find exactly that, but none of my friends had a Crystalwell.
from libcpuid.
These data are obtained on MacBook Pro Retina (Mid 2014) of my friend.
from libcpuid.
Well I pinged friends with Mid-2014 MacBook Pro Retinas, but they all had Broadwell-U CPUs, and no eDRAM. Anyway, the cache size is detected, I pushed 3f51d3c with the detection. Will add the test and fix up all other tests (to add a L4 fields, which will be -1 for all current CPUs in the tests DB).
from libcpuid.
Win32 build errors:
- ATOM is a predefined macro in windef.h
- Visual studio does not support c99:
2.1) in function cpuid_identify_intel: variables declaring "as needed"
2.2) c99 struct initialization in file rdmsr.c: "static struct internal_id_info_t internal = { .score = -1 };"
from libcpuid.
I know, I'll fix these as soon as I get back my Windows machine.
from libcpuid.
from libcpuid.
L4 cache fully supported in f52c02d (tests updated). The Intel Core i7-4750HQ test added in 87f3052.
from libcpuid.
Related Issues (20)
- CMake build script not in 0.5.0 tarball release HOT 1
- conda-forge package HOT 5
- CPU Family/Model is used as Ext.Family/Model HOT 5
- Intel Alder Lake processors are not properly recognized HOT 21
- C:\Program Files (x86)\Embarcadero\Dev-Cpp\TDM-GCC-64\x86_64-w64-mingw32\bin\ld.exe C:\Users\user\AppData\Local\Temp\cc79calV.o:sysinfo.cpp:(.text+0x15a): undefined reference to `cpuid_present' HOT 2
- xmp profile on H670 chipset does not seem to be detected HOT 2
- cpuid_tool.exe v0.6.0 doesn't work on my PC HOT 3
- Library naming inconsistent between Autotools and CMake HOT 2
- v0.6.0 alder lake(hyper thread disabled) core numbers are not correct. HOT 1
- "Segmentation Fault" on Celeron 900 (Core 2) HOT 6
- x86_64 architecture level HOT 4
- cpuid_tool 0.6.2 does not work on osx HOT 3
- Misprint, not enough zeros in the constant HOT 1
- cpuid_get_all_raw_data() leaves CPU affinity set to a single core HOT 3
- Overclock intel CPU HOT 3
- minimum and maximum frequency of AMD cpu HOT 7
- Wrong rdmsr temperature/voltage/clock for Core 2 CPUs HOT 3
- Support Extended CPU Topology for AMD CPU/APU HOT 3
- Missing `centaur_code_t.h` HOT 4
- Does this library have some options that depend on the kernel? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libcpuid.