提交 6d26406f authored 作者: notoraptor's avatar notoraptor

Add new internal config flag `cuda.disable`

which allow to disable C code compilation in old backend when it is set to true.
上级 8b9f7336
......@@ -199,6 +199,13 @@ AddConfigVar(
StrParam(default_cuda_root),
in_c_key=False)
# To be used as an internal config or for developers (i.e. not to be put in documentation)
AddConfigVar(
'cuda.disable',
'If true, C code in old backend is not compiled.',
BoolParam(False),
in_c_key=False)
def filter_nvcc_flags(s):
assert isinstance(s, str)
......
......@@ -24,9 +24,12 @@ nvcc_version = None
def is_nvcc_available():
"""
Return True iff the nvcc compiler is found.
Return True if the nvcc compiler is found.
"""
if config.cuda.disable:
return False
def set_version():
p_out = output_subprocess_Popen([nvcc_path, '--version'])
ver_line = decode(p_out[0]).strip().split('\n')[-1]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论