Skip to content

Commit 2a0aede

Browse files
committed
[Fix] Replace VS Clang tools by official Clang-17.0.6.
1 parent 6ad5f5a commit 2a0aede

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ The command will download clang+llvm and build tvm from source. So it might take
197197

198198
Due to lack of stable clang+llvm prebuilt on Windows, Conda + Visual Studio is recommended to install dependencies.
199199

200-
First, install Visual Studio 2019 and toggle on `Desk development with C++` and `C++ Clang tools for Windows`. Then, create conda environment within `Developer PowerShell for VS 2019`:
200+
First, install Visual Studio 2022(/2019) and toggle on `Desk development with C++`. DO NOT toggle on `C++ Clang tools for Windows` because the Clang version is probably not compatible. And then install Clang-17.0.6 from [LLVM official release](https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/LLVM-17.0.6-win64.exe).
201+
202+
> Remember adding the installed directory `/path/to/LLVM/bin/` into your computer's environment variable `PATH`.
203+
204+
Then, create conda environment within `Developer PowerShell for VS 20XX`.
201205

202206
```powershell
203207
git clone --recursive https://github.com/microsoft/T-MAC.git
@@ -206,8 +210,6 @@ conda env create --file conda\tvm-build-environment.yaml
206210
conda activate tvm-build
207211
```
208212

209-
> If you are using Visual Studio 2022, replace `llvmdev =14.0.6` with `llvmdev =17.0.6` in the yaml file.
210-
211213
After that, build TVM with:
212214

213215
```powershell
@@ -224,6 +226,8 @@ cmake .. -A x64
224226
cmake --build . --config Release -- /m
225227
```
226228

229+
> If you encounter errors like `string sub-command regex, mode replace: regex "$" matched an empty string.` during running `cmake .. -A x64` while building TVM, don't worry, and just run `cmake .. -A x64` again. Check [this issue of LLVM](https://github.com/llvm/llvm-project/issues/83802) for more details.
230+
227231
Install `t_mac` from the source:
228232

229233
```powershell
@@ -239,7 +243,11 @@ pip install -e . -v
239243

240244
> The following process could be more complicated. However, if your deployment scenerio doesn't require a native build, you can use WSL/docker and follow the Ubuntu guide.
241245
242-
First, install Visual Studio 2022(/2019) and toggle on `Desk development with C++`. Then, create conda environment within `Developer PowerShell for VS 20XX`.
246+
First, install Visual Studio 2022(/2019) and toggle on `Desk development with C++`. DO NOT toggle on `C++ Clang tools for Windows` because the Clang version is probably not compatible. And then install Clang-17.0.6 from [LLVM official release](https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/LLVM-17.0.6-win64.exe).
247+
248+
> Remember adding the installed directory `/path/to/LLVM/bin/` into your computer's environment variable `PATH`.
249+
250+
Then, create conda environment within `Developer PowerShell for VS 20XX`.
243251

244252
```powershell
245253
git clone --recursive https://github.com/microsoft/T-MAC.git
@@ -248,8 +256,6 @@ conda env create --file conda\tvm-build-environment.yaml
248256
conda activate tvm-build
249257
```
250258

251-
Remember to replace `llvmdev =14.0.6` with `llvmdev =17.0.6` in the yaml file if you are using Visual Studio 2022 (which is recommended on ARM64 for better performance).
252-
253259
After that, build TVM with:
254260

255261
```powershell

conda/tvm-build-environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
- python=3.8 # or 3.8. See https://github.com/apache/tvm/issues/8577 for more details on >= 3.9
1111
- conda-build
1212
# - git
13-
- llvmdev =14.0.6 # llvmdev=18 can't compile TVM. llvmdev=17.0.6 cmake bug
13+
- llvmdev=17.0.6 # llvmdev=18 can't compile TVM.
1414
# - clangxx # windows visual studio already equipped with Clang
1515
- numpy
1616
- pytest

0 commit comments

Comments
 (0)