"examples/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "131fb2c192aa066ce22edd92c9e534a555566327"
Unverified Commit 8ea00774 authored by Yang Chen's avatar Yang Chen Committed by GitHub
Browse files

[Bugfix] Passing correct nvcc to cmake (#670)

cmake doesn't take the nvcc specified by CUDA_HOME by default.
Consequently, the follow command failed for me because cmake still
used the nvcc from the default location (e.g. in my case
/usr/local/cuda/bin/nvcc):

```
$ PATH=/home/yangche/cuda-12.8/bin:$PATH CUDA_HOME=/home/yangche/cuda-12.8 pip install -e . -v
```

This minor fix enforces cmake to use the nvcc specified by the CUDA_HOME env.
parent 56a8a644
......@@ -818,6 +818,8 @@ class TilelangExtensionBuild(build_ext):
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}", f"-DPYTHON_EXECUTABLE={sys.executable}",
f"-DCMAKE_BUILD_TYPE={'Debug' if DEBUG_MODE else 'Release'}"
]
if not USE_ROCM:
cmake_args.append(f"-DCMAKE_CUDA_COMPILER={os.path.join(CUDA_HOME, 'bin', 'nvcc')}")
# Create the temporary build directory (if it doesn't exist).
build_temp = os.path.abspath(self.build_temp)
......
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