From f9b8ee9b512a7fd95b3338ee20959f0149bf99dd Mon Sep 17 00:00:00 2001 From: tqchen Date: Sun, 2 May 2021 16:09:32 -0400 Subject: [PATCH 1/2] [NVCC] Bugfix nvcc command tool that relies on the compile time env --- python/tvm/contrib/nvcc.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python/tvm/contrib/nvcc.py b/python/tvm/contrib/nvcc.py index 99844f799d7a..d92efb2e513b 100644 --- a/python/tvm/contrib/nvcc.py +++ b/python/tvm/contrib/nvcc.py @@ -89,11 +89,13 @@ def compile_cuda(code, target="ptx", arch=None, options=None, path_target=None): cmd += ["-o", file_target] cmd += [temp_code] - cxx_compiler_path = tvm.support.libinfo().get("TVM_CXX_COMPILER_PATH") - if cxx_compiler_path != "": - # This tells nvcc where to find the c++ compiler just in case it is not in the path. - # On Windows it is not in the path by default. - cmd += ["-ccbin", cxx_compiler_path] + # NOTE: ccbin option can be used to tell nvcc where to find the c++ compiler + # just in case it is not in the path. On Windows it is not in the path by default. + # However, we cannot we canont use TVM_CXX_COMPILER_PATH because the runtime env. + # Because it is hard to do runtime compiler detection, we require nvcc is configured + # correctly by default. + # if cxx_compiler_path != "": + # cmd += ["-ccbin", cxx_compiler_path] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) From b09e50265113c528255213869f583e3e6125ac8f Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Sun, 2 May 2021 17:13:30 -0400 Subject: [PATCH 2/2] Update python/tvm/contrib/nvcc.py Co-authored-by: Cody Yu --- python/tvm/contrib/nvcc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/contrib/nvcc.py b/python/tvm/contrib/nvcc.py index d92efb2e513b..6a7c09860b07 100644 --- a/python/tvm/contrib/nvcc.py +++ b/python/tvm/contrib/nvcc.py @@ -91,7 +91,7 @@ def compile_cuda(code, target="ptx", arch=None, options=None, path_target=None): # NOTE: ccbin option can be used to tell nvcc where to find the c++ compiler # just in case it is not in the path. On Windows it is not in the path by default. - # However, we cannot we canont use TVM_CXX_COMPILER_PATH because the runtime env. + # However, we cannot use TVM_CXX_COMPILER_PATH because the runtime env. # Because it is hard to do runtime compiler detection, we require nvcc is configured # correctly by default. # if cxx_compiler_path != "":