提交 c3c673d4 编写于 作者: Z zhangjun

fix err for py3

上级 b3a52cb9
...@@ -334,7 +334,7 @@ class Server(object): ...@@ -334,7 +334,7 @@ class Server(object):
def check_avx(self): def check_avx(self):
p = subprocess.Popen(['cat /proc/cpuinfo | grep avx 2>/dev/null'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) p = subprocess.Popen(['cat /proc/cpuinfo | grep avx 2>/dev/null'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
out, err = p.communicate() out, err = p.communicate()
if err == '' and len(out) > 0: if err == b'' and len(out) > 0:
return True return True
else: else:
return False return False
...@@ -346,6 +346,7 @@ class Server(object): ...@@ -346,6 +346,7 @@ class Server(object):
avx_flag = True avx_flag = True
self.use_mkl(True) self.use_mkl(True)
mkl_flag = self.mkl_flag mkl_flag = self.mkl_flag
print(avx_support)
if avx_flag: if avx_flag:
if mkl_flag: if mkl_flag:
device_version = "cpu-avx-mkl" device_version = "cpu-avx-mkl"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册