Build is failing on Windows

Trying to build tvm on Windows 10, VS Professional 2017.

In transform.cc the type ‘uint’ on line 1100 is not defined:
for (uint i = 0; i < indices.size(); ++i) {

1>C:\Users\tomtz\Documents\dev\clones\tvm\src\relay\op\tensor\transform.cc(1100): error C2065: ‘uint’: undeclared identifier
1>C:\Users\tomtz\Documents\dev\clones\tvm\src\relay\op\tensor\transform.cc(1100): error C2146: syntax error: missing ‘;’ before identifier ‘i’
1>C:\Users\tomtz\Documents\dev\clones\tvm\src\relay\op\tensor\transform.cc(1100): error C2143: syntax error: missing ‘;’ before ‘=’
1>C:\Users\tomtz\Documents\dev\clones\tvm\src\relay\op\tensor\transform.cc(1100): error C2143: syntax error: missing ‘)’ before ‘=’
1>C:\Users\tomtz\Documents\dev\clones\tvm\src\relay\op\tensor\transform.cc(1100): error C2059: syntax error: ‘=’
1>Done building project “tvm.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

have you tried working around this issue by building TVM on a Unix machine?

The uint type is not specified in VS compiler.

A quick fix is simple: just replace the uint with unsigned

The current master should then compile (at least with LLVM and OpenCL). Just tested it.

1 Like

@kinred I was able to confirm your fix for that line, but then run into this fatal error:

C:\Users\tomtz\Documents\dev\clones\tvm\nnvm\src\top\tensor\elemwise.cc : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj

Should this be fixed in the CMake files to add the /bigobj, or is this a 32-bit vs 64-bit compiler issue?