Windows build : ambiguous symbols


#1

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\bound_deducer.cc(337): 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\bound_deducer.cc)
1>c:\tvm\tvm\include\tvm\ir.h(40): note: or ‘tvm::ir::Variable’ (compiling source file C:\TVM\tvm\src\arithmetic\bound_deducer.cc)


#2

Did this ever get resolved?


#3

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

-- Found TVM_LLVM_VERSION=60
-- Build with LLVM 6.0.0
-- Set TVM_LLVM_VERSION=60

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


#4

I’ve got the mentioned output

– Found TVM_LLVM_VERSION=70
– Build with LLVM 7.0.0
– Set TVM_LLVM_VERSION=70

but the error still shows

1>D:\CODE\GIT\tvm\src\autotvm\touch_extractor.cc(55): 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?


#5

Yes, potentially. I would try with 6.0.


#6

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.


#7

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.