-
Notifications
You must be signed in to change notification settings - Fork 744
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
[TensorFlow] Added headers from common_runtime/gpu/* #863
base: master
Are you sure you want to change the base?
Conversation
Yeah, that is going to require some amount of work to get all this mapped in a meaningful way... BTW, Google isn't supporting the C++ API anymore, so this is all deprecated. We should, if possible, use the C API. Could you provide more details about which features you need to access? /cc @karllessard |
Basically what is needed is something like this:
Ultimately I would like to be able to feed graph from GPU memory directly - for that 2 things are needed:
Notes:
|
If I follow you, what you would need is a way to allocate tensors in GPU memory directly and be able to specify which device exactly? Can you bring this up on the SIG JVM mailing list at https://groups.google.com/a/tensorflow.org/forum/#!forum/jvm or the Gitter channel at https://gitter.im/tensorflow/sig-jvm? The guys at Google have started using JavaCPP for their Java bindings, so TensorFlow is basically a downstream project of JavaCPP now...
Yes, it looks like they will leave it there for a while, but from what I know it is no longer being updated, so will most likely either start to become unusable somewhere down the road or become the target of internal refactoring efforts without prior notice.
From what I understand of the way TensorFlow works is that all intput/output tensors are first allocated in host memory, but they can also have allocated GPU memory associated with them once they get used in sessions and what not, which TensorFlow manages. I stumbled on a nice thread about that at tensorflow/tensorflow#5902. It's not clear to me how any of this is supposed to help when we actually want to do everything manually through.
That's cool, but like I said that's all deprecated so the SIG JVM will probably not want to use that anyway (unless this becomes part of the official upstream C API, which I would encourage you to contribute to). Let's see what these guys say though. |
Yes. Here's the workflow:
Yeah, I read that. With some help from @fierval - in my C++ test program tensor gets allocated as in #5902, comment #263944891 (also the GPUBFCAllocator in my previous comment here) then some code from direct_session_test.cc. Thanks for your suggestions. I'll try to post to the resources you mentioned. |
As requested by Samuel.