Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
tar xzf $HOME/apache-maven-3.6.3-bin.tar.gz -C /opt/
ln -sf /opt/apache-maven-3.6.3/bin/mvn /usr/bin/mvn
echo Downloading Bazel
curl -L https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-installer-linux-x86_64.sh -o bazel.sh --retry 10
curl -L https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-installer-linux-x86_64.sh -o bazel.sh --retry 10
bash bazel.sh
if [[ "${{ matrix.ext }}" == *-gpu ]]; then
echo Installing CUDA
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
run: |
python3 -m pip install numpy six
echo Downloading Bazel
curl -L https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-installer-darwin-x86_64.sh -o bazel.sh --retry 10
curl -L https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-installer-darwin-x86_64.sh -o bazel.sh --retry 10
bash bazel.sh
brew install libomp perl
- name: Checkout repository
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
bash.exe -lc "find 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/' -iname '14.1*' -exec rm -Rf {} \;"
echo Downloading Bazel
mkdir C:\bazel
curl.exe -L https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-windows-x86_64.exe -o C:/bazel/bazel.exe --retry 10
curl.exe -L https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-windows-x86_64.exe -o C:/bazel/bazel.exe --retry 10
set "EXT=${{ matrix.ext }}"
if "%EXT:~-4%" == "-gpu" (
echo Removing some unused stuff to avoid running out of disk space
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ systems, you should add the following dependencies:
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
<classifier>linux-x86_64${javacpp.platform.extension}</classifier>
</dependency>
```
Expand All @@ -72,24 +72,24 @@ native dependencies as follows:
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
<classifier>linux-x86_64${javacpp.platform.extension}</classifier>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
<classifier>macosx-x86_64${javacpp.platform.extension}</classifier>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
<classifier>windows-x86_64${javacpp.platform.extension}</classifier>
</dependency>
```
Expand All @@ -102,7 +102,7 @@ artifact includes transitively all the artifacts above as a single dependency:
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-platform${javacpp.platform.extension}</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</dependency>
```

Expand Down Expand Up @@ -141,15 +141,16 @@ to add Sonatype OSS repository in your pom.xml, like the following

This table shows the mapping between different version of TensorFlow for Java and the core runtime libraries.

| TensorFlow Java Version | TensorFlow Version |
| ------------- | ------------- |
| 0.2.0 | 2.3.1 |
| 0.3.0 | 2.4.1 |
| 0.3.1 | 2.4.1 |
| 0.3.2 | 2.4.1 |
| 0.3.3 | 2.4.1 |
| 0.4.0 | 2.7.0 |
| 0.4.1 | 2.7.1 |
| TensorFlow Java Version | TensorFlow Version |
|-------------------------|--------------------|
| 0.2.0 | 2.3.1 |
| 0.3.0 | 2.4.1 |
| 0.3.1 | 2.4.1 |
| 0.3.2 | 2.4.1 |
| 0.3.3 | 2.4.1 |
| 0.4.0 | 2.7.0 |
| 0.4.1 | 2.7.1 |
| 0.4.2 | 2.7.4 |

## How to Contribute?

Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ For example,
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-platform</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</dependency>
```

Expand Down Expand Up @@ -170,7 +170,7 @@ add the TensorFlow dependency to the project's `pom.xml` file:
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-platform</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</dependency>
</dependencies>
</project>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-java</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
<packaging>pom</packaging>

<name>TensorFlow Java Parent</name>
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-java</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>tensorflow-core</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core/tensorflow-core-api/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.2
4.2.1
8 changes: 4 additions & 4 deletions tensorflow-core/tensorflow-core-api/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ http_archive(
],
patch_tool = "patch",
patch_args = ["-p1"],
patch_cmds = ["grep -rl 'java_package' tensorflow/core | xargs sed -i.bak 's/^\(.* java_package = \"org\.tensorflow\.\)\(.*\"\)/\\1proto.\\2'/"],
patch_cmds = ["grep -rl 'java_package' tensorflow/core | xargs sed -i.bak 's/^\\(.* java_package = \"org\\.tensorflow\\.\\)\\(.*\"\\)/\\1proto.\\2'/"],
urls = [
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.7.1.tar.gz",
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.7.4.tar.gz",
],
sha256 = "abebe2cf5ca379e18071693ca5f45b88ade941b16258a21cc1f12d77d5387a21",
strip_prefix = "tensorflow-2.7.1"
sha256 = "75b2e40a9623df32da16d8e97528f5e02e4a958e23b1f2ee9637be8eec5d021b",
strip_prefix = "tensorflow-2.7.4"
)

# START: Upstream TensorFlow dependencies
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core/tensorflow-core-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>tensorflow-core-api</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2019-2021 The TensorFlow Authors. All Rights Reserved.
/* Copyright 2019-2022 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -20,6 +20,7 @@
import static org.tensorflow.internal.c_api.global.tensorflow.TF_GetAllOpList;
import static org.tensorflow.internal.c_api.global.tensorflow.TF_GetOpList;
import static org.tensorflow.internal.c_api.global.tensorflow.TF_LoadLibrary;
import static org.tensorflow.internal.c_api.global.tensorflow.TF_RegisterFilesystemPlugin;
import static org.tensorflow.internal.c_api.global.tensorflow.TF_Version;

import com.google.protobuf.InvalidProtocolBufferException;
Expand Down Expand Up @@ -108,6 +109,21 @@ public static OpList loadLibrary(String filename) {
}
}

/**
* Loads the filesystem plugin from filename and registers all the filesystems it supports.
*
* <p>Throws a TF runtime exception if the plugin failed to load.
*
* @param filename Path of the dynamic library containing the filesystem support.
*/
public static void registerFilesystemPlugin(String filename) {
try (PointerScope scope = new PointerScope()) {
TF_Status status = TF_Status.newStatus();
TF_RegisterFilesystemPlugin(filename, status);
status.throwExceptionIfNotOK();
}
}

private static TF_Library libraryLoad(String filename) {
try (PointerScope scope = new PointerScope()) {
TF_Status status = TF_Status.newStatus();
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core/tensorflow-core-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>tensorflow-core-generator</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core/tensorflow-core-platform-gpu/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>tensorflow-core-platform-gpu</artifactId>
<name>TensorFlow Core API Library Platform GPU</name>
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core/tensorflow-core-platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>tensorflow-core-platform</artifactId>
<name>TensorFlow Core API Library Platform</name>
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-java</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>tensorflow-framework</artifactId>
<packaging>jar</packaging>
Expand Down