Commit cc71d505 by Tianqi Chen Committed by GitHub

[CONTRIB] Patch nnvcc to generate error when build the empty result (#1049)

parent 00d3cf11
TVM: Tensor IR Stack for Deep Learning Systems
<img src=https://raw.githubusercontent.com/tqchen/tvmlang.org/master/images/logo/tvm-logo-small.png width=128/> Tensor IR Stack for Deep Learning Systems
==============================================
[![GitHub license](http://dmlc.github.io/img/apache2.svg)](./LICENSE)
......
......@@ -75,8 +75,11 @@ def compile_cuda(code,
msg += py_str(out)
raise RuntimeError(msg)
return bytearray(open(file_target, "rb").read())
data = bytearray(open(file_target, "rb").read())
if not data:
raise RuntimeError(
"Compilation error: empty result is generated")
return data
def find_cuda_path():
"""Utility function to find cuda path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment