-
Notifications
You must be signed in to change notification settings - Fork 97
Check cpuinfo only when needed. #180
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
Conversation
The cpuinfo module does not support s390x and fails to import, but we don't really need it since we've set CFLAGS. Move the import later so it's only used when actually checking CPU instruction support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this. It looks good. Only thought is that if user has set CFLAGS then sources for SSE2 and AVX2 modules from c-blosc will never be included. So, I.e., user might give CFLAGS="-mavx2" but would not get AVX2 modules compiled because sources would be excluded. Hope that makes sense.
Not sure what is best solution, maybe would have been better rather than have variables like DISABLE_NUMCODECS_AVX2 which only allows to turn something off, we should have ENABLE_NUMCODECS_AVX2 which could be set to 1 to force on or set to 0 to force off. Thoughts welcome.
Since those files require setting It's impossible to just look for a compiler option (e.g., |
Would it be possible to raise this with the developers of cpuinfo? |
It's known upstream: workhorsy/py-cpuinfo#69 |
It seems like the developer has done some work on it (has a branch) and probably needs more people from the community with access to that architecture to engage with him and try it out. Would you mind engaging in that issue directly and sharing a bit more about what in that branch doesn’t work? |
The cpuinfo module does not support s390x and fails to import, but we don't really need it since we've set
CFLAGS
. Move the import later so it's only used when actually checking CPU instruction support.TODO:
tox -e py37
passes locallytox -e py27
passes locallytox -e docs
passes locally