MegEngine / MegCC

MegCC是一个运行时超轻量,高效,移植简单的深度学习模型编译器
Apache License 2.0
474 stars 56 forks source link

compile error when build megcc #44

Open alanguo1234 opened 1 year ago

alanguo1234 commented 1 year ago

hi I get the latest source code, I build megcc source code as the user guide, the step as follows:

  1. apt-get install cmake ninja-build 2./third_party/prepare.sh
  2. cd megcc/compiler
  3. mkdir build
  4. cmake .. -G Ninja
  5. ninja

the error log as below: ../tools/mgb-to-tinynn/mgb-to-tinynn.cpp:102:19: error: ‘kernel_exporter’ has not been declared export_cv_opr(kernel_exporter, dump_info->cv_impl); ^~~~~~~ ../tools/mgb-to-tinynn/mgb-to-tinynn.cpp:102:36: error: ‘dump_info’ has not been declared export_cv_opr(kernel_exporter, dump_info->cv_impl); ^~~~~ ../tools/mgb-to-tinynn/mgb-to-tinynn.cpp:102:45: error: expected ‘,’ or ‘...’ before ‘->’ token export_cv_opr(kernel_exporter, dump_info->cv_impl); ^~ ../tools/mgb-to-tinynn/mgb-to-tinynn.cpp:102:54: error: ISO C++ forbids declaration of ‘export_cv_opr’ with no type [-fpermissive] export_cv_opr(kernel_exporter, dump_info->cv_impl);

yeasoon commented 1 year ago

which platform it was compiled?

alanguo1234 commented 1 year ago

the build error have been fixed. thanks.

by the way, OpBuilder::InsertionGuard _(mbuilder); I don't find any description about var define with at cppreference

yeasoon commented 1 year ago

this is in mlir project and not the description of c++