提交 45f47901 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed cache crash when the file is named mod.cu rather than mod.cpp

上级 7e064330
......@@ -215,6 +215,9 @@ def get_module_hash(module_file, key):
2. The compiler options defined in `key`.
"""
source_code = os.path.join(os.path.dirname(module_file), 'mod.cpp')
if not os.path.exists(source_code):
source_code = os.path.join(os.path.dirname(module_file), 'mod.cu')
assert os.path.exists(source_code)
source_hash = hash_from_file(source_code)
c_link_key = key[1]
# Currently, in order to catch potential bugs early, we are very
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论