Coder Social home page Coder Social logo

Comments (8)

workhorsy avatar workhorsy commented on August 19, 2024

It might.

In most places it just wraps the OS tool for getting the cpu flags. So it does not look for specific cpu flags, but passes on the list that it receives. Each tool names cpu flags differently. In the case of querying the CPUID register directly with:

from cpuinfo import cpuinfo
cpuinfo.get_cpu_info_from_cpuid()

It should check for the AVX2 flag. I would recommend trying a few of the different functions and seeing the results.

from py-cpuinfo.

workhorsy avatar workhorsy commented on August 19, 2024

Hmmm. Upon closer inspection, it seems that the get_cpu_info_from_cpuid() function is not checking for AVX2. I'll have to look at this later. It has been a long time since I wrote this assembly code.

I think this whole section is missing:
https://en.wikipedia.org/wiki/CPUID#EAX.3D7.2C_ECX.3D0:_Extended_Features

from py-cpuinfo.

alimanfoo avatar alimanfoo commented on August 19, 2024

Thanks a lot. I have a Python package which includes some C extensions, and
I need to detect AVX2 in order to decide which extensions to build.
Detection needs to work on Linux or Windows. If I can do this without cpuid
then that would be fine, although I guess using cpuid is the most direct
way to check.

On Friday, 15 January 2016, Matthew Brennan Jones [email protected]
wrote:

Hmmm. Upon closer inspection, it seems that the get_cpu_info_from_cpuid()
function is not checking for AVX2. I'll have to look at this later. It has
been a long time since I wrote this assembly code.

I think this whole section is missing:
https://en.wikipedia.org/wiki/CPUID#EAX.3D7.2C_ECX.3D0:_Extended_Features


Reply to this email directly or view it on GitHub
#29 (comment)
.

Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health http://cggh.org
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Web: http://purl.org/net/aliman
Email: [email protected] [email protected]
Tel: +44 (0)1865 287721

from py-cpuinfo.

fnino avatar fnino commented on August 19, 2024

Ran into the same issue; it is quite easy to solve in MacOS. You should merge info from
sysctl's machdep.cpu.features and machdep.cpu.leaf7_features

from py-cpuinfo.

workhorsy avatar workhorsy commented on August 19, 2024

I'm pretty sure this was incidentally fixed on another bug fix. Can anyone confirm that this works for them?

from py-cpuinfo.

fnino avatar fnino commented on August 19, 2024

Yes, bug was fixed. Works fine in macos 10.12.4

from py-cpuinfo.

fnino avatar fnino commented on August 19, 2024

great job, thanks !

from py-cpuinfo.

workhorsy avatar workhorsy commented on August 19, 2024

This should be working now. Re-open if you have any problems.

from py-cpuinfo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.