cpufeature icon indicating copy to clipboard operation
cpufeature copied to clipboard

Detecting wrong number of virtual cores and cache sizes

Open nickchomey opened this issue 2 years ago • 2 comments

cpufeature is detecting 16 virtual cores, when I only have 12. And 0 for the cache sizes.

Output from lscpu

Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         48 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  12
  On-line CPU(s) list:   0-11
Vendor ID:               AuthenticAMD
  Model name:            AMD Ryzen 5 4600H with Radeon Graphics
    CPU family:          23
    Model:               96
    Thread(s) per core:  2
    Core(s) per socket:  6
    Socket(s):           1
    Stepping:            1
    BogoMIPS:            5988.78
Caches (sum of all):     
  L1d:                   192 KiB (6 instances)
  L1i:                   192 KiB (6 instances)
  L2:                    3 MiB (6 instances)
  L3:                    4 MiB (1 instance)

Output from cpufeature

VendorId                : AuthenticAMD
    num_virtual_cores       : 16
    num_physical_cores      : 8
    num_threads_per_core    : 2
    num_cpus                : 0
    cache_line_size         : 64
    cache_L1_size           : 0
    cache_L2_size           : 0
    cache_L3_size           : 0

I wonder if it has anything to do with me running it in Ubuntu via WSL2?

nickchomey avatar Feb 21 '23 20:02 nickchomey

Does it give the same results if you just build it as a Windows package?

robbmcleod avatar Feb 22 '23 15:02 robbmcleod

I'm not quite sure what you mean by build a windows package, but I just installed the package with pip in windows python and it shows the correct number of virtual cores (12), physical cores (6) and num_cpus (1). But it still shows 0 for L1, L2, L3 cache.

I suspect it's not worth either of our effort to debug whatever is happening with WSL2 for the CPUs given that WSL2 is surely exclusively used as a dev environment, but perhaps the cache sizes is something that could be fixed since its affecting Windows as well?

nickchomey avatar Feb 22 '23 20:02 nickchomey