提交 1a3948cc authored 作者: Chiheb Trabelsi's avatar Chiheb Trabelsi

nvcc_compiler.py has been modified in order to respect the flake8 style.

nvcc_compiler.py do not contain long lines.
上级 755d7cdf
......@@ -4,7 +4,6 @@ import logging
import os
import subprocess
import sys
import warnings
from locale import getpreferredencoding
import numpy
......@@ -249,7 +248,8 @@ class NVCC_compiler(Compiler):
_logger.debug('Writing module C++ code to %s', cppfilename)
cppfile.write(src_code)
lib_filename = os.path.join(location, '%s.%s' %
lib_filename = os.path.join(
location, '%s.%s' %
(module_name, get_lib_extension()))
_logger.debug('Generating shared lib %s', lib_filename)
......@@ -341,7 +341,7 @@ class NVCC_compiler(Compiler):
indexof = cmd.index('-u')
cmd.pop(indexof) # Remove -u
cmd.pop(indexof) # Remove argument to -u
except ValueError as e:
except ValueError:
done = True
# CUDA Toolkit v4.1 Known Issues:
......@@ -364,6 +364,8 @@ class NVCC_compiler(Compiler):
console_encoding = getpreferredencoding()
nvcc_stdout = decode_with(nvcc_stdout_raw, console_encoding)
nvcc_stderr = decode_with(nvcc_stderr_raw, console_encoding)
p = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
finally:
os.chdir(orig_dir)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论