Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to TF 2.16.1 #531

Merged
merged 4 commits into from
Mar 25, 2024
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
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ To upgrade the version of TensorFlow that is embedded within TensorFlow Java, pl
7. Copy the content of `tensorflow-x.x.x/.bazelversion` file to `tensorflow-core/tensorflow-core-native/.bazelversion`
8. Validate that options in `tensorflow-core/tensorflow-core-native/.bazelrc` are still accurate or update them accordingly
9. Update URLs of existing TensorFlow binaries in the `tensorflow-core/tensorflow-core-native/scripts/dist_download` script
10. Update URLs of TensorFlow-Text binaries used for testing in the `tensorflow-core/tensorflow-core-api/scripts/test_download` script

#### Patching TensorFlow Sources

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ This table shows the mapping between TensorFlow, TensorFlow Java and minimum sup
| 0.4.2 | 2.7.4 | 8 |
| 0.5.0 | 2.10.1 | 11 |
| 0.6.0-SNAPSHOT | 2.10.1 | 11 |
| 1.0.0-SNAPSHOT | 2.15.0 | 11 |
| 1.0.0-SNAPSHOT | 2.16.1 | 11 |

## How to Contribute?

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<junit.version>5.10.0</junit.version>
<jmh.version>1.37</jmh.version>
<versions-plugin.version>2.7</versions-plugin.version>
<errorprone.version>2.10.0</errorprone.version>
<errorprone.version>2.25.0</errorprone.version>
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.source.skip>true</maven.source.skip>
<gpg.skip>true</gpg.skip>
Expand Down
4 changes: 2 additions & 2 deletions tensorflow-core/tensorflow-core-api/scripts/test_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ DOWNLOAD_FOLDER="$1"

case ${PLATFORM:-} in
'linux-x86_64')
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'
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'
;;
'macosx-x86_64')
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/8a/fe/a2f19d3d3ab834c3fa1007c970b0b86573beb929c86ca6c85cd13e86e4b2/tensorflow_text-2.15.0-cp311-cp311-macosx_10_9_x86_64.whl'
TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/ed/5d/b55f48cdf98a164d293f660748c2501ea828e148250a4cadbb5b0d988735/tensorflow_text-2.16.1-cp311-cp311-macosx_10_9_x86_64.whl'
;;
*)
echo "TensorFlow Text distribution for ${PLATFORM} is not supported for download"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "ComputeDedupDataSize"
visibility: VISIBLE
endpoint {
name: "tpu.ComputeDedupDataSize"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "ConvertToCooTensor"
visibility: VISIBLE
endpoint {
name: "tpu.ConvertToCooTensor"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "DatasetFingerprint"
visibility: VISIBLE
endpoint {
name: "data.DatasetFingerprint"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "GetMinibatchSplitsWithPhysicalReplica"
visibility: VISIBLE
endpoint {
name: "tpu.GetMinibatchSplitsWithPhysicalReplica"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "GetMinibatchesInCsrWithPhysicalReplica"
visibility: VISIBLE
endpoint {
name: "tpu.GetMinibatchesInCsrWithPhysicalReplica"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "GlobalIterId"
visibility: VISIBLE
endpoint {
name: "tpu.GlobalIterId"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "ListSnapshotChunksDataset"
visibility: VISIBLE
endpoint {
name: "data.ListSnapshotChunksDataset"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "StoreMinibatchStatisticsInFdo"
visibility: VISIBLE
endpoint {
name: "tpu.StoreMinibatchStatisticsInFdo"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "TPUAnnotateTensorsWithDynamicShape"
visibility: VISIBLE
endpoint {
name: "tpu.TPUAnnotateTensorsWithDynamicShape"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "TPUCopyWithDynamicShape"
visibility: VISIBLE
endpoint {
name: "tpu.TPUCopyWithDynamicShape"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseCoreAdagrad"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseCoreAdagrad"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseCoreAdagradMomentum"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseCoreAdagradMomentum"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseCoreAdam"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseCoreAdam"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseCoreFtrl"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseCoreFtrl"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseCoreSgd"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseCoreSgd"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseDenseMatmul"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseDenseMatmul"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseDenseMatmulGradWithAdagradAndCsrInput"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseDenseMatmulGradWithAdagradAndCsrInput"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseDenseMatmulGradWithAdamAndCsrInput"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseDenseMatmulGradWithAdamAndCsrInput"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseDenseMatmulGradWithFtrlAndCsrInput"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseDenseMatmulGradWithFtrlAndCsrInput"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseDenseMatmulGradWithSgdAndCsrInput"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseDenseMatmulGradWithSgdAndCsrInput"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
op {
graph_op_name: "XlaSparseDenseMatmulWithCsrInput"
visibility: VISIBLE
endpoint {
name: "xla.XlaSparseDenseMatmulWithCsrInput"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.tensorflow.op.data.ConcatenateDataset;
import org.tensorflow.op.data.DataServiceDataset;
import org.tensorflow.op.data.DatasetCardinality;
import org.tensorflow.op.data.DatasetFingerprint;
import org.tensorflow.op.data.DatasetFromGraph;
import org.tensorflow.op.data.DatasetToGraph;
import org.tensorflow.op.data.DatasetToSingleElement;
Expand Down Expand Up @@ -62,6 +63,7 @@
import org.tensorflow.op.data.LMDBDataset;
import org.tensorflow.op.data.LatencyStatsDataset;
import org.tensorflow.op.data.LegacyParallelInterleaveDataset;
import org.tensorflow.op.data.ListSnapshotChunksDataset;
import org.tensorflow.op.data.LoadDataset;
import org.tensorflow.op.data.MakeIterator;
import org.tensorflow.op.data.MapAndBatchDataset;
Expand Down Expand Up @@ -390,6 +392,17 @@ public DatasetCardinality datasetCardinality(Operand<? extends TType> inputDatas
return DatasetCardinality.create(scope, inputDataset, options);
}

/**
* Returns the fingerprint of {@code input_dataset}.
* Returns the fingerprint of {@code input_dataset}.
*
* @param inputDataset A variant tensor representing the dataset to return fingerprint for.
* @return a new instance of DatasetFingerprint
*/
public DatasetFingerprint datasetFingerprint(Operand<? extends TType> inputDataset) {
return DatasetFingerprint.create(scope, inputDataset);
}

/**
* Creates a dataset from the given {@code graph_def}.
* Creates a dataset from the provided {@code graph_def}.
Expand Down Expand Up @@ -873,6 +886,19 @@ public LegacyParallelInterleaveDataset legacyParallelInterleaveDataset(
return LegacyParallelInterleaveDataset.create(scope, inputDataset, otherArguments, cycleLength, blockLength, bufferOutputElements, prefetchInputElements, f, outputTypes, outputShapes, options);
}

/**
* The ListSnapshotChunksDataset operation
*
* @param snapshotPath The snapshotPath value
* @param outputTypes The value of the outputTypes attribute
* @param outputShapes The value of the outputShapes attribute
* @return a new instance of ListSnapshotChunksDataset
*/
public ListSnapshotChunksDataset listSnapshotChunksDataset(Operand<TString> snapshotPath,
List<Class<? extends TType>> outputTypes, List<Shape> outputShapes) {
return ListSnapshotChunksDataset.create(scope, snapshotPath, outputTypes, outputShapes);
}

/**
* The LoadDataset operation
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,7 @@ public <T extends TType> DynamicPartition<T> dynamicPartition(Operand<T> data,
* must have {@code data[i].shape = indices[i].shape + constant}. In terms of this
* {@code constant}, the output shape is
* <pre>
* merged.shape = [max(indices)] + constant
* merged.shape = [max(indices) + 1] + constant
* </pre>
* <p>Values are merged in order, so if an index appears in both {@code indices[m][i]} and
* {@code indices[n][j]} for {@code (m,i) < (n,j)} the slice {@code data[n][j]} will appear in the
Expand Down Expand Up @@ -7599,7 +7599,7 @@ public <T extends TType, U extends TNumber> TensorStridedSliceUpdate<T> tensorSt
* </blockquote>
*
* @param <T> data type for {@code output} output
* @param input 1-D or higher.
* @param input Can be of any rank.
* @param multiples 1-D. Length must be the same as the number of dimensions in {@code input}
* @param <T> data type for {@code Tile} output and operands
* @return a new instance of Tile
Expand Down
Loading
Loading