Windows build : ambiguous symbols

It seems like I must of configured something wrong that it is showing numerous ambigous symbol errors.
there are 248 instances of “IntLmm” and “Variable”

C:\TVM\tvm\src\arithmetic\ error C2872: ‘Variable’: ambiguous symbol
1>C:\TVM\tvm\include\tvm/expr.h(103): note: could be ‘tvm::Variable’ (compiling source file C:\TVM\tvm\src\arithmetic\
1>c:\tvm\tvm\include\tvm\ir.h(40): note: or ‘tvm::ir::Variable’ (compiling source file C:\TVM\tvm\src\arithmetic\

1 Like

Did this ever get resolved?

@jonso I resolved this issue recently by building LLVM and adding LLVM_DIR as an environment variable in Windows and setting it to C:\llvm-6.0.0.src\build\lib\cmake\llvm\.

Once LLVM is built, ensure that you have set(USE_LLVM ON) in config.cmake. To confirm that your LLVM installation is detected you should see the following output when running CMake.

-- Build with LLVM 6.0.0

Let me know if that helps resolve your issue or if you’d like a more detailed explanation.

I’ve got the mentioned output

– Build with LLVM 7.0.0

but the error still shows

1>D:\CODE\GIT\tvm\src\autotvm\ error C2872: ‘Variable’: ambiguous symbol
1> d:\code\git\tvm\include\tvm\expr.h(103): note: could be ‘tvm::Variable’
1> D:\CODE\GIT\tvm\include\tvm/ir.h(40): note: or ‘tvm::ir::Variable’

Is it possible that the version of LLVM matterrs?

Yes, potentially. I would try with 6.0.

At last I manually modified the code, replacing ir:: with tvm:: and it successfully compiled. But the acceleration is disappointing. I don’t know whether it is because of the modification.

I had the same issue. I got cmake to recognize llvm, but the issue persisted. Resolved it by switching the compiler from VS 2015 to VS 2019.

VS 2019 cannot work on my computer…


after comment the using name, i can compile it on VS2015(llvm 7.0)

@zhigaowu I couldn’ t find this line. Could tell which file it is in ?