Compilation error when using Hexagon

I followed the instruction and set

USE_LLVM ON
USE_HEXAGON ON
USE_HEXAGON_SDK <SDK 3.5.2 dir>
USE_HEXAGON_RPC ON

and the error occurs during compilation

 % make -j16
[  0%] Built target tvm_libinfo_objs
[  1%] Built target project_libbacktrace
[  1%] Building CXX object CMakeFiles/tvm_runtime_objs.dir/src/runtime/hexagon/rpc/simulator/session.cc.o
[ 91%] Built target tvm_objs
/home/ligeng/workspace/tvm/src/runtime/hexagon/rpc/simulator/session.cc: In member function ‘std::string tvm::runtime::hexagon::SimulatorRPCChannel::Cpu_::str() const’:
/home/ligeng/workspace/tvm/src/runtime/hexagon/rpc/simulator/session.cc:459:10: error: ‘HEX_CPU_V68’ was not declared in this scope; did you mean ‘HEX_CPU_V67’?
  459 |     case HEX_CPU_V68:
      |          ^~~~~~~~~~~
      |          HEX_CPU_V67
/home/ligeng/workspace/tvm/src/runtime/hexagon/rpc/simulator/session.cc:461:10: error: ‘HEX_CPU_V69’ was not declared in this scope; did you mean ‘HEX_CPU_V67’?
  461 |     case HEX_CPU_V69:
      |          ^~~~~~~~~~~
      |          HEX_CPU_V67
/home/ligeng/workspace/tvm/src/runtime/hexagon/rpc/simulator/session.cc: In member function ‘tvm::runtime::hexagon::detail::Optional<hexagon_cpu_t> tvm::runtime::hexagon::SimulatorRPCChannel::GetCPU(const MaybeString&)’:
/home/ligeng/workspace/tvm/src/runtime/hexagon/rpc/simulator/session.cc:565:20: error: ‘HEX_CPU_V68’ was not declared in this scope; did you mean ‘HEX_CPU_V67’?
  565 |       .Case("v68", HEX_CPU_V68)
      |                    ^~~~~~~~~~~
      |                    HEX_CPU_V67
/home/ligeng/workspace/tvm/src/runtime/hexagon/rpc/simulator/session.cc:566:20: error: ‘HEX_CPU_V69’ was not declared in this scope; did you mean ‘HEX_CPU_V67’?
  566 |       .Case("v69", HEX_CPU_V69)
      |                    ^~~~~~~~~~~
      |                    HEX_CPU_V67
make[2]: *** [CMakeFiles/tvm_runtime_objs.dir/build.make:648: CMakeFiles/tvm_runtime_objs.dir/src/runtime/hexagon/rpc/simulator/session.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:198: CMakeFiles/tvm_runtime_objs.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Does TVM only support V67 ISC?

No, TVM supports v65-v69, but it requires SDK 4.0.0 or later.

Thanks for the quick rely! Let me try latest SDK.

After upgrading to 4.1.2 SDK, the compilation error was resolved.

1 Like