Acceleration for Java bindings

Greetings! I was reading in (Performance Guide  |  TFX  |  TensorFlow) that builds of Tensorflow use commonly-available SIMD instructions for Intel/AMD CPUs. But I want to use the JVM-callable library via the maven dependency (TensorFlow Java را نصب کنید  |  JVM). How can I find out what CPU acceleration, if any, is enabled for the java bindings? How can I change that? If I am on a GPU-enhanced host, is GPU acceleration automatic? I see maven artifacts (e.g. https://mvnrepository.com/artifact/org.tensorflow/libtensorflow_jni_gpu) related to GPU acceleration, but unclear how to use them. Please feel free to reply with RTFM links, I am new to this :slight_smile:
thanks
john

The Maven artifacts you are looking are the legacy distribution for TF1.x . To use TF on a JVM, please check at the actual Java bindings available at GitHub - tensorflow/java: Java bindings for TensorFlow.

Instructions for enabling support of GPU acceleration are explained here, but in summary, adding a dependency to org.tensorflow:tensorflow-core-platform-gpu will do the trick.

2 Likes