This splits compile_mlir_util lib into two parts. One with TF dialect passes that includes TF constant folding hook and other without it. Constant folding hook depends on the TF eager so splitting the library into two parts is required to avoid the circular dependency. PiperOrigin-RevId: 302522554 Change-Id: I4f8f0a8e745a9becff3845cc59950f181e6f415a |
||
---|---|---|
.. | ||
BUILD | ||
concat_licenses.sh | ||
libtensorflow_java_test.sh | ||
libtensorflow_test.c | ||
libtensorflow_test.sh | ||
LibTensorFlowTest.java | ||
README.md |
Bazel rules to package the TensorFlow APIs in languages other than Python into archives.
C library
The TensorFlow C API is typically a requirement of TensorFlow APIs in other languages such as Go and Rust.
The following commands:
bazel test --config opt //tensorflow/tools/lib_package:libtensorflow_test
bazel build --config opt //tensorflow/tools/lib_package:libtensorflow
test and produce the archive at
bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz
, which can be
distributed and installed using something like:
tar -C /usr/local -xzf libtensorflow.tar.gz
Java library
The TensorFlow Java
API
consists of a native library (libtensorflow_jni.so
) and a Java archive (JAR).
The following commands:
bazel test --config opt //tensorflow/tools/lib_package:libtensorflow_test
bazel build --config opt \
//tensorflow/tools/lib_package:libtensorflow_jni.tar.gz \
//tensorflow/java:libtensorflow.jar \
//tensorflow/java:libtensorflow-src.jar
test and produce the following:
- The native library (
libtensorflow_jni.so
) packaged in an archive at:bazel-bin/tensorflow/tools/lib_package/libtensorflow_jni.tar.gz
- The Java archive at:
bazel-bin/tensorflow/java/libtensorflow.jar
- The Java archive for Java sources at:
bazel-bin/tensorflow/java/libtensorflow-src.jar
Release
Scripts to build these archives for TensorFlow releases are in tensorflow/tools/ci_build/linux and tensorflow/tools/ci_build/osx