Skip to content

Commit 82373b8

Browse files
authored
Upgrading to TF 2.21.0 (#638)
* Upgrading to TF 2.21.0. * Fix test disabling. * Placate spotless. * removing libomp from Linux-arm64 build. * Removing all the linux arm64 libomp directories. * Remove libomp link on Linux arm64.
1 parent ecc113a commit 82373b8

460 files changed

Lines changed: 5255 additions & 3958 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ This table shows the mapping between TensorFlow, TensorFlow Java and minimum sup
215215
| 1.0.0-rc.2 | 2.16.2 | 11 |
216216
| 1.0.0 | 2.16.2 | 11 |
217217
| 1.1.0 | 2.18.0 | 11 |
218-
| 1.2.0-SNAPSHOT | 2.20.0 | 11 |
218+
| 1.2.0-SNAPSHOT | 2.21.0 | 11 |
219219

220220
## How to Contribute?
221221

tensorflow-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/workspace2.bzl
4343
(but for the currently used release, not master)
4444
-->
45-
<protobuf.version>4.28.3</protobuf.version>
45+
<protobuf.version>4.31.1</protobuf.version>
4646

4747
<native.classifier>${javacpp.platform}${javacpp.platform.extension}</native.classifier>
4848
<javacpp.platform.extension></javacpp.platform.extension>

tensorflow-core/tensorflow-core-api/scripts/test_download.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ DOWNLOAD_FOLDER="$1"
55

66
case ${PLATFORM:-} in
77
'linux-x86_64')
8-
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/c3/e6/cfd784298ffb759a4235721cac2ac20f7ff758bf687069cfbaebb06c5804/tensorflow_text-2.20.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl'
8+
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/a9/b9/02707723d44e5d0fe5f7d27ba4237528bc654bac1b0f638efe37988584b1/tensorflow_text-2.20.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl'
99
;;
1010
'linux-arm64')
11-
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/f5/ca/796cfd97ae6693d3c84c37575a6d481be5f1ef36c920d1a73c884f31797b/tensorflow_text-2.20.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl'
11+
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/17/99/b397038628a660a1446bb79c8be284443a28500d072227a77ebaeb5cd149/tensorflow_text-2.20.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl'
1212
;;
1313
'macosx-arm64')
14-
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/98/e4/e3c72d0a73caeba90cf5b31e69d44e9a08d614e0e829484d813f3b63e037/tensorflow_text-2.20.0-cp312-cp312-macosx_11_0_arm64.whl'
14+
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/61/b8/ccb0c3b048f268860f4c92f6bb7ab55c6af6c2fe4e26746c8dc384063915/tensorflow_text-2.20.1-cp313-cp313-macosx_11_0_arm64.whl'
1515
;;
1616
*)
1717
echo "TensorFlow Text distribution for ${PLATFORM} is not supported for download"

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataExperimentalOps.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,6 @@ public ThreadPoolDataset threadPoolDataset(Operand<? extends TType> inputDataset
694694
* @param numThreads The number of threads in the thread pool.
695695
* @param displayName A human-readable name for the threads that may be visible in some
696696
* visualizations.
697-
* threadpool.
698697
* @param options carries optional attribute values
699698
* @return a new instance of ThreadPoolHandle
700699
*/

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2197,7 +2197,6 @@ public ThreadPoolDataset threadPoolDataset(Operand<? extends TType> inputDataset
21972197
* @param numThreads The number of threads in the thread pool.
21982198
* @param displayName A human-readable name for the threads that may be visible in some
21992199
* visualizations.
2200-
* threadpool.
22012200
* @param options carries optional attribute values
22022201
* @return a new instance of ThreadPoolHandle
22032202
*/

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@ public DecodeGif decodeGif(Operand<TString> contents) {
337337
}
338338

339339
/**
340-
* Function for decode_bmp, decode_gif, decode_jpeg, decode_webp, and decode_png.
341-
* Detects whether an image is a BMP, GIF, JPEG, WebP, or PNG, and performs the
342-
* appropriate operation to convert the input bytes string into a Tensor of type
343-
* dtype.
340+
* Function for decode_bmp, decode_gif, decode_jpeg, decode_jxl, decode_webp, and decode_png.
341+
* Detects whether an image is a BMP, GIF, JPEG, JPEG XL, WebP, or PNG, and
342+
* performs the appropriate operation to convert the input bytes string into a
343+
* Tensor of type dtype.
344344
* <p><em>NOTE</em>: decode_gif and decode_webp return a 4-D
345345
* array [num_frames, height, width, 3], as opposed to decode_bmp,
346346
* decode_jpeg, and decode_png, which always return 3-D arrays [height,
@@ -365,10 +365,10 @@ public DecodeImage<TUint8> decodeImage(Operand<TString> contents,
365365
}
366366

367367
/**
368-
* Function for decode_bmp, decode_gif, decode_jpeg, decode_webp, and decode_png.
369-
* Detects whether an image is a BMP, GIF, JPEG, WebP, or PNG, and performs the
370-
* appropriate operation to convert the input bytes string into a Tensor of type
371-
* dtype.
368+
* Function for decode_bmp, decode_gif, decode_jpeg, decode_jxl, decode_webp, and decode_png.
369+
* Detects whether an image is a BMP, GIF, JPEG, JPEG XL, WebP, or PNG, and
370+
* performs the appropriate operation to convert the input bytes string into a
371+
* Tensor of type dtype.
372372
* <p><em>NOTE</em>: decode_gif and decode_webp return a 4-D
373373
* array [num_frames, height, width, 3], as opposed to decode_bmp,
374374
* decode_jpeg, and decode_png, which always return 3-D arrays [height,

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,8 @@ public ComplexAbs<TFloat32> complexAbs(Operand<? extends TType> x) {
668668
* </blockquote>
669669
*
670670
* @param x The x value
671-
* @param Tout The value of the Tout attribute
671+
* @param Tout Need to be {@code tf.float32} when the type of {@code x} is {@code tf.complex64}.
672+
* Need to be {@code tf.float64} when the type of {@code x} is {@code tf.complex128}.
672673
* @param <U> data type for {@code ComplexAbs} output and operands
673674
* @return a new instance of ComplexAbs
674675
*/
@@ -850,9 +851,9 @@ public <T extends TNumber> CumulativeLogsumexp<T> cumulativeLogsumexp(Operand<T>
850851
*
851852
* @param input 1D or 2D int {@code Tensor}.
852853
* @param sizeOutput non-negative int scalar {@code Tensor}.
853-
* @param weights is an int32, int64, float32, or float64 {@code Tensor} with the same
854-
* shape as {@code arr}, or a length-0 {@code Tensor}, in which case it acts as all weights
855-
* equal to 1.
854+
* @param weights {@code Tensor} with the same shape as {@code arr}, or a length-0 {@code Tensor},
855+
* in which case it acts as all weights equal to 1.
856+
* Not supported by the GPU implementation of Bincount.
856857
* @param options carries optional attribute values
857858
* @param <U> data type for {@code DenseBincount} output and operands
858859
* @param <T> data type for {@code DenseBincount} output and operands
@@ -1196,7 +1197,8 @@ public Imag<TFloat32> imag(Operand<? extends TType> input) {
11961197
* </pre>
11971198
*
11981199
* @param input The input value
1199-
* @param Tout The value of the Tout attribute
1200+
* @param Tout Need to be {@code tf.float32} when the type of {@code x} is {@code tf.complex64}.
1201+
* Need to be {@code tf.float64} when the type of {@code x} is {@code tf.complex128}.
12001202
* @param <U> data type for {@code Imag} output and operands
12011203
* @return a new instance of Imag
12021204
*/

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,15 @@ public IsotonicRegression<TFloat32> isotonicRegression(Operand<? extends TNumber
17531753
* Solves a batch of isotonic regression problems.
17541754
*
17551755
* @param input A (batch_size, dim)-tensor holding a batch of inputs.
1756-
* @param outputDtype Dtype of output.
1756+
* @param outputDtype Dtype of the output tensor.
1757+
* <p>Note on supported input-output type combinations:
1758+
* <ul>
1759+
* <li>For floating-point types, the output has the same dtype as the input.</li>
1760+
* <li>For 8-bit and 16-bit integer inputs, the output is a 32-bit float.</li>
1761+
* <li>For 32-bit and 64-bit integer inputs, the output is a 64-bit float.</li>
1762+
* </ul>
1763+
* <p>Using unsupported dtype pairs (for example, input=float64 with output=float32)
1764+
* will result in a &quot;Could not find device for node&quot; error.
17571765
* @param <U> data type for {@code IsotonicRegression} output and operands
17581766
* @return a new instance of IsotonicRegression
17591767
*/

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7743,12 +7743,12 @@ public <T extends TType> TensorListGather<T> tensorListGather(
77437743
* @param index The index value
77447744
* @param elementShape The elementShape value
77457745
* @param elementDtype The value of the elementDtype attribute
7746-
* @param <T> data type for {@code TensorListGetItem} output and operands
7746+
* @param <U> data type for {@code TensorListGetItem} output and operands
77477747
* @return a new instance of TensorListGetItem
77487748
*/
7749-
public <T extends TType> TensorListGetItem<T> tensorListGetItem(
7750-
Operand<? extends TType> inputHandle, Operand<TInt32> index, Operand<TInt32> elementShape,
7751-
Class<T> elementDtype) {
7749+
public <U extends TType> TensorListGetItem<U> tensorListGetItem(
7750+
Operand<? extends TType> inputHandle, Operand<TInt32> index,
7751+
Operand<? extends TNumber> elementShape, Class<U> elementDtype) {
77527752
return TensorListGetItem.create(scope, inputHandle, index, elementShape, elementDtype);
77537753
}
77547754

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,10 @@ public <T extends TNumber> QuantizeAndDequantizeV4<T> quantizeAndDequantizeV4(Op
562562
*
563563
* @param gradients The gradients value
564564
* @param input The input value
565-
* @param inputMin The inputMin value
566-
* @param inputMax The inputMax value
565+
* @param inputMin If {@code axis} is specified, the shape of the minimum input tensor
566+
* must be rank 1.
567+
* @param inputMax If {@code axis} is specified, the shape of the maximum input tensor
568+
* must be rank 1.
567569
* @param options carries optional attribute values
568570
* @param <T> data type for {@code QuantizeAndDequantizeV4Grad} output and operands
569571
* @return a new instance of QuantizeAndDequantizeV4Grad

0 commit comments

Comments
 (0)