Skip to content

Commit

Permalink
Check for supported CPU in entrypoint (triton-inference-server#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
deadeyegoodwin authored Aug 28, 2019
1 parent a799384 commit 540c4d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nvidia_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ else
fi
fi

if ! cat /proc/cpuinfo | grep flags | sort -u | grep avx >& /dev/null; then
echo
echo "ERROR: This container was built for CPUs supporting at least the AVX instruction set, but"
echo " the CPU detected was $(cat /proc/cpuinfo |grep "model name" | sed 's/^.*: //' | sort -u), which does not report"
echo " support for AVX. An Illegal Instrution exception at runtime is likely to result."
echo " See https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX ."
sleep 2
fi

if [[ "$(df -k /dev/shm |grep ^shm |awk '{print $2}') " == "65536 " ]]; then
echo
echo "NOTE: The SHMEM allocation limit is set to the default of 64MB. This may be"
Expand Down

0 comments on commit 540c4d4

Please sign in to comment.