Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to compile Apache TVM runtime for MIPS platform #17573

Open
RajS999 opened this issue Dec 25, 2024 · 0 comments
Open

[Bug] Unable to compile Apache TVM runtime for MIPS platform #17573

RajS999 opened this issue Dec 25, 2024 · 0 comments
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@RajS999
Copy link

RajS999 commented Dec 25, 2024

I am trying to build Apache TVM library for MIPs platform using steps explained on this page for RISC.

Following are the steps I followed:

$ sudo apt-get update

$ sudo apt-get install g++-9-multilib-mips-linux-gnu

$ sudo apt-get install gcc-9-mips-linux-gnu

$ git clone --recursive https://github.com/apache/tvm tvm

$ cd tvm

$ mkdir build

$ cp cmake/config.cmake build

$ cd build

$ cmake .. -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_C_COMPILER=/usr/bin/mips-linux-gnu-gcc-9 -DCMAKE_CXX_COMPILER=/usr/bin/mips-linux-gnu-g++-9 -DCMAKE_FIND_ROOT_PATH=/usr/mips-linux-gnu -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DMACHINE_NAME=mips-linux-gnu

$ make -j8 runtime

But I ended up getting following errors / FATAL warnings:

In file included from /home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/io.h:443,
                 from /home/my_user/workspace/tvm/include/tvm/runtime/module.h:29,
                 from /home/my_user/workspace/tvm/include/tvm/runtime/packed_func.h:34,
                 from /home/my_user/workspace/tvm/include/tvm/runtime/disco/session.h:77,
                 from /home/my_user/workspace/tvm/include/tvm/runtime/disco/disco_worker.h:28,
                 from /home/my_user/workspace/tvm/src/runtime/disco/process_session.cc:20:
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h: In instantiation of ‘static bool dmlc::serializer::IfThenElse<false, Then, Else, T>::Read(dmlc::Stream*, T*) [with Then = dmlc::serializer::SaveLoadClassHandler<tvm::runtime::RPCCode>; Else = dmlc::serializer::UndefinedSerializerFor<tvm::runtime::RPCCode>; T = tvm::runtime::RPCCode]’:
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h:66:22:   recursively required from ‘static bool dmlc::serializer::IfThenElse<false, Then, Else, T>::Read(dmlc::Stream*, T*) [with Then = dmlc::serializer::NativePODHandler<tvm::runtime::RPCCode>; Else = dmlc::serializer::IfThenElse<false, dmlc::serializer::SaveLoadClassHandler<tvm::runtime::RPCCode>, dmlc::serializer::UndefinedSerializerFor<tvm::runtime::RPCCode>, tvm::runtime::RPCCode>; T = tvm::runtime::RPCCode]’
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h:66:22:   required from ‘static bool dmlc::serializer::IfThenElse<false, Then, Else, T>::Read(dmlc::Stream*, T*) [with Then = dmlc::serializer::ArithmeticHandler<tvm::runtime::RPCCode>; Else = dmlc::serializer::IfThenElse<false, dmlc::serializer::NativePODHandler<tvm::runtime::RPCCode>, dmlc::serializer::IfThenElse<false, dmlc::serializer::SaveLoadClassHandler<tvm::runtime::RPCCode>, dmlc::serializer::UndefinedSerializerFor<tvm::runtime::RPCCode>, tvm::runtime::RPCCode>, tvm::runtime::RPCCode>; T = tvm::runtime::RPCCode]’
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h:294:11:   required from ‘static bool dmlc::serializer::Handler<T>::Read(dmlc::Stream*, T*) [with T = tvm::runtime::RPCCode]’
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/io.h:453:38:   required from ‘bool dmlc::Stream::Read(T*) [with T = tvm::runtime::RPCCode]’
/home/my_user/workspace/tvm/src/runtime/disco/./message_queue.h:98:21:   required from here
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h:66:22: error: ‘Read’ is not a member of ‘dmlc::serializer::UndefinedSerializerFor<tvm::runtime::RPCCode>’
   66 |     return Else::Read(strm, data);
      |            ~~~~~~~~~~^~~~~~~~~~~~
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h: In instantiation of ‘static void dmlc::serializer::IfThenElse<false, Then, Else, T>::Write(dmlc::Stream*, const T&) [with Then = dmlc::serializer::SaveLoadClassHandler<tvm::runtime::RPCCode>; Else = dmlc::serializer::UndefinedSerializerFor<tvm::runtime::RPCCode>; T = tvm::runtime::RPCCode]’:
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h:63:16:   recursively required from ‘static void dmlc::serializer::IfThenElse<false, Then, Else, T>::Write(dmlc::Stream*, const T&) [with Then = dmlc::serializer::NativePODHandler<tvm::runtime::RPCCode>; Else = dmlc::serializer::IfThenElse<false, dmlc::serializer::SaveLoadClassHandler<tvm::runtime::RPCCode>, dmlc::serializer::UndefinedSerializerFor<tvm::runtime::RPCCode>, tvm::runtime::RPCCode>; T = tvm::runtime::RPCCode]’
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h:63:16:   required from ‘static void dmlc::serializer::IfThenElse<false, Then, Else, T>::Write(dmlc::Stream*, const T&) [with Then = dmlc::serializer::ArithmeticHandler<tvm::runtime::RPCCode>; Else = dmlc::serializer::IfThenElse<false, dmlc::serializer::NativePODHandler<tvm::runtime::RPCCode>, dmlc::serializer::IfThenElse<false, dmlc::serializer::SaveLoadClassHandler<tvm::runtime::RPCCode>, dmlc::serializer::UndefinedSerializerFor<tvm::runtime::RPCCode>, tvm::runtime::RPCCode>, tvm::runtime::RPCCode>; T = tvm::runtime::RPCCode]’
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h:275:16:   required from ‘static void dmlc::serializer::Handler<T>::Write(dmlc::Stream*, const T&) [with T = tvm::runtime::RPCCode]’
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/io.h:449:32:   required from ‘void dmlc::Stream::Write(const T&) [with T = tvm::runtime::RPCCode]’
/home/my_user/workspace/tvm/src/runtime/disco/../minrpc/rpc_reference.h:545:5:   required from ‘static void tvm::runtime::RPCReference::ReturnPackedSeq(const TVMValue*, const int*, int, TChannel*) [with TChannel = tvm::runtime::DiscoStreamMessageQueue]’
/home/my_user/workspace/tvm/src/runtime/disco/./message_queue.h:39:84:   required from here
/home/my_user/workspace/tvm/3rdparty/dmlc-core/include/dmlc/serializer.h:63:16: error: ‘Write’ is not a member of ‘dmlc::serializer::UndefinedSerializerFor<tvm::runtime::RPCCode>’
   63 |     Else::Write(strm, data);
      |     ~~~~~~~~~~~^~~~~~~~~~~~
In file included from /home/my_user/workspace/tvm/src/runtime/disco/././protocol.h:35,
                 from /home/my_user/workspace/tvm/src/runtime/disco/./message_queue.h:26,
                 from /home/my_user/workspace/tvm/src/runtime/disco/process_session.cc:34:
/home/my_user/workspace/tvm/src/runtime/disco/././../../support/base64.h: In member function ‘virtual size_t tvm::support::Base64OutStream::Read(void*, size_t)’:
/home/my_user/workspace/tvm/src/runtime/disco/././../../support/base64.h:253:19: warning: control reaches end of non-void function [-Wreturn-type]
  253 |     LOG(FATAL) << "Base64OutStream do not support read";
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/my_user/workspace/tvm/src/runtime/disco/././../../support/base64.h: In member function ‘virtual size_t tvm::support::Base64InStream::Write(const void*, size_t)’:
/home/my_user/workspace/tvm/src/runtime/disco/././../../support/base64.h:210:19: warning: control reaches end of non-void function [-Wreturn-type]
  210 |     LOG(FATAL) << "Base64InStream do not support write";
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |          

What I am missing here?

PS: here is full cmake output and here is full make output.

@RajS999 RajS999 added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

1 participant