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

incomplete list of flags on windows / msys2 python distribution. #154

Open
vondele opened this issue Aug 2, 2020 · 2 comments
Open

incomplete list of flags on windows / msys2 python distribution. #154

vondele opened this issue Aug 2, 2020 · 2 comments

Comments

@vondele
Copy link

vondele commented Aug 2, 2020

  • CPU architecture : ivy bridge
  • Operating System : Windows + msys2
  • Python version :
    wrong: 3.8.5.final.0 (64 bit) (msys2 distribution)
    good: 3.8.2.final.0 (64 bit) (from python.org)
  • Version of py-cpuinfo: 7.0.0

The flags returned on this system are incomplete (only up to sse2, i.e. missing things like sse4_2), depending on the python installation used.

wrong:

{'python_version': '3.8.5.final.0 (64 bit)', 'cpuinfo_version': [7, 0, 0], 'cpuinfo_version_string': '7.0.0', 'arch': 'X86_64', 'bits': 64, 'count': 8, 'arch_string_raw': 'AMD64', 'vendor_id_raw': 'GenuineIntel', 'brand_raw': 'Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz', 'hz_advertised_friendly': '3.5000 GHz', 'hz_actual_friendly': '3.5010 GHz', 'hz_advertised': [3500000000, 0], 'hz_actual': [3501000000, 0], 'l2_cache_size': 1048576, 'stepping': 9, 'model': 58, 'family': 6, 'l3_cache_size': 8388608, 'flags': ['3dnow', 'clflush', 'cmov', 'de', 'dts', 'fxsr', 'ia64', 'mca', 'mce', 'mmx', 'mtrr', 'pse', 'sep', 'serial', 'ss', 'sse', 'sse2', 'tm']}

good:

{'python_version': '3.8.2.final.0 (64 bit)', 'cpuinfo_version': [7, 0, 0], 'cpuinfo_version_string': '7.0.0', 'arch': 'X86_64', 'bits': 64, 'count': 8, 'arch_string_raw': 'AMD64', 'vendor_id_raw': 'GenuineIntel', 'brand_raw': 'Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz', 'hz_advertised_friendly': '3.5000 GHz', 'hz_actual_friendly': '3.5010 GHz', 'hz_advertised': [3500000000, 0], 'hz_actual': [3501000000, 0], 'l2_cache_size': 1048576, 'stepping': 9, 'model': 58, 'family': 6, 'l3_cache_size': 8388608, 'flags': ['3dnow', 'acpi', 'aes', 'apic', 'avx', 'clflush', 'cmov', 'cx16', 'cx8', 'de', 'dts', 'erms', 'est', 'f16c', 'fpu', 'fxsr', 'ht', 'hypervisor', 'ia64', 'lahf_lm', 'mca', 'mce', 'mmx', 'msr', 'mtrr', 'osxsave', 'pae', 'pat', 'pbe', 'pcid', 'pclmulqdq', 'pdcm', 'pge', 'pni', 'popcnt', 'pse', 'pse36', 'rdrnd', 'sep', 'serial', 'smep', 'ss', 'sse', 'sse2', 'sse4_1', 'sse4_2', 'ssse3', 'tm', 'tm2', 'tsc', 'vme', 'xsave', 'xtpr'], 'l2_cache_line_size': 256, 'l2_cache_associativity': 6}

I've tried to have a look at how cpuinfo works, and looked at cpuinfo.CPUID().get_flags(8) which behaves differently:

>>> cpuinfo.CPUID().get_flags(8)
['acpi', 'aes', 'apic', 'avx', 'clflush', 'cmov', 'cx16', 'cx8', 'de', 'erms', 'est', 'f16c', 'fpu', 'fxsr', 'ht', 'hypervisor', 'mca', 'mce', 'mmx', 'msr', 'mtrr', 'osxsave', 'pae', 'pat', 'pbe', 'pcid', 'pclmulqdq', 'pdcm', 'pge', 'pni', 'popcnt', 'pse', 'pse36', 'rdrnd', 'sep', 'smep', 'ss', 'sse', 'sse2', 'sse4_1', 'sse4_2', 'ssse3', 'tm', 'tm2', 'tsc', 'vme', 'xsave', 'xtpr']

vs.

>>> cpuinfo.CPUID().get_flags(8)
Segmentation fault

I'm not sure the issue is in cpuinfo or the python distribution, but any workaround would be greatly appreciated.

@vondele
Copy link
Author

vondele commented Aug 2, 2020

This is being discussed here official-stockfish/fishtest#738 (comment)

@workhorsy
Copy link
Owner

I've never tried py-cpuinfo on msys2. I'll see if I can get it working.

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