Skip to content

Commit cc71d50

Browse files
authored
[CONTRIB] Patch nnvcc to generate error when build the empty result (apache#1049)
1 parent 00d3cf1 commit cc71d50

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TVM: Tensor IR Stack for Deep Learning Systems
1+
<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
22
==============================================
33

44
[![GitHub license](http://dmlc.github.io/img/apache2.svg)](./LICENSE)

python/tvm/contrib/nvcc.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ def compile_cuda(code,
7575
msg += py_str(out)
7676
raise RuntimeError(msg)
7777

78-
return bytearray(open(file_target, "rb").read())
79-
78+
data = bytearray(open(file_target, "rb").read())
79+
if not data:
80+
raise RuntimeError(
81+
"Compilation error: empty result is generated")
82+
return data
8083

8184
def find_cuda_path():
8285
"""Utility function to find cuda path

0 commit comments

Comments
 (0)