Unofficial autoTVM on Windows Guide

Awesome! Thanks!

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

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

Thanks again!

@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!

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

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!

“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.

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, 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?

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?

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 :innocent:

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?

:innocent: :grinning: :grinning: :grinning:
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 :smile:

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

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”

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

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:

  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