-
Notifications
You must be signed in to change notification settings - Fork 201
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
Map tensorflow/c/c_api_experimental.h header file #410
base: master
Are you sure you want to change the base?
Conversation
Thanks @saudet , looks good, I’ve triggered a CI build before merging |
@saudet , I got a bunch of errors on Windows, any clue?
|
Hum, it looks like the experimental APIs are not exported on Windows. I remember bumping into that previously. I suppose we can always hack the Bazel build to export them... TF Core's build seems to be using this Python script to exclude symbols, but I don't see where it's removing any of the "experimental" functions: Ah, yes, I remember now. The experimental APIs are not actually compiled at all by Bazel. We need to compile them separately, like this: java/tensorflow-core/tensorflow-core-api/pom.xml Lines 341 to 344 in ae74151
The problem with that though is that the experimental APIs themselves need to link with the internal API, which is not (cannot) be exported on Windows... 🤦 Why can't they just create multiple DLLs like PyTorch does it, seriously. It does work on Linux and Mac though, but then we're alienating Windows users... |
If we're doing this mainly for pluggable device support then I think the only extant device is the one Apple released for macOS, so it doesn't matter too much if it's not working on Windows. |
Well well well, look at that, the Python binaries on PyPI do export it on Windows: $ winedump -j export python/_pywrap_tensorflow_internal.pyd | grep TF_LoadPluggableDeviceLibrary
0089FAB0 42047 TF_LoadPluggableDeviceLibrary So this sounds like a bug in the C/C++ build of TF Core. |
I exposed a bunch of things manually as part of the custom gradients PR, you might be able to add this to this list. |
Thanks! But it's not the symbols, but the functions themselves that are missing. For some reason Bazel doesn't compile the experimental APIs when building libraries for the C/C++ API, but it does compile them when building for the Python API. |
We'd need to see if it's supported by the binaries on PyPI for the relevant platforms as we now use those rather than building the TF native library ourselves. What platforms do you need? |
We need for 'linux-x86_64'. Our plugins work with the native TF (https://pypi.org/project/tensorflow/). |
Ok, we can take a look at it after 1.0 is released. |
So that we can call goodies like
TF_LoadPluggableDeviceLibrary()
, see issues #409./cc @ashesfall