# Unofficial autoTVM on Windows Guide

**URL:** <https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711>\
**Category:** Announcements\
**Created:** [November 12, 2019, 5:14am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711 "2019-11-12T05:14:29Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![jmorrill](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/jmorrill/32/1023_2.png) [@jmorrill](https://discuss.tvm.apache.org/u/jmorrill)\
**Post date:** [December 23, 2019, 4:31am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/21 "2019-12-23T04:31:14Z")

</div>

Awesome! Thanks!

I’ll give it a shot and update my fork mod (which currently was a try/except block)

---

<div class="post-metadata">

**Author:** ![jmorrill](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/jmorrill/32/1023_2.png) [@jmorrill](https://discuss.tvm.apache.org/u/jmorrill)\
**Post date:** [December 26, 2019, 7:56pm UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/22 "2019-12-26T19:56:22Z")

</div>

It worked out perfectly. I updated my fork. Always feels nice to delete some code 🙂

Thanks again!

---

<div class="post-metadata">

**Author:** ![ZoomWang](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/z/eb8c5e/32.png) [@ZoomWang](https://discuss.tvm.apache.org/u/ZoomWang)\
**Post date:** [February 23, 2020, 12:21pm UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/24 "2020-02-23T12:21:14Z")

</div>

@jmorrill It seems the site of docs for Unofficial autoTVM on Windows can’t be reached. Could you post the docs on Unofficial autoTVM on Windows? Thanks a lot!

---

<div class="post-metadata">

**Author:** ![jmorrill](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/jmorrill/32/1023_2.png) [@jmorrill](https://discuss.tvm.apache.org/u/jmorrill)\
**Post date:** [February 23, 2020, 6:08pm UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/25 "2020-02-23T18:08:26Z")

</div>

Not sure what’s up with Google docs, but u can try this link [https://www.dropbox.com/s/3dvdzi7qyvos6hz/Unofficial%20autoTVM%20on%20Windows.pdf?dl=0](https://www.dropbox.com/s/3dvdzi7qyvos6hz/Unofficial%20autoTVM%20on%20Windows.pdf?dl=0)

---

<div class="post-metadata">

**Author:** ![ghgggg](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@ghgggg](https://discuss.tvm.apache.org/u/ghgggg)\
**Post date:** [April 8, 2020, 11:23am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/26 "2020-04-08T11:23:12Z")

</div>

hi ，have you deploy a model using tvm on windows？if so，could you show me some example code？I am using tvm to deploy a model on windows with cpu，but error occurs like this ‘No symbol file loaded for deploy\_lib.dll’,could you give me some advices?thanks a lot！

---

<div class="post-metadata">

**Author:** ![jmorrill](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/jmorrill/32/1023_2.png) [@jmorrill](https://discuss.tvm.apache.org/u/jmorrill)\
**Post date:** [April 8, 2020, 5:17pm UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/27 "2020-04-08T17:17:24Z")

</div>

> [@ghgggg](#):
>
> No symbol file loaded for

“No symbol file” is not an error. It is the debugger saying there are no debug symbols available.

If you’ve managed to compile TVM, the code for windows and linux are the same. There’s something that don’t work out of the box on Windows (like autotvm), but you dont need that if you already have the tuning log file that was made on linux via autotvm.

---

<div class="post-metadata">

**Author:** ![ghgggg](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@ghgggg](https://discuss.tvm.apache.org/u/ghgggg)\
**Post date:** [April 9, 2020, 3:38am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/28 "2020-04-09T03:38:01Z")

</div>

thank you very much for your reply. I’m trying to deploy a model using tvm on windows, tvm building and model compilation goes well(i’m not sure the model is well, no errors printed on the screen ),but when I call the api of tvm to load and run, it’s wrong like ‘no symbol loaded for …’. So if no symbol loaded for the dll file,how could I do to solve this?

In your another article [TVM on Windows - Tips(?) and Feedback](https://discuss.tvm.ai/t/tvm-on-windows-tips-and-feedback/4341), you mention that  
“If you use GraphRuntime, there is a small issue using runtime/graph\_runtime.h and linker errors. MSVC does not export symbols by default, but setting WINDOWS\_EXPORT\_ALL\_SYMBOLS with the tvm\_runtime dll, CMAKE will do this for you and fixed my linker issues.”

I run the code without tvm\_runtime.dll,just with the tvm.dll and tvm\_topi.dll ,if I need do what you mentioned above?

---

<div class="post-metadata">

**Author:** ![jmorrill](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/jmorrill/32/1023_2.png) [@jmorrill](https://discuss.tvm.apache.org/u/jmorrill)\
**Post date:** [April 9, 2020, 4:18am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/29 "2020-04-09T04:18:20Z")

</div>

WINDOWS\_EXPORT\_ALL\_SYMBOLS is no longer needed in the current source off of master.

I guess I am confused where you are at.

Are you using the GraphRuntime api from C++ and loading your “deploy\_lib.dll” with it?

---

<div class="post-metadata">

**Author:** ![ghgggg](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@ghgggg](https://discuss.tvm.apache.org/u/ghgggg)\
**Post date:** [April 9, 2020, 6:48am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/30 "2020-04-09T06:48:27Z")

</div>

**Thank you a lot. my tvm version is 0.6.dev and llvm version is 9.0.0. I’m using tvm runtime api from C++ to load deploy\_lib.dll and infer the network .some code is copied below.**

_tvm::runtime::Module mod\_syslib = tvm::runtime::Module::LoadFromFile(deploy\_lib);_

_std::ifstream json\_in(deploy\_graph);_

_std::string json\_data((std::istreambuf\_iterator(json\_in)), std::istreambuf\_iterator());_

_json\_in.close();_

_int device\_type = device\_type\_;__int device\_id = device\_id\_;_

\*tvm::runtime::Module mod = (_tvm::runtime::Registry::Get(“tvm.graph\_runtime.create”))(json\_data, mod\_syslib, device\_type, device\_id);_

_this-\>handle = new tvm::runtime::Module(mod);_

_std::ifstream params\_in(deploy\_param, std::ios::binary);_

_std::string params\_data((std::istreambuf\_iterator(params\_in)), std::istreambuf\_iterator());__params\_in.close();_

_TVMByteArray params\_arr;_

_params\_arr.data = params\_data.c\_str();_

_params\_arr.size = params\_data.length();_

_tvm::runtime::PackedFunc load\_params = mod.GetFunction(“load\_params”);_

_if (load\_params == nullptr) { std::cerr \<\< “load func error.\n”; abort(); }_

_load\_params(params\_arr);_

**all codes above is runing well ,but when I run the following code ,it is wrong**

_tvm::runtime::Module_ mod = (tvm::runtime::Module\*)handle;\*

_tvm::runtime::PackedFunc set\_input = mod-\>GetFunction(“set\_input”);_

_set\_input(“data”, input);_

_tvm::runtime::PackedFunc run = mod-\>GetFunction(“run”);_

_if (run != nullptr) run(); // this line error_

**the debugger tells me no symbol loaded for tvm.dll, how to make the symbol loaded. PS: the debugger also tell me “deploy.lib.dll” was built without symbols. looking forward to your reply 😇**

---

<div class="post-metadata">

**Author:** ![jmorrill](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/jmorrill/32/1023_2.png) [@jmorrill](https://discuss.tvm.apache.org/u/jmorrill)\
**Post date:** [April 9, 2020, 8:09am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/31 "2020-04-09T08:09:56Z")

</div>

When you do the “run()”, what exception is being thrown? Can you try/catch and output the exception.what()?

Also, TVM may also log some verbose messages to your console window. Do you see anything there?

---

<div class="post-metadata">

**Author:** ![ghgggg](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@ghgggg](https://discuss.tvm.apache.org/u/ghgggg)\
**Post date:** [April 9, 2020, 9:15am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/32 "2020-04-09T09:15:16Z")

</div>

😇 😀 😀 😀  
I use try catch and found the run function runs well ,the mistake is the function “getoutput”.So I found the mistake and now it runs well.my code is right but the config file wrong = =.Thank you very much for your patient advice. ps: console window see nothing 😄

---

<div class="post-metadata">

**Author:** ![pankuolung](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/p/f04885/32.png) [@pankuolung](https://discuss.tvm.apache.org/u/pankuolung)\
**Post date:** [April 13, 2020, 7:00am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/33 "2020-04-13T07:00:05Z")

</div>

Hi there,

Want to build TVM on windows10 by auto TVM on windows10 google doc. Below is the setup that I did.

1. Get the source code by below command git clone --recursive http:https://github.com/jmorrill/tvm.git tvm

2. Open LLVM, CUDA, OPENMP as ON in config.make and use Cmake GUI compile and well.

3. Use below command to gernate release msbuild tvm.sln /p:Configuration=Release

4. Show the errors below “d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.sln” (預設目標) (1) -\> “d:\MyStudy\DeepLearning\tvm\tvm\build\ALL\_BUILD.vcxproj.metaproj” (預設目標) (2) -\> “d:\MyStudy\DeepLearning\tvm\tvm\build\nnvm\_compiler.vcxproj.metaproj” (預設目標) (4) -\> “d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj.metaproj” (預設目標) (5) -\> “d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj” (預設目標) (6) -\> (ClCompile 目標) -\> D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(135,1): error C2065: ‘amdgcn\_workitem\_id\_x’: 未宣告的識別項 [d:\MyStudy\D eepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(138,48): error C2039: ‘amdgcn\_workitem\_id\_x’: 並非 ‘llvm::Intrinsic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(138,1): error C2065: ‘amdgcn\_workitem\_id\_x’: 未宣告的識別項 [d:\MyStudy\D eepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(139,48): error C2039: ‘amdgcn\_workitem\_id\_y’: 並非 ‘llvm::Intrinsic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(139,1): error C2065: ‘amdgcn\_workitem\_id\_y’: 未宣告的識別項 [d:\MyStudy\D eepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(140,48): error C2039: ‘amdgcn\_workitem\_id\_z’: 並非 ‘llvm::Intrinsic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(140,1): error C2065: ‘amdgcn\_workitem\_id\_z’: 未宣告的識別項 [d:\MyStudy\D eepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(146,48): error C2039: ‘amdgcn\_workgroup\_id\_x’: 並非 'llvm::Intrinsic ’ 的成員D:\MyStudy\DeepLearning\tvm\llvm-project-master\llvm\include\llvm/Support/type\_traits.h(91,1): warning C4624: ‘llvm::detail::trivi al\_helper’: 解構函式已隱含已刪除的意思 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(146,1): error C2065: ‘amdgcn\_workgroup\_id\_x’: 未宣告的識別項 [d:\MyStudy  
DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(147,48): error C2039: ‘amdgcn\_workgroup\_id\_y’: 並非 'llvm::Intrinsic ’ 的成員D:\MyStudy\DeepLearning\tvm\llvm-project-master\llvm\include\llvm/ADT/Optional.h(216): note: 請參考正在進行編譯的 類別 樣板 具現化 ‘llvm::is\_trivia lly\_copyable’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(147,1): error C2065: ‘amdgcn\_workgroup\_id\_y’: 未宣告的識別項 [d:\MyStudy  
DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(148,48): error C2039: ‘amdgcn\_workgroup\_id\_z’: 並非 'llvm::Intrinsic ’ 的成員D:\MyStudy\DeepLearning\tvm\llvm-project-master\llvm\include\llvm/Support/type\_traits.h(91,1): warning C4624: ‘llvm::detail::trivi al\_helper’: 解構函式已隱含已刪除的意思 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(148,1): error C2065: ‘amdgcn\_workgroup\_id\_z’: 未宣告的識別項 [d:\MyStudy  
DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(163,30): error C2039: ‘amdgcn\_s\_barrier’: 並非 ‘llvm::Intrinsic’ 的成員 D:\MyStudy\DeepLearning\tvm\llvm-project-master\llvm\include\llvm/IR/Instructions.h(348,23): warning C4244: ‘return’: 將 ‘uint64\_t’ 轉換為 ‘unsigned int’，由於類型不同，可能導致資料遺失 (正在編譯原始程式檔 D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\intrin\_rule\_llvm.cc) [d:\MyStudy\DeepLearnin g\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(163,1): error C2065: ‘amdgcn\_s\_barrier’: 未宣告的識別項 [d:\MyStudy\DeepL earning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_amdgpu.cc(241,41): error C2440: ‘正在初始化’: 無法由 ‘llvm::StringRef’ 轉換為 ‘std::bas ic\_string\<char,std::char\_traits,std::allocator\>’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_arm.cc(61,57): error C2039: ‘arm\_neon\_vpaddlu’: 並非 ‘llvm::Intrinsic’ 的成員 [d: \MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_arm.cc(61,73): error C2065: ‘arm\_neon\_vpaddlu’: 未宣告的識別項 [d:\MyStudy\DeepLear ning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_cpu.cc(340,70): error C2664: ‘llvm::CallInst \*llvm::IRBuilderBase::CreateCal l(llvm::FunctionCallee,llvm::ArrayRef\<llvm::Value \*\>,llvm::ArrayRefllvm::OperandBundleDef,const llvm::Twine &,llvm::MDNode \*)’: 無法將引數 1 從 ‘llvm::Value \*’ 轉換為 ‘llvm::FunctionType \*’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_cpu.cc(520,15): error C2664: ‘llvm::CallInst \*llvm::IRBuilderBase::CreateCal l(llvm::FunctionCallee,llvm::ArrayRef\<llvm::Value \*\>,llvm::ArrayRefllvm::OperandBundleDef,const llvm::Twine &,llvm::MDNode \*)’: 無法將引數 1 從 ‘llvm::Value \*’ 轉換為 ‘llvm::FunctionType \*’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_cpu.cc(656,34): error C2664: ‘llvm::CallInst \*llvm::IRBuilderBase::CreateCal l(llvm::FunctionCallee,llvm::ArrayRef\<llvm::Value \*\>,llvm::ArrayRefllvm::OperandBundleDef,const llvm::Twine &,llvm::MDNode \*)’: 無法將引數 1 從 ‘llvm::Value \*’ 轉換為 ‘llvm::FunctionType \*’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_cpu.cc(692,52): error C2664: ‘llvm::CallInst \*llvm::IRBuilderBase::CreateCal l(llvm::FunctionCallee,llvm::ArrayRef\<llvm::Value \*\>,llvm::ArrayRefllvm::OperandBundleDef,const llvm::Twine &,llvm::MDNode \*)’: 無法將引數 1 從 ‘llvm::Value \*’ 轉換為 ‘llvm::FunctionType \*’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_cpu.cc(865,58): error C2664: ‘llvm::CallInst \*llvm::IRBuilderBase::CreateCal l(llvm::FunctionCallee,llvm::ArrayRef\<llvm::Value \*\>,llvm::ArrayRefllvm::OperandBundleDef,const llvm::Twine &,llvm::MDNode \*)’: 無法將引數 1 從 ‘llvm::Value \*’ 轉換為 ‘llvm::FunctionType \*’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_cpu.cc(892,15): error C2664: ‘llvm::CallInst \*llvm::IRBuilderBase::CreateCal l(llvm::FunctionCallee,llvm::ArrayRef\<llvm::Value \*\>,llvm::ArrayRefllvm::OperandBundleDef,const llvm::Twine &,llvm::MDNode \*)’: 無法將引數 1 從 ‘llvm::Value \*’ 轉換為 ‘llvm::FunctionType \*’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_llvm.cc(94,66): error C2440: ‘正在初始化’: 無法由 ‘llvm::StringRef’ 轉換為 ‘std::basic\_ string\<char,std::char\_traits,std::allocator\>’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_llvm.cc(192,41): error C2440: ‘正在初始化’: 無法由 ‘llvm::StringRef’ 轉換為 ‘std::basic \_string\<char,std::char\_traits,std::allocator\>’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_llvm.cc(201,41): error C2440: ‘正在初始化’: 無法由 ‘llvm::StringRef’ 轉換為 ‘std::basic \_string\<char,std::char\_traits,std::allocator\>’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_llvm.cc(447,68): error C2664: ‘llvm::Constant \*llvm::ConstantVector::getSpla t(llvm::ElementCount,llvm::Constant \*)’: 無法將引數 1 從 ‘int’ 轉換為 ‘llvm::ElementCount’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(111,56): error C2039: ‘nvvm\_read\_ptx\_sreg\_tid\_x’: 並非 ‘llvm::Intrins ic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(111,1): error C2065: ‘nvvm\_read\_ptx\_sreg\_tid\_x’: 未宣告的識別項 [d:\MyStud y\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(114,48): error C2039: ‘nvvm\_read\_ptx\_sreg\_tid\_x’: 並非 ‘llvm::Intrins ic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(114,1): error C2065: ‘nvvm\_read\_ptx\_sreg\_tid\_x’: 未宣告的識別項 [d:\MyStud y\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(115,48): error C2039: ‘nvvm\_read\_ptx\_sreg\_tid\_y’: 並非 ‘llvm::Intrins ic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(115,1): error C2065: ‘nvvm\_read\_ptx\_sreg\_tid\_y’: 未宣告的識別項 [d:\MyStud y\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(116,48): error C2039: ‘nvvm\_read\_ptx\_sreg\_tid\_z’: 並非 ‘llvm::Intrins ic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(116,1): error C2065: ‘nvvm\_read\_ptx\_sreg\_tid\_z’: 未宣告的識別項 [d:\MyStud y\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(122,48): error C2039: ‘nvvm\_read\_ptx\_sreg\_ctaid\_x’: 並非 ‘llvm::Intri nsic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(122,1): error C2065: ‘nvvm\_read\_ptx\_sreg\_ctaid\_x’: 未宣告的識別項 [d:\MySt udy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(123,48): error C2039: ‘nvvm\_read\_ptx\_sreg\_ctaid\_y’: 並非 ‘llvm::Intri nsic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(123,1): error C2065: ‘nvvm\_read\_ptx\_sreg\_ctaid\_y’: 未宣告的識別項 [d:\MySt udy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(124,48): error C2039: ‘nvvm\_read\_ptx\_sreg\_ctaid\_z’: 並非 ‘llvm::Intri nsic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(124,1): error C2065: ‘nvvm\_read\_ptx\_sreg\_ctaid\_z’: 未宣告的識別項 [d:\MySt udy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(140,30): error C2039: ‘nvvm\_barrier0’: 並非 ‘llvm::Intrinsic’ 的成員 [d: \MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(140,1): error C2065: ‘nvvm\_barrier0’: 未宣告的識別項 [d:\MyStudy\DeepLearn ing\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_nvptx.cc(219,43): error C2440: ‘正在初始化’: 無法由 ‘llvm::StringRef’ 轉換為 ‘std::basi c\_string\<char,std::char\_traits,std::allocator\>’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_x86\_64.cc(88,30): error C2039: ‘x86\_avx512\_mask\_vcvtph2ps\_512’: 並非 ‘llvm::In trinsic’ 的成員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_x86\_64.cc(88,59): error C2065: ‘x86\_avx512\_mask\_vcvtph2ps\_512’: 未宣告的識別項 [d:  
MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_x86\_64.cc(100,30): error C2039: ‘x86\_vcvtph2ps\_256’: 並非 ‘llvm::Intrinsic’ 的成 員 [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\codegen\_x86\_64.cc(100,47): error C2065: ‘x86\_vcvtph2ps\_256’: 未宣告的識別項 [d:\MyStudy\Dee pLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\llvm\_common.cc(120,26): error C2039: ‘getDefaultTargetTriple’: 並非 ‘llvm::sys’ 的成員 [d :\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\llvm\_common.cc(120,48): error C3861: ‘getDefaultTargetTriple’: 找不到識別項 [d:\MyStudy\De epLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\llvm\_common.cc(154,32): error C2039: ‘getDefaultTargetTriple’: 並非 ‘llvm::sys’ 的成員 [d :\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\llvm\_common.cc(154,54): error C3861: ‘getDefaultTargetTriple’: 找不到識別項 [d:\MyStudy\De epLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\llvm\_module.cc(225,1): error C2440: ‘正在初始化’: 無法由 ‘llvm::StringRef’ 轉換為 ‘std::basic\_s tring\<char,std::char\_traits,std::allocator\>’ [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\src\codegen\llvm\llvm\_module.cc(234,1): error C2679: 二元運算子 ‘=’: 找不到使用右方運算元類型 ‘llvm::StringRef’ 的運算子 ( 或是沒有可接受的轉換) [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj] D:\MyStudy\DeepLearning\tvm\tvm\include\tvm/runtime/container.h(201,32): error C2990: ‘tvm::runtime::InplaceArrayBase’: 非類別 樣板 已宣告為類別 樣板 (正在編譯原始程式檔 D:\MyStudy\DeepLearning\tvm\tvm\src\runtime\vm\vm.cc) [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.vcxproj]

“d:\MyStudy\DeepLearning\tvm\tvm\build\tvm.sln” (預設目標) (1) -\> “d:\MyStudy\DeepLearning\tvm\tvm\build\ALL\_BUILD.vcxproj.metaproj” (預設目標) (2) -\> “d:\MyStudy\DeepLearning\tvm\tvm\build\tvm\_runtime.vcxproj.metaproj” (預設目標) (7) -\> “d:\MyStudy\DeepLearning\tvm\tvm\build\tvm\_runtime.vcxproj” (預設目標) (8) -\> D:\MyStudy\DeepLearning\tvm\tvm\include\tvm/runtime/container.h(201,32): error C2990: ‘tvm::runtime::InplaceArrayBase’: 非類別 樣板 已宣告為類別 樣板 (正在編譯原始程式檔 D:\MyStudy\DeepLearning\tvm\tvm\src\runtime\vm\vm.cc) [d:\MyStudy\DeepLearning\tvm\tvm\build\tvm\_runtime.vcxproj]

Could you please advise?

Thank you!

Mason

---

<div class="post-metadata">

**Author:** ![jmorrill](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/jmorrill/32/1023_2.png) [@jmorrill](https://discuss.tvm.apache.org/u/jmorrill)\
**Post date:** [April 13, 2020, 8:04am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/34 "2020-04-13T08:04:38Z")

</div>

Hard to say whats going on but looks like a lot of llvm related stuff.

In you cmake, instead of setting USE\_LLVM to “ON”, try setting it to the path of llvm-config.exe that should be in the build output of your llvm compile. something like : “\<path\_to\_llvm\>/llvm/bin/llvm-config”

---

<div class="post-metadata">

**Author:** ![heliqi](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@heliqi](https://discuss.tvm.apache.org/u/heliqi)\
**Post date:** [May 25, 2020, 8:28am UTC](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711/36 "2020-05-25T08:28:23Z")

</div>

I use your code on windows cpu, LocalRunner not working and using RPCRunner instead. But there are other errors：

```auto
Get devices for measurement successfully!
No: 1 GFLOPS: 0.00/0.00 result: MeasureResult(costs=(FileNotFoundError(2, ‘系统找不到指定的文件。’, None, 2, None),), error_no=2, all_cost=0.062399864196777344, timestamp=1540780378.7561827) [(‘tile_y’, [512, 1]), (‘tile_x’, [512, 1])],None,0
No: 2 GFLOPS: 0.00/0.00 result: MeasureResult(costs=(FileNotFoundError(2, ‘系统找不到指定的文件。’, None, 2, None),), error_no=2, all_cost=0.04679989814758301, timestamp=1540780378.7873828) [(‘tile_y’, [1, 512]), (‘tile_x’, [64, 8])],None,39
.......

```

@jmorrill Do you have any idea？

#------------------supplement--------------------

if using ‘LocalRunner’, error is:

```auto
  xxxx
RuntimeError: cannot get remote devices from the tracker.  

I use python3 -m tvm.exec.query_rpc_tracker,not free,show:

total free pending
0. 0 1

```

[Previous page](https://discuss.tvm.apache.org/t/unofficial-autotvm-on-windows-guide/4711.md?page=1)
