From cc0dfcd8e3a7ab343c6bdd6592dde923c0452fab Mon Sep 17 00:00:00 2001 From: tqchen Date: Sun, 2 May 2021 16:09:32 -0400 Subject: [PATCH] [NVCC] Bugfix nvcc command tool that relies on the compile time env --- python/tvm/contrib/nvcc.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python/tvm/contrib/nvcc.py b/python/tvm/contrib/nvcc.py index 99844f799d7ab..19063486c2bc1 100644 --- a/python/tvm/contrib/nvcc.py +++ b/python/tvm/contrib/nvcc.py @@ -89,10 +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") + # TODO(tvm-team): consider add cxx compiler path detection for windows + # 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. + # NOTE: we canont use TVM_CXX_COMPILER_PATH because the runtime env can be different + # from the compilation env. + 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] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)