Skip to content

Commit ff1e816

Browse files
authored
Upgrade to TF 2.16.1 (#531)
1 parent 2b6d83f commit ff1e816

File tree

94 files changed

+8263
-256
lines changed

Some content is hidden

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

94 files changed

+8263
-256
lines changed

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ To upgrade the version of TensorFlow that is embedded within TensorFlow Java, pl
8787
7. Copy the content of `tensorflow-x.x.x/.bazelversion` file to `tensorflow-core/tensorflow-core-native/.bazelversion`
8888
8. Validate that options in `tensorflow-core/tensorflow-core-native/.bazelrc` are still accurate or update them accordingly
8989
9. Update URLs of existing TensorFlow binaries in the `tensorflow-core/tensorflow-core-native/scripts/dist_download` script
90+
10. Update URLs of TensorFlow-Text binaries used for testing in the `tensorflow-core/tensorflow-core-api/scripts/test_download` script
9091

9192
#### Patching TensorFlow Sources
9293

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ This table shows the mapping between TensorFlow, TensorFlow Java and minimum sup
173173
| 0.4.2 | 2.7.4 | 8 |
174174
| 0.5.0 | 2.10.1 | 11 |
175175
| 0.6.0-SNAPSHOT | 2.10.1 | 11 |
176-
| 1.0.0-SNAPSHOT | 2.15.0 | 11 |
176+
| 1.0.0-SNAPSHOT | 2.16.1 | 11 |
177177

178178
## How to Contribute?
179179

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<junit.version>5.10.0</junit.version>
4444
<jmh.version>1.37</jmh.version>
4545
<versions-plugin.version>2.7</versions-plugin.version>
46-
<errorprone.version>2.10.0</errorprone.version>
46+
<errorprone.version>2.25.0</errorprone.version>
4747
<maven.javadoc.skip>true</maven.javadoc.skip>
4848
<maven.source.skip>true</maven.source.skip>
4949
<gpg.skip>true</gpg.skip>

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ DOWNLOAD_FOLDER="$1"
55

66
case ${PLATFORM:-} in
77
'linux-x86_64')
8-
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/20/a0/bdbf2a11141f1c93e572364d13c42537cfe811b747a0bbb58fdd904f3960/tensorflow_text-2.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
8+
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/c5/ef/5b8270e5665923bda4222f56382d9fbcb7fd6efd5fb8557ad0776848cdff/tensorflow_text-2.16.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
99
;;
1010
'macosx-x86_64')
11-
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/8a/fe/a2f19d3d3ab834c3fa1007c970b0b86573beb929c86ca6c85cd13e86e4b2/tensorflow_text-2.15.0-cp311-cp311-macosx_10_9_x86_64.whl'
11+
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/ed/5d/b55f48cdf98a164d293f660748c2501ea828e148250a4cadbb5b0d988735/tensorflow_text-2.16.1-cp311-cp311-macosx_10_9_x86_64.whl'
1212
;;
1313
*)
1414
echo "TensorFlow Text distribution for ${PLATFORM} is not supported for download"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "ComputeDedupDataSize"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "tpu.ComputeDedupDataSize"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "ConvertToCooTensor"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "tpu.ConvertToCooTensor"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "DatasetFingerprint"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "data.DatasetFingerprint"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "GetMinibatchSplitsWithPhysicalReplica"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "tpu.GetMinibatchSplitsWithPhysicalReplica"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "GetMinibatchesInCsrWithPhysicalReplica"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "tpu.GetMinibatchesInCsrWithPhysicalReplica"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "GlobalIterId"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "tpu.GlobalIterId"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "ListSnapshotChunksDataset"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "data.ListSnapshotChunksDataset"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "StoreMinibatchStatisticsInFdo"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "tpu.StoreMinibatchStatisticsInFdo"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "TPUAnnotateTensorsWithDynamicShape"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "tpu.TPUAnnotateTensorsWithDynamicShape"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "TPUCopyWithDynamicShape"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "tpu.TPUCopyWithDynamicShape"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseCoreAdagrad"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseCoreAdagrad"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseCoreAdagradMomentum"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseCoreAdagradMomentum"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseCoreAdam"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseCoreAdam"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseCoreFtrl"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseCoreFtrl"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseCoreSgd"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseCoreSgd"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseDenseMatmul"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseDenseMatmul"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseDenseMatmulGradWithAdagradAndCsrInput"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseDenseMatmulGradWithAdagradAndCsrInput"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseDenseMatmulGradWithAdamAndCsrInput"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseDenseMatmulGradWithAdamAndCsrInput"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseDenseMatmulGradWithFtrlAndCsrInput"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseDenseMatmulGradWithFtrlAndCsrInput"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseDenseMatmulGradWithSgdAndCsrInput"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseDenseMatmulGradWithSgdAndCsrInput"
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
op {
2+
graph_op_name: "XlaSparseDenseMatmulWithCsrInput"
3+
visibility: VISIBLE
4+
endpoint {
5+
name: "xla.XlaSparseDenseMatmulWithCsrInput"
6+
}
7+
}

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

+26
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.tensorflow.op.data.ConcatenateDataset;
3636
import org.tensorflow.op.data.DataServiceDataset;
3737
import org.tensorflow.op.data.DatasetCardinality;
38+
import org.tensorflow.op.data.DatasetFingerprint;
3839
import org.tensorflow.op.data.DatasetFromGraph;
3940
import org.tensorflow.op.data.DatasetToGraph;
4041
import org.tensorflow.op.data.DatasetToSingleElement;
@@ -62,6 +63,7 @@
6263
import org.tensorflow.op.data.LMDBDataset;
6364
import org.tensorflow.op.data.LatencyStatsDataset;
6465
import org.tensorflow.op.data.LegacyParallelInterleaveDataset;
66+
import org.tensorflow.op.data.ListSnapshotChunksDataset;
6567
import org.tensorflow.op.data.LoadDataset;
6668
import org.tensorflow.op.data.MakeIterator;
6769
import org.tensorflow.op.data.MapAndBatchDataset;
@@ -390,6 +392,17 @@ public DatasetCardinality datasetCardinality(Operand<? extends TType> inputDatas
390392
return DatasetCardinality.create(scope, inputDataset, options);
391393
}
392394

395+
/**
396+
* Returns the fingerprint of {@code input_dataset}.
397+
* Returns the fingerprint of {@code input_dataset}.
398+
*
399+
* @param inputDataset A variant tensor representing the dataset to return fingerprint for.
400+
* @return a new instance of DatasetFingerprint
401+
*/
402+
public DatasetFingerprint datasetFingerprint(Operand<? extends TType> inputDataset) {
403+
return DatasetFingerprint.create(scope, inputDataset);
404+
}
405+
393406
/**
394407
* Creates a dataset from the given {@code graph_def}.
395408
* Creates a dataset from the provided {@code graph_def}.
@@ -873,6 +886,19 @@ public LegacyParallelInterleaveDataset legacyParallelInterleaveDataset(
873886
return LegacyParallelInterleaveDataset.create(scope, inputDataset, otherArguments, cycleLength, blockLength, bufferOutputElements, prefetchInputElements, f, outputTypes, outputShapes, options);
874887
}
875888

889+
/**
890+
* The ListSnapshotChunksDataset operation
891+
*
892+
* @param snapshotPath The snapshotPath value
893+
* @param outputTypes The value of the outputTypes attribute
894+
* @param outputShapes The value of the outputShapes attribute
895+
* @return a new instance of ListSnapshotChunksDataset
896+
*/
897+
public ListSnapshotChunksDataset listSnapshotChunksDataset(Operand<TString> snapshotPath,
898+
List<Class<? extends TType>> outputTypes, List<Shape> outputShapes) {
899+
return ListSnapshotChunksDataset.create(scope, snapshotPath, outputTypes, outputShapes);
900+
}
901+
876902
/**
877903
* The LoadDataset operation
878904
*

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -2338,7 +2338,7 @@ public <T extends TType> DynamicPartition<T> dynamicPartition(Operand<T> data,
23382338
* must have {@code data[i].shape = indices[i].shape + constant}. In terms of this
23392339
* {@code constant}, the output shape is
23402340
* <pre>
2341-
* merged.shape = [max(indices)] + constant
2341+
* merged.shape = [max(indices) + 1] + constant
23422342
* </pre>
23432343
* <p>Values are merged in order, so if an index appears in both {@code indices[m][i]} and
23442344
* {@code indices[n][j]} for {@code (m,i) < (n,j)} the slice {@code data[n][j]} will appear in the
@@ -7599,7 +7599,7 @@ public <T extends TType, U extends TNumber> TensorStridedSliceUpdate<T> tensorSt
75997599
* </blockquote>
76007600
*
76017601
* @param <T> data type for {@code output} output
7602-
* @param input 1-D or higher.
7602+
* @param input Can be of any rank.
76037603
* @param multiples 1-D. Length must be the same as the number of dimensions in {@code input}
76047604
* @param <T> data type for {@code Tile} output and operands
76057605
* @return a new instance of Tile

0 commit comments

Comments
 (0)