提交 9b417a83 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Dump the module code before showing the nvcc errors.

上级 4fe8381e
...@@ -317,6 +317,9 @@ class NVCC_compiler(object): ...@@ -317,6 +317,9 @@ class NVCC_compiler(object):
_logger.info("NVCC: %s", eline) _logger.info("NVCC: %s", eline)
if p.returncode: if p.returncode:
for i, l in enumerate(src_code.split('\n')):
print >> sys.stderr, i + 1, l
print >> sys.stderr, '==============================='
# filter the output from the compiler # filter the output from the compiler
for l in nvcc_stderr.split('\n'): for l in nvcc_stderr.split('\n'):
if not l: if not l:
...@@ -331,9 +334,6 @@ class NVCC_compiler(object): ...@@ -331,9 +334,6 @@ class NVCC_compiler(object):
except Exception: except Exception:
pass pass
print >> sys.stderr, l print >> sys.stderr, l
print >> sys.stderr, '==============================='
for i, l in enumerate(src_code.split('\n')):
print >> sys.stderr, i + 1, l
raise Exception('nvcc return status', p.returncode, raise Exception('nvcc return status', p.returncode,
'for cmd', ' '.join(cmd)) 'for cmd', ' '.join(cmd))
elif config.cmodule.compilation_warning and nvcc_stdout: elif config.cmodule.compilation_warning and nvcc_stdout:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论