From 515ac012c1143381aeab2c7a2f6da44bb4e50a35 Mon Sep 17 00:00:00 2001 From: edoapra Date: Fri, 14 Mar 2025 13:04:44 -0700 Subject: [PATCH] simd update --- .github/workflows/github_actions.yml | 3 +++ travis/guess_simd.sh | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index c40df70c55..701991ba7d 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -498,6 +498,9 @@ jobs: - name: Get Instruction id: get-simd run: | + if [[ $(uname -s) == Linux ]]; then + echo "SIMD " $(lscpu | grep -i flags | sort | uniq) + fi echo "simd=$(./travis/guess_simd.sh)" >> $GITHUB_ENV shell: bash - name: Setup cache diff --git a/travis/guess_simd.sh b/travis/guess_simd.sh index 3a5cc0b3ce..dd4f610c58 100755 --- a/travis/guess_simd.sh +++ b/travis/guess_simd.sh @@ -2,8 +2,7 @@ UNAME_S=$(uname -s) arch=`uname -m` if [[ ${UNAME_S} == Linux ]]; then - CPU_FLAGS=$(cat /proc/cpuinfo | grep flags |grep -v vmx\ flags |tail -n 1) - CPU_FLAGS_2=$(cat /proc/cpuinfo | grep flags |grep -v vmx\ flags |tail -n 1) + CPU_FLAGS=$(lscpu | grep -i flags | sort | uniq) elif [[ ${UNAME_S} == Darwin ]]; then CPU_FLAGS=$(/usr/sbin/sysctl -n machdep.cpu.features) if [[ "$arch" == "x86_64" ]]; then @@ -16,7 +15,7 @@ if [[ $(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /clzero/{print "Y"}') == "Y elif [[ $(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /avx512f/{print "Y"}') == "Y" ]]; then echo "avx512" exit 0 -elif [[ $(echo ${CPU_FLAGS_2} | tr 'A-Z' 'a-z'| awk ' /avx2/ {print "Y"}') == "Y" ]]; then +elif [[ $(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /avx2/ {print "Y"}') == "Y" ]]; then echo "avx2" exit 0 elif [[ $(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /avx/ {print "Y"}') == "Y" ]]; then