Commit 4c4a8ea4 by Tatsuya Nishiyama Committed by Tianqi Chen

[CUDA][TVM] fix constructing invalid command line string for nvcc (#1674)

parent fae3f60c
......@@ -28,7 +28,7 @@ def compile_cuda(code,
arch : str
The architecture
options : str
options : str or list of str
The additional options
path_target : str, optional
......@@ -59,10 +59,16 @@ def compile_cuda(code,
cmd = ["nvcc"]
cmd += ["--%s" % target, "-O3"]
cmd += ["-arch", arch]
cmd += ["-o", file_target]
if options:
cmd += options
if isinstance(options, str):
cmd += [options]
elif isinstance(options, list):
cmd += options
else:
raise ValueError("options must be str or list of str")
cmd += ["-o", file_target]
cmd += [temp_code]
proc = subprocess.Popen(
......
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