Skip to content
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

Detecting wrong number of virtual cores and cache sizes #15

Open
nickchomey opened this issue Feb 21, 2023 · 2 comments
Open

Detecting wrong number of virtual cores and cache sizes #15

nickchomey opened this issue Feb 21, 2023 · 2 comments

Comments

@nickchomey
Copy link

nickchomey commented Feb 21, 2023

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 nickchomey changed the title Detecting wrong number of virtual cores Detecting wrong number of virtual cores and cache sizes Feb 21, 2023
@robbmcleod
Copy link
Owner

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

@nickchomey
Copy link
Author

nickchomey commented Feb 22, 2023

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?

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

No branches or pull requests

2 participants