java icon indicating copy to clipboard operation
java copied to clipboard

Tensorflow profiler java bindings

Open JugadK opened this issue 6 months ago • 3 comments

Tensorflow Java Version 1.1.0

In python you can enable the tensor profiler by doing

[tf.profiler.experimental.start](https://www.tensorflow.org/api_docs/python/tf/profiler/experimental/start)

Does anything similar exist in the java bindings ? I see ProfileOptions as a class but it seems to not be used anywhere. Tracing seems to able to be turned on in the ConfigProto/RunOptions configuration though im not sure if I make it write to disk

JugadK avatar Sep 16 '25 03:09 JugadK

@JugadK I'm curious about this. Do you wish to enable this profiler because you are experiencing some kind of memory leak using the java bindings?

DiazBejaranoD avatar Sep 25 '25 08:09 DiazBejaranoD

ProfilerSession isn't exposed as part of TF's C API which is what TF-Java uses. It's probably possible to wrap the C++ header directly and expose it, but that's a lot of work and we don't have the bandwidth for that at the moment.

Craigacp avatar Sep 26 '25 20:09 Craigacp

@DiazBejaranoD We are trying to upgrade Tensorflow from 0.4.1 to 1.1.0 and we are seeing higher cpu utilization, was hoping the profiler could help me debug it

JugadK avatar Sep 29 '25 21:09 JugadK