Error installing TVM on Windows

I am trying to install TVM from sources on Windows 10. During compilation I see several errors, specifically for the following projects:

  • tvm\build\tvm_runtime_objs.vcxproj
  • tvm\build\host_standalone_crt.vcxproj
  • tvm\build\standalone_crt.vcxproj

I debugged it and it seems that cmake generates makefiles which are suitable for Linux only but not for Visual Sudio running on the Windows OS. Some of the errors are trivial to fix, like structure padding which is different for Windows.

Example errors taken from the log:

tvm\include\tvm/runtime/crt/rpc_common/write_stream.h(40,19): error C3646: 'Write': unknown override specifier (compiling source file tvm\src\runtime\micro\

and another one for standalone_crt:

  Makefile:52: target `C' doesn't match the target pattern
  Makefile:56: target `C' doesn't match the target pattern
  Makefile:57: warning: overriding recipe for target `C'
  Makefile:53: warning: ignoring old recipe for target `C'
  Makefile:78: *** target pattern contains no `%'.  Stop.

Anyone experiences the same issue? Would appreciate some direction.

I debugged it a bit more, and found that the generated host_standalone_crt.vcxproj contains the following make command:

make CRT_CONFIG=C:/Users/<some path>/tvm/src/runtime/micro/crt_config.h BUILD_DIR=C:/Users<some path>/tvm/build/host_standalone_crt EXTRA_CFLAGS=-fPIC EXTRA_CXXFLAGS=-fPIC EXTRA_LDFLAGS=-fPIC all

The fact that CRT_CONFIG contains full path instead of relative path causes Windows to fail. This is where the ‘C’ comes from. Switching manually to relative path will fix the errors mentioned above, but another error occurs:

The autogenerated makefile under standalone_crt folder is not suited for windows environment. For examle g++ should be replaced with a cygwin g+±3.

Which files should I modify so that the autogenerated makefile will use the correct g++ compiler?

I found eventually an alternative solution to compile TVM on Windows:
Use Visual Studio Code + WSL Linux.
This works perfectly, all running on a single Windows machine.
All details in this Developing in the Windows Subsystem for Linux with Visual Studio Code