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

Document differences between libtensorflow & libtensorflow_cc #172

Open
h-vetinari opened this issue Nov 16, 2021 · 5 comments
Open

Document differences between libtensorflow & libtensorflow_cc #172

h-vetinari opened this issue Nov 16, 2021 · 5 comments

Comments

@h-vetinari
Copy link
Member

I was wondering about this in the context of conda-forge/staged-recipes#16888, and the recipe here doesn't contain much information, IMO.

This part of the recipe predates my involvement, perhapse @njzjz or someone else from @conda-forge/tensorflow who knows can fill in some gaps?

IMO that could just be a comment in the meta.yaml, but we can also add something to the package-descriptions

@njzjz
Copy link
Member

njzjz commented Nov 16, 2021

One is C library and another one is C++ library.

@h-vetinari
Copy link
Member Author

Thanks for the quick response... But C++ can use C libraries, so is the C++ lib a superset of the C lib? If not, why?

Also, do both contain CUDA? libtensorflow_cc doesn't seem to use a cuda-compiler, but it has a bigger file footprint than libtensorflow. I realise that there are likely many things (including the naming?) that are coming from upstream, but all that should IMO be obvious (at least) from looking at the meta.yaml

@njzjz
Copy link
Member

njzjz commented Nov 16, 2021

C API:
https://www.tensorflow.org/install/lang_c
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api.h

C++ API:
https://www.tensorflow.org/api_docs/cc

In fact, TensorFlow's C API is based on the C++ API, but just rewrites the interface. They have the same core.

So both of them supports CUDA (built by bazel).

@h-vetinari
Copy link
Member Author

In fact, TensorFlow's C API is based on the C++ API, but just rewrites the interface. They have the same core.

Cool thanks. Do you see a chance that we could share "the same core" here between the two libraries? As it is, both are pretty heavyweight at 250-300MB, and that sounds like unnecessary duplication.

@njzjz
Copy link
Member

njzjz commented Nov 16, 2021

In fact, TensorFlow's C API is based on the C++ API, but just rewrites the interface. They have the same core.

Cool thanks. Do you see a chance that we could share "the same core" here between the two libraries? As it is, both are pretty heavyweight at 250-300MB, and that sounds like unnecessary duplication.

Two libraries are defined here:
https://github.com/tensorflow/tensorflow/blob/fd72ea470038a431ddfafd7510c307362a775cab/tensorflow/BUILD#L986-L1063

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

2 participants