提交 fcbf2901 authored 作者: Frederic's avatar Frederic

added new flag: cmodule.compilation_warning

Bool value, default: False If True, will print compilation warning.
上级 5882f31b
......@@ -621,3 +621,9 @@ import theano and print the config variable, as in:
If True, will remove -O* parameter passed to g++.
This is useful to debug in gdb module compiled by Theano.
The parameter -g is passed by default to g++.
.. attribute:: cmodule.compilation_warning
Bool value, default: False
If True, will print compilation warning.
......@@ -48,6 +48,10 @@ AddConfigVar('cmodule.remove_gxx_opt',
"The parameter -g is passed by default to g++",
BoolParam(False))
AddConfigVar('cmodule.compilation_warning',
"If True, will print compilation warning.",
BoolParam(False))
def local_bitwidth():
"""
......@@ -1578,6 +1582,9 @@ class GCC_compiler(object):
# difficult to read.
raise Exception('Compilation failed (return status=%s): %s' %
(status, compile_stderr.replace('\n', '. ')))
elif config.cmodule.compilation_warning and compile_stderr:
# Print errors just below the command line.
print compile_stderr
#touch the __init__ file
file(os.path.join(location, "__init__.py"), 'w').close()
......
......@@ -325,6 +325,8 @@ class NVCC_compiler(object):
print >> sys.stderr, i + 1, l
raise Exception('nvcc return status', p.returncode,
'for cmd', ' '.join(cmd))
elif config.cmodule.compilation_warning and nvcc_stdout:
print nvcc_stdout
#touch the __init__ file
file(os.path.join(location, "__init__.py"), 'w').close()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论