File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ cmake~=3.31.0
33flynt ~= 1.0
44pytest
55pytest-xdist
6+ py-cpuinfo
Original file line number Diff line number Diff line change @@ -28,28 +28,10 @@ if [[ "$1" == "-h" || "$1" == "--help" || "$1" == "help" ]]; then
2828 exit 0
2929fi
3030
31- declare features=" "
32- shopt -s nocasematch
33- # Note: can't use Bash $OSTYPE var here b/c the value is "linux-gnu" on Win 10.
34- case " $( uname -s) " in
35- darwin* )
36- features=$( sysctl machdep.cpu.features)
37- ;;
38- linux* )
39- features=$( grep -m1 -i " ^flags" /proc/cpuinfo)
40- ;;
41- windows* |cygwin* |mingw32* |msys* |mingw* )
42- features=$( wmic cpu get Caption,InstructionSet /value 2> /dev/null)
43- ;;
44- * )
45- echo " Unsupported OS: $( uname -s) "
46- exit 1
47- ;;
48- esac
49- shopt -u nocasematch
50-
5131# Unless we can tell this system supports AVX, we skip those tests.
32+ declare features=" "
5233declare filters=" "
34+ features=" $( python -c ' import cpuinfo; print(" ".join(cpuinfo.get_cpu_info().get("flags", [])))' ) "
5335[[ " $features " == * avx2* ]] || filters+=" ,-avx"
5436[[ " $features " == * sse* ]] || filters+=" ,-sse"
5537filters=" ${filters# ,} "
You can’t perform that action at this time.
0 commit comments