Using TVM compiler from C++
Is it possible to schedule and compile ops directly from C++? Digging around the code it seems straightforward to construct the computation graph from C++, but the actual compilation step seems to touch a big chunk of python code in build_module.py (build and lower functions). Would compiling in C++ require porting these functions over to C++ first, or does that functionality already exist under another API?
TVM is mainly in C++ and the only reason python is used is to make things more flexible when stitching things up. build_module.py contains calls into C++ function. So we would need to port these wrapper calls to c++, but the functions that these functions calls are already in C++.
Contribution is welcomed
@tqchen Thanks for clarifying that, I'm working on getting that ported to C++ at the moment - a quick question about conventions: Specifying a schedule requires touching functions like Stage::split. This function is not prefixed with the EXPORT macro, but is added to the global registry as "_StageSplitByFactor". What would be the preferred way of accessing this and similar functions? Should I add the EXPORT macro and use it directly, or go via the registry?
This affects other functions too such as ScheduleNode::make (depended on by create_schedule), and Schedule::operator[]. At the moment for testing purposes I'm just adding EXPORT to all of these, but I'm wondering what would be the preferred way?
Use cxx when possible, if you find some function that you need missing export, add it
I am going to close this issue for now. Feel free to open the PR or WIP issue to track the progress