message: auto detect cpu avx instruction set
diff: @@ -330,12 +330,21 @@ class Server(object):
  def use_mkl(self, flag):
  self.mkl_flag = flag
  + def check_avx(self):
  + p = subprocess.Popen(['cat /proc/cpuinfo | grep avx 2>/dev/null'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
  + out, err = p.communicate()
  + if err == '' and len(out) > 0:
  + return True
  + else:
  + return False
  +
  def get_device_version(self):
  avx_flag = False
  - mkl_flag = self.mkl_flag
  - r = os.system("cat /proc/cpuinfo | grep avx > /dev/null 2>&1")
  - if r == 0:
  + avx_support = self.check_avx()
  + if avx_suppport:
  avx_flag = True
  + self.use_mkl(True)
  + mkl_flag = self.mkl_flag
  if avx_flag:
  if mkl_flag:
  device_version = "cpu-avx-mkl"
  