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

Define reasonably stable C-ABI #29

Open
bwasti opened this issue Sep 9, 2022 · 0 comments
Open

Define reasonably stable C-ABI #29

bwasti opened this issue Sep 9, 2022 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@bwasti
Copy link
Contributor

bwasti commented Sep 9, 2022

This project is almost entirely in TypeScript. Autograd, modules, loss functions, optimizers - all of it! The only part in C++ is bound exclusively through an ABI. That means anyone can roll their own backend and get all of shumai.

The ABI is quite simple, but not formalized. There are random _ prefixes and capitalizations. We should formalize it, publish it, and maintain it.

To emphasize the point: currently, you could compile this file as

g++ api.cc -std=c++11 --shared -o libflashlight_binding.so

and if that library (libflashlight_binding.so) ends up in the same directory as where you invoke shumai code, it'll use that instead of the default flashlight integration.

@bwasti bwasti added the documentation Improvements or additions to documentation label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant