uber/neuropod

Add a Go (CGo) API to neuropod

Opened this issue · 5 comments

We use neuropod in Go service with a "bridge" code that converts C++ API into Go API.
It uses libneuropod.tar package that includes necessary headers and libs.

I think having Go API a part of neuropod (or as a separate repo) may have the following benefits:

  • Go is a very popular platform for services and microservices now and "standard' API can make add a value to Neuropod library.
  • CGo bridge requires some specific knowledge and it's easy to introduce memory leaks. Standard API will solve this problem.
  • Having client of libneuropod.tar will help to catch possible problems that other clients may meet (like missed headers, extra dependencies and regressions).

Let me know what do you think. We can work on making our bridge generic and add it to neuropod or as a separate repo neuropod-go.

I like the idea of contributing our bridge code back. Makes a lot of sense to me.

I like the idea of a separate neuropod-go repo for now. If at some point, there's enough community interest (and it makes sense to do so), we can pull it into the neuropod repo then.

How does that sound?

I do think we can learn something from go-torch.which can convert torch scripts into go module without difficulty.

I looked at go-torch package but not sure if it does conversions. It performs binding through Cgo "bridge".

This is pretty similar to what we are doing for our Go service, C/C++ code and CGO bindings. We already have working version of Go API and willing to open source it. I created this Issue to discuss if we can make it a part of Neuropod repo (like TF is doing https://github.com/tensorflow/tensorflow/tree/master/tensorflow/go) or separate neuropod-go repo.

I personally would like to make it a part of neuropod repo because in this case we would have all well-known benefits of "monorepo".

(For anyone watching this issue externally)

We're exploring ways to contribute our internal Go bindings/bridge code to the Neuropod repo.

We'll post here with more updates as we decide on a clear path forward.