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

C++ Compiler API #1184

Closed
2 of 5 tasks
tqchen opened this issue May 29, 2018 · 4 comments
Closed
2 of 5 tasks

C++ Compiler API #1184

tqchen opened this issue May 29, 2018 · 4 comments

Comments

@tqchen
Copy link
Member

tqchen commented May 29, 2018

Given that there is enough attention to the c++ compiler. I am creating this issue by elaborating the technical issues around this.

Benefit and Feasibility

Once we move everything to C++, we can expose the compiler API via PackedFunc to any front-end language we like. So everything still only depends on TVM's core C API but takes benefit of getting compiler support

This is definitely feasible, as the tvm and nnvm core are built up in C++. The python API themselves are C++ functions exposed to python.

This being said, we do take benefit of using python as a quick hook to access things like python callbacks and quick prototyping up things. So python API will continue to exist.

The general idea of migration is that we will move stable more part to C++, and expose them via PackedFunc. Contributions are welcomed. So far @alex-weaver has been championing this, and we would definitely interested in getting contributions.

Necessary Steps

  • Move basic version of tvm compiler API to c++ Port build_module.py to C++ #667
  • Move basic ops of topi to C++ Porting schedules (except convolutions) to C++ #763
  • Move nnvm registration of the basic topi operators to c++
    • This is easy as long as topi functions are in C++
    • They actually originally belong to C++ and we moved them to python for flexibility
  • Basic version of environment target system(like tvm.target), hopefully, compatible with python. this is needed for target-dependent dispatching when necessary.
  • NNVM build function.

These steps will get us a functional compiler. Note that we do not yet plan to move the convolution schedules officially to C++ as they are still in flux, but it is possible to port these directly.

@aditya4d1
Copy link
Contributor

I am interested in this too. I have a pet project trying to do the same but a little less verbose.

@srkreddy1238
Copy link
Contributor

+1

As I remember the last discussion on this was about target specific schedule selection from cpp.

We could start by revisiting the NNVM tracker.

@tqchen
Copy link
Member Author

tqchen commented Apr 27, 2019

close due to inactive status, there are newer threads on related issues

@tqchen tqchen closed this as completed Apr 27, 2019
@tqchen
Copy link
Member Author

tqchen commented Apr 27, 2019

#3082

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants