未验证 提交 e0c6791e 编写于 作者: J Jiawei Wang 提交者: GitHub

Merge pull request #1278 from zhangjun/fix-avx

fix avx check
......@@ -334,7 +334,7 @@ class Server(object):
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:
if err == b'' and len(out) > 0:
return True
else:
return False
......@@ -342,7 +342,7 @@ class Server(object):
def get_device_version(self):
avx_flag = False
avx_support = self.check_avx()
if avx_suppport:
if avx_support:
avx_flag = True
self.use_mkl(True)
mkl_flag = self.mkl_flag
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册